2010-06-28 17:20:45 +00:00
|
|
|
|
|
|
|
#include "runtime.hpp"
|
|
|
|
|
|
|
|
namespace Interpreter
|
|
|
|
{
|
2010-06-28 18:46:15 +00:00
|
|
|
Runtime::Runtime (Context& context) : mContext (context), mCode (0), mPC (0) {}
|
|
|
|
|
|
|
|
int Runtime::getPC() const
|
|
|
|
{
|
|
|
|
return mPC;
|
|
|
|
}
|
|
|
|
|
2010-06-28 17:20:45 +00:00
|
|
|
void Runtime::configure (const Interpreter::Type_Code *code, int codeSize)
|
|
|
|
{
|
|
|
|
clear();
|
|
|
|
|
|
|
|
mCode = code;
|
|
|
|
mCodeSize = codeSize;
|
2010-06-28 18:46:15 +00:00
|
|
|
mPC = 0;
|
2010-06-28 17:20:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Runtime::clear()
|
|
|
|
{
|
|
|
|
mCode = 0;
|
|
|
|
mCodeSize = 0;
|
|
|
|
}
|
2010-06-28 18:46:15 +00:00
|
|
|
|
|
|
|
void Runtime::setPC (int PC)
|
|
|
|
{
|
|
|
|
mPC = PC;
|
|
|
|
}
|
2010-06-28 17:20:45 +00:00
|
|
|
}
|
|
|
|
|