From a5df22b0a6418d8ed1b788f46f0cb4fc17f76fa6 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Sat, 29 Apr 2000 14:44:42 +0000 Subject: [PATCH] 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. --- js/js2/interpreter.h | 27 ++++++--------------------- js2/src/interpreter.h | 27 ++++++--------------------- 2 files changed, 12 insertions(+), 42 deletions(-) diff --git a/js/js2/interpreter.h b/js/js2/interpreter.h index 953b88b0fcbb..92567f5dd26b 100644 --- a/js/js2/interpreter.h +++ b/js/js2/interpreter.h @@ -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 mListeners; Activation* mActivation; - ICodeModule *mICode; - InstructionIterator mPc; + InstructionIterator mPC; }; /* class Context */ diff --git a/js2/src/interpreter.h b/js2/src/interpreter.h index 953b88b0fcbb..92567f5dd26b 100644 --- a/js2/src/interpreter.h +++ b/js2/src/interpreter.h @@ -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 mListeners; Activation* mActivation; - ICodeModule *mICode; - InstructionIterator mPc; + InstructionIterator mPC; }; /* class Context */