Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_FUNCTION2_H
00020 #define GNASH_FUNCTION2_H
00021
00022 #include "Function.h"
00023
00024
00025 namespace gnash {
00026 class action_buffer;
00027 class as_object;
00028 }
00029
00030 namespace gnash {
00031
00033
00040 class Function2 : public Function
00041 {
00042
00043 public:
00044
00045 enum DefineFunction2Flags
00046 {
00048 PRELOAD_THIS = 0x01,
00049
00051 SUPPRESS_THIS = 0x02,
00052
00054 PRELOAD_ARGUMENTS = 0x04,
00055
00057 SUPPRESS_ARGUMENTS = 0x08,
00058
00060 PRELOAD_SUPER = 0x10,
00061
00063 SUPPRESS_SUPER = 0x20,
00064
00066 PRELOAD_ROOT = 0x40,
00067
00069 PRELOAD_PARENT = 0x80,
00070
00072 PRELOAD_GLOBAL = 256
00073 };
00074
00075
00076 Function2(const action_buffer& ab, as_environment& env, size_t start,
00077 const ScopeStack& with_stack);
00078
00079 virtual ~Function2() {}
00080
00082 virtual boost::uint8_t registers() const {
00083 return _registerCount;
00084 }
00085
00086 void setRegisterCount(boost::uint8_t ct) {
00087 _registerCount = ct;
00088 }
00089
00090 void setFlags(boost::uint16_t flags) {
00091 _function2Flags = flags;
00092 }
00093
00095 virtual as_value call(const fn_call& fn);
00096
00097 private:
00098
00100 boost::uint8_t _registerCount;
00101
00103 boost::uint16_t _function2Flags;
00104
00105 };
00106
00107
00108 }
00109
00110 #endif
00111