Implementation/Auto Library


Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 731

Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 739

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/parser/Preprocessor_DOM.php on line 754

Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/GlobalFunctions.php on line 2409
From Pit

Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 731

Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 739
Jump to:
Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 731

Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 739
navigation

Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 731

Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 739

Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/GlobalFunctions.php on line 2409

Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/GlobalFunctions.php on line 2409
,
Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 731

Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/pit.devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 739
search

The library for supporting auto variables is in the _auto namespace. (Names prefixed with underscore are reserved for the compiler to use.)

The compiler translates each operation on an auto variable into a function call in the _auto namespace. Most of these function calls fall into several groups:

  • Binary and unary operators. For examples, $_auto.any.{add,sub,mul,div,assign,add_assign,neg,logical_not,bitwise_not}. These dispatch type-specific functions depending on what the type of the left side is. For example, when the add operation is called and the type of the stored value is integer, $_auto.int.add is called.
  • Constructors: For examples, $_auto.{undef,int,float,ref}.new
  • Fetchers: For examples, $_auto.{int,float}.fetch. These fetch a value to be stored in a primitive variable. The type of the target primitive variable determines which fetcher is called. For example, when converting an auto variable to a primitive integer, $_auto.int.fetch is called.
  • Other: $_auto.refcount_inc, $_auto.refcount_dec, $_auto.deref, $_auto.new.auto (?), $_auto.rstore