Gnash  0.8.10
Public Types | Public Member Functions
gnash::Function2 Class Reference

Function2 adds extra sauce to ordinary Functions. More...

#include <Function2.h>

Inheritance diagram for gnash::Function2:
gnash::Function gnash::UserFunction gnash::as_function gnash::as_object gnash::GcResource

List of all members.

Public Types

enum  DefineFunction2Flags {
  PRELOAD_THIS = 0x01, SUPPRESS_THIS = 0x02, PRELOAD_ARGUMENTS = 0x04, SUPPRESS_ARGUMENTS = 0x08,
  PRELOAD_SUPER = 0x10, SUPPRESS_SUPER = 0x20, PRELOAD_ROOT = 0x40, PRELOAD_PARENT = 0x80,
  PRELOAD_GLOBAL = 256
}

Public Member Functions

 Function2 (const action_buffer &ab, as_environment &env, size_t start, const ScopeStack &with_stack)
virtual ~Function2 ()
virtual boost::uint8_t registers () const
 Return the number of registers to allocate for this function.
void setRegisterCount (boost::uint8_t ct)
void setFlags (boost::uint16_t flags)
virtual as_value call (const fn_call &fn)
 Dispatch.

Detailed Description

Function2 adds extra sauce to ordinary Functions.

The Function2 was introduced in version 6 of the player. Differences from ordinary functions are: 1. Up to 256 local registers. 2. Ability to suppress super, this, arguments 3. Ability to store super, this, arguments, _global, _root, and _parent in registers.


Member Enumeration Documentation

Enumerator:
PRELOAD_THIS 

Bind one register to "this".

SUPPRESS_THIS 

No "this" variable accessible by name.

PRELOAD_ARGUMENTS 

Bind one register to "arguments".

SUPPRESS_ARGUMENTS 

No "argument" variable accessible by name.

PRELOAD_SUPER 

Bind one register to "super".

SUPPRESS_SUPER 

No "super" variable accessible by name.

PRELOAD_ROOT 

Bind one register to "_root".

PRELOAD_PARENT 

Bind one register to "_parent".

PRELOAD_GLOBAL 

Bind one register to "_global".


Constructor & Destructor Documentation

gnash::Function2::Function2 ( const action_buffer ab,
as_environment env,
size_t  start,
const ScopeStack with_stack 
)
virtual gnash::Function2::~Function2 ( ) [inline, virtual]

Member Function Documentation

as_value gnash::Function2::call ( const fn_call fn) [virtual]
virtual boost::uint8_t gnash::Function2::registers ( ) const [inline, virtual]

Return the number of registers to allocate for this function.

Reimplemented from gnash::Function.

void gnash::Function2::setFlags ( boost::uint16_t  flags) [inline]
void gnash::Function2::setRegisterCount ( boost::uint8_t  ct) [inline]

The documentation for this class was generated from the following files: