00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_ACTIONEXEC_H
00020 #define GNASH_ACTIONEXEC_H
00021
00022 #ifdef HAVE_CONFIG_H
00023 #include "config.h"
00024 #endif
00025
00026 #include "with_stack_entry.h"
00027
00028 #include <vector>
00029
00030
00031 namespace gnash {
00032 class action_buffer;
00033 class as_environment;
00034 class as_value;
00035 }
00036
00037 namespace gnash {
00038
00040 class ActionExec {
00041
00043 std::vector<with_stack_entry> with_stack;
00044
00046
00049 size_t _with_stack_limit;
00050
00051 bool _function2_var;
00052
00053 public:
00054
00056
00059 const action_buffer& code;
00060
00062
00065 size_t pc;
00066
00068
00071 size_t stop_pc;
00072
00074 size_t next_pc;
00075
00077 as_environment& env;
00078
00080 as_value* retval;
00081
00083 ActionExec(const action_buffer& abuf, as_environment& newEnv);
00084
00086
00110 ActionExec(const action_buffer& abuf, as_environment& newEnv,
00111 size_t nStartPC, size_t nExecBytes, as_value* nRetval,
00112 const std::vector<with_stack_entry>& initial_with_stack,
00113 bool nIsFunction2);
00114
00116 bool isFunction2() { return _function2_var; }
00117
00119
00122 const std::vector<with_stack_entry>& getWithStack() const
00123 {
00124 return with_stack;
00125 }
00126
00128
00132 size_t getWithStackLimit() const
00133 {
00134 return _with_stack_limit;
00135 }
00136
00138
00143 bool pushWithEntry(const with_stack_entry& entry);
00144
00146
00149 void skip_actions(size_t offset);
00150
00152 void operator() ();
00153
00154 };
00155
00156 }
00157
00158 #endif // GNASH_ACTIONEXEC_H
00159
00160
00161
00162
00163