Go to the documentation of this file.
19 #ifndef GNASH_FUNCTION2_H
20 #define GNASH_FUNCTION2_H
83 return _registerCount;
91 _function2Flags = flags;
100 std::uint8_t _registerCount;
103 std::uint16_t _function2Flags;
std::vector< Argument > _args
Definition: Function.h:138
virtual MovieClip * getAsRoot()
Return the _root ActionScript property of this DisplayObject.
Definition: DisplayObject.cpp:847
as_object * super
The "super" object in this function call context.
Definition: fn_call.h:175
Function2 adds extra sauce to ordinary Functions.
Definition: Function2.h:41
std::string name
Definition: LocalConnection_as.cpp:149
The base class for all ActionScript objects.
Definition: as_object.h:162
virtual ~Function2()
Definition: Function2.h:79
CallFrame & callFrame()
Get the CallFrame we've just pushed.
Definition: VM.h:329
@ i
Definition: GnashKey.h:155
void setLocal(CallFrame &c, const ObjectURI &name, const as_value &val)
Set a local variable in this CallFrame.
Definition: CallStack.cpp:80
A simple SWF-defined Function.
Definition: Function.h:64
Provides information about timeline context.
Definition: as_environment.h:51
The AVM1 virtual machine.
Definition: VM.h:72
Function2(const action_buffer &ab, as_environment &env, size_t start, const ScopeStack &with_stack)
Definition: Function2.cpp:35
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
@ PROP_SUPER
Definition: namedStrings.h:93
Global_as * getGlobal() const
Get a pointer to this VM's _global Object.
Definition: VM.cpp:149
@ PRELOAD_ARGUMENTS
Bind one register to "arguments".
Definition: Function2.h:54
@ PRELOAD_GLOBAL
Bind one register to "_global".
Definition: Function2.h:72
@ n
Definition: GnashKey.h:160
@ start
Definition: klash_part.cpp:330
Executor of an action_buffer.
Definition: ActionExec.h:119
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
void setLocalRegister(size_t i, const as_value &val)
Set a specific register in this CallFrame.
Definition: CallStack.cpp:57
@ SUPPRESS_THIS
No "this" variable accessible by name.
Definition: Function2.h:51
Parameters/environment for builtin or user-defined functions callable from ActionScript.
Definition: fn_call.h:118
@ r
Definition: GnashKey.h:164
void setRegisterCount(std::uint8_t ct)
Definition: Function2.h:86
@ SUPPRESS_SUPER
No "super" variable accessible by name.
Definition: Function2.h:63
virtual std::uint8_t registers() const
Return the number of registers to allocate for this function.
Definition: Function2.h:82
@ PRELOAD_THIS
Bind one register to "this".
Definition: Function2.h:48
as_environment & _env
@ might need some kind of ref count here, but beware cycles
Definition: Function.h:141
@ p
Definition: GnashKey.h:162
@ SUPPRESS_ARGUMENTS
No "argument" variable accessible by name.
Definition: Function2.h:57
Args::size_type nargs
Number of arguments to this ActionScript function call.
Definition: fn_call.h:178
DisplayObject * target() const
Definition: as_environment.h:61
bool calling() const
Whether a function call is in progress.
Definition: VM.h:240
std::vector< as_object * > ScopeStack
Definition: Function.h:68
@ PRELOAD_SUPER
Bind one register to "super".
Definition: Function2.h:60
Definition: Function.h:40
ActionScript value type.
Definition: as_value.h:95
as_object * createArray()
Construct an Array.
Definition: Global_as.cpp:207
as_object * getArguments(Function &callee, as_object &args, const fn_call &fn, as_object *caller)
Add properties to an 'arguments' object.
Definition: Function.cpp:169
@ PROP_ARGUMENTS
Definition: namedStrings.h:60
UserFunction & function()
Get the function for which this CallFrame provides a scope.
Definition: CallStack.h:78
const Args::value_type & arg(unsigned int n) const
Access a particular argument.
Definition: fn_call.h:194
const ConstantPool * _pool
The ConstantPool in effect at time of function definition.
Definition: Function.h:144
VM & vm() const
Return a reference to this as_object's global object.
Definition: as_object.h:205
DisplayObject * parent() const
Return the parent of this DisplayObject, or NULL if the DisplayObject has no parent.
Definition: DisplayObject.h:252
DisplayObject * get_original_target() const
Definition: as_environment.h:77
as_object * getObject(const DisplayObject *d)
Return the as_object associated with a DisplayObject if it exists.
Definition: DisplayObject.h:1160
int getSWFVersion(const as_environment &env)
Definition: as_environment.cpp:657
DefineFunction2Flags
Definition: Function2.h:46
Definition: ConstantPool.h:35
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:169
A code segment.
Definition: action_buffer.h:50
void declareLocal(CallFrame &c, const ObjectURI &name)
Declare a local variable in this CallFrame.
Definition: CallStack.cpp:71
A CallFrame is an element of a CallStack.
Definition: CallStack.h:44
as_object * this_ptr
Definition: fn_call.h:170
virtual as_value call(const fn_call &fn)
Dispatch.
Definition: Function2.cpp:46
void setFlags(std::uint16_t flags)
Definition: Function2.h:90
@ PRELOAD_ROOT
Bind one register to "_root".
Definition: Function2.h:66
@ PRELOAD_PARENT
Bind one register to "_parent".
Definition: Function2.h:69
@ PROP_THIS
Definition: namedStrings.h:96
virtual as_object * get_super(const ObjectURI &fname)
Definition: as_object.cpp:445
CallFrame & currentCall()
Return the CallFrame of the currently executing function.
Definition: VM.cpp:229