Removed setGlobalObject(), as only the interpreter should be mucking with it after initial creation. Added getWorld(), made getICode() out of line, removed mICode since it's part of Activation record.

This commit is contained in:
beard%netscape.com 2000-04-29 14:44:42 +00:00
parent 7d9e844cad
commit a5df22b0a6
2 changed files with 12 additions and 42 deletions

View File

@ -47,26 +47,12 @@ namespace Interpreter {
explicit Context(World& world, JSScope* aGlobal)
: mWorld(world), mGlobal(aGlobal), mLinkage(0), mActivation(0) {}
JSScope* getGlobalObject() { return mGlobal; }
JSScope* setGlobalObject(JSScope* aGlobal)
{
JSScope* oldGlobal = mGlobal;
mGlobal = aGlobal;
return oldGlobal;
}
InstructionIterator getPC()
{
return mPc;
}
World& getWorld() { return mWorld; }
JSScope* getGlobalObject() { return mGlobal; }
InstructionIterator getPC() { return mPC; }
JSValues &getRegisters();
ICodeModule *getICode()
{
return mICode;
}
JSValues& getRegisters();
ICodeModule* getICode();
class Listener {
public:
@ -96,8 +82,7 @@ namespace Interpreter {
Linkage* mLinkage;
std::vector<Listener*> mListeners;
Activation* mActivation;
ICodeModule *mICode;
InstructionIterator mPc;
InstructionIterator mPC;
}; /* class Context */

View File

@ -47,26 +47,12 @@ namespace Interpreter {
explicit Context(World& world, JSScope* aGlobal)
: mWorld(world), mGlobal(aGlobal), mLinkage(0), mActivation(0) {}
JSScope* getGlobalObject() { return mGlobal; }
JSScope* setGlobalObject(JSScope* aGlobal)
{
JSScope* oldGlobal = mGlobal;
mGlobal = aGlobal;
return oldGlobal;
}
InstructionIterator getPC()
{
return mPc;
}
World& getWorld() { return mWorld; }
JSScope* getGlobalObject() { return mGlobal; }
InstructionIterator getPC() { return mPC; }
JSValues &getRegisters();
ICodeModule *getICode()
{
return mICode;
}
JSValues& getRegisters();
ICodeModule* getICode();
class Listener {
public:
@ -96,8 +82,7 @@ namespace Interpreter {
Linkage* mLinkage;
std::vector<Listener*> mListeners;
Activation* mActivation;
ICodeModule *mICode;
InstructionIterator mPc;
InstructionIterator mPC;
}; /* class Context */