19 #ifndef GNASH_ACTIONEXEC_H 20 #define GNASH_ACTIONEXEC_H 25 #include <boost/noncopyable.hpp> 53 TryBlock(
size_t cur_off,
size_t try_size,
size_t catch_size,
54 size_t finally_size, std::string catchName)
56 _catchOffset(cur_off + try_size),
57 _finallyOffset(cur_off + try_size + catch_size),
58 _afterTriedOffset(cur_off + try_size + catch_size + finally_size),
61 _name(
std::move(catchName)),
67 TryBlock(
size_t cur_off,
size_t try_size,
size_t catch_size,
68 size_t finally_size, std::uint8_t register_index)
70 _catchOffset(cur_off + try_size),
71 _finallyOffset(cur_off + try_size + catch_size),
72 _afterTriedOffset(cur_off + try_size + catch_size + finally_size),
76 _registerIndex(register_index),
83 size_t _finallyOffset;
84 size_t _afterTriedOffset;
85 size_t _savedEndOffset;
88 unsigned int _registerIndex;
105 return _block_end_pc;
114 size_t _block_end_pc;
133 bool abortOnUnloaded =
true);
176 bool pushWith(
const With& entry);
181 void skip_actions(
size_t offset);
199 void setLocalVariable(
const std::string& name,
const as_value& val);
232 void adjustNextPC(
int offset);
255 void dumpActions(
size_t start,
size_t end, std::ostream& os);
270 bool processExceptions(
TryBlock& t);
287 void cleanupAfterRun();
290 std::vector<With> _withStack;
293 ScopeStack _scopeStack;
309 size_t _initialStackSize;
313 int _origExecSWFVersion;
315 std::stack<TryBlock> _tryList;
335 #endif // GNASH_ACTIONEXEC_H Definition: ActionExec.h:40
Definition: ActionExec.h:50
as_object * _object
Definition: Array_as.cpp:680
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:168
const action_buffer & code
The actual action buffer.
Definition: ActionExec.h:153
Definition: klash_part.cpp:330
void setVariable(const as_environment &env, const std::string &varname, const as_value &val, const as_environment::ScopeStack &scope)
Given a path to variable, set its value.
Definition: as_environment.cpp:328
ActionScript value type.
Definition: as_value.h:94
size_t getStopPC() const
Definition: ActionExec.h:238
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
size_t getNextPC() const
Definition: ActionExec.h:234
A simple SWF-defined Function.
Definition: Function.h:63
ActionType
SWF action ids. Symbolic names copied from Ming.
Definition: SWF.h:124
The base class for all ActionScript objects.
Definition: as_object.h:161
as_value getVariable(const as_environment &env, const std::string &varname, const as_environment::ScopeStack &scope, as_object **retTarget)
Return the (possibly undefined) value of the named var.
Definition: as_environment.cpp:289
bool delVariable(const as_environment &ctx, const std::string &varname, const as_environment::ScopeStack &scope)
Delete a variable, without support for the path, using a ScopeStack.
Definition: as_environment.cpp:357
Definition: ActionExec.h:93
as_environment & env
TODO: provide a getter and make private ?
Definition: ActionExec.h:156
bool isFunction() const
Is this execution thread a function call ?
Definition: ActionExec.h:162
as_object * object() const
Definition: ActionExec.h:108
Provides information about timeline context.
Definition: as_environment.h:50
tryState
Definition: ActionExec.h:45
Definition: GnashKey.h:166
const ScopeStack & getScopeStack() const
Returns the scope stack associated with this execution thread.
Definition: ActionExec.h:168
size_t getCurrentPC() const
Definition: ActionExec.h:228
size_t end_pc() const
Definition: ActionExec.h:104
Executor of an action_buffer.
Definition: ActionExec.h:118
void setNextPC(size_t pc)
Definition: ActionExec.h:236
Definition: ActionExec.h:47
Definition: ActionExec.h:49
TryBlock(size_t cur_off, size_t try_size, size_t catch_size, size_t finally_size, std::string catchName)
Definition: ActionExec.h:53
void skipRemainingBuffer()
Definition: ActionExec.h:230
TryBlock(size_t cur_off, size_t try_size, size_t catch_size, size_t finally_size, std::uint8_t register_index)
Definition: ActionExec.h:67
Definition: ActionExec.h:48
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
as_value * retval
TODO: provide a setter and make private ?
Definition: ActionExec.h:159
A code segment.
Definition: action_buffer.h:49
std::vector< as_object * > ScopeStack
A stack of objects used for variables/members lookup.
Definition: as_environment.h:55
bool atActionTag(SWF::ActionType t)
Definition: ActionExec.h:226
std::string name
Definition: LocalConnection_as.cpp:149
friend class ActionExec
Definition: ActionExec.h:43
With(as_object *obj, size_t end)
Definition: ActionExec.h:97