29 #include <boost/array.hpp>
30 #include <boost/cstdint.hpp>
31 #include <boost/random/mersenne_twister.hpp>
32 #include <boost/noncopyable.hpp>
50 class SharedObjectLibrary;
111 void setSWFVersion(
int v);
114 unsigned long int getTime()
const;
124 const std::string& getPlayerVersion()
const;
130 std::string getOSName()
const;
135 std::string getSystemLanguage()
const;
152 typedef boost::mt11213b
RNG;
156 RNG& randomNumberGenerator();
163 assert(_shLib.get());
175 void markReachableResources()
const;
199 const as_value* getRegister(
size_t index);
218 void setRegister(
size_t index,
const as_value& val);
241 return !_callStack.empty();
245 void dumpState(std::ostream&
o,
size_t limit = 0);
262 typedef std::map<unsigned int, as_c_function_ptr> FuncMap;
263 typedef std::map<unsigned int, FuncMap> AsNativeTable;
264 AsNativeTable _asNativeTable;
273 typedef boost::array<as_value, 4> GlobalRegisters;
274 GlobalRegisters _globalRegisters;
279 std::auto_ptr<SharedObjectLibrary> _shLib;
290 getURI(
const VM& vm,
const std::string& str,
bool lowerCaseHint=
false)
307 inline const std::string&
324 _callFrame(_vm.pushCallFrame(func))
365 void newAdd(as_value& op1,
const as_value& op2,
const VM& vm);
372 void subtract(as_value& op1,
const as_value& op2,
const VM& vm);
379 as_value
newLessThan(
const as_value& op1,
const as_value& op2,
const VM& vm);
394 bool equals(
const as_value&
a,
const as_value&
b,
const VM& vm);
401 bool toBool(
const as_value&
v,
const VM& vm);
415 as_object*
toObject(
const as_value&
v, VM& vm);
428 boost::int32_t
toInt(
const as_value& val,
const VM& vm);