31 #include <boost/cstdint.hpp>
32 #include <boost/random.hpp>
33 #include <boost/noncopyable.hpp>
34 #include <boost/array.hpp>
52 class SharedObjectLibrary;
114 void setSWFVersion(
int v);
117 unsigned long int getTime()
const;
127 const std::string& getPlayerVersion()
const;
133 std::string getOSName()
const;
138 std::string getSystemLanguage()
const;
155 typedef boost::mt11213b
RNG;
159 RNG& randomNumberGenerator();
178 void markReachableResources()
const;
202 const as_value* getRegister(
size_t index);
221 void setRegister(
size_t index,
const as_value& val);
244 return !_callStack.empty();
248 void dumpState(std::ostream&
o,
size_t limit = 0);
265 typedef std::map<unsigned int, as_c_function_ptr> FuncMap;
266 typedef std::map<unsigned int, FuncMap> AsNativeTable;
267 AsNativeTable _asNativeTable;
276 typedef boost::array<as_value, 4> GlobalRegisters;
277 GlobalRegisters _globalRegisters;
282 std::auto_ptr<SharedObjectLibrary> _shLib;
293 getURI(
const VM& vm,
const std::string& str,
bool lowerCaseHint=
false)
310 inline const std::string&
327 _callFrame(_vm.pushCallFrame(func))
368 void newAdd(as_value& op1,
const as_value& op2,
const VM& vm);
375 void subtract(as_value& op1,
const as_value& op2,
const VM& vm);
382 as_value
newLessThan(
const as_value& op1,
const as_value& op2,
const VM& vm);
397 bool equals(
const as_value&
a,
const as_value&
b,
const VM& vm);
404 bool toBool(
const as_value&
v,
const VM& vm);
411 double toNumber(
const as_value&
v,
const VM& vm);
418 as_object*
toObject(
const as_value&
v, VM& vm);
431 boost::int32_t
toInt(
const as_value& val,
const VM& vm);