JSNamespace -> JSScope.

This commit is contained in:
beard%netscape.com 2000-04-29 14:14:28 +00:00
parent e9c3fbc2e1
commit 6f9510ebc6
4 changed files with 22 additions and 24 deletions

View File

@ -44,16 +44,16 @@ namespace Interpreter {
class Context : public gc_base {
public:
explicit Context(World& world, JSNamespace* aGlobal)
explicit Context(World& world, JSScope* aGlobal)
: mWorld(world), mGlobal(aGlobal), mLinkage(0), mActivation(0) {}
JSNamespace* getGlobalObject() { return mGlobal; }
JSScope* getGlobalObject() { return mGlobal; }
JSNamespace* setGlobalObject(JSNamespace* aGlobal)
JSScope* setGlobalObject(JSScope* aGlobal)
{
JSNamespace* t = mGlobal;
JSScope* oldGlobal = mGlobal;
mGlobal = aGlobal;
return t;
return oldGlobal;
}
InstructionIterator getPC()
@ -92,7 +92,7 @@ namespace Interpreter {
private:
World& mWorld;
JSNamespace* mGlobal;
JSScope* mGlobal;
Linkage* mLinkage;
std::vector<Listener*> mListeners;
Activation* mActivation;

View File

@ -308,7 +308,7 @@ static void testICG(World &world)
static float64 testFunctionCall(World &world, float64 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
Tracer t;
cx.addListener(&t);
@ -361,7 +361,7 @@ static float64 testFunctionCall(World &world, float64 n)
static float64 testFactorial(World &world, float64 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
// generate code for factorial, and interpret it.
uint32 position = 0;
@ -426,7 +426,7 @@ static float64 testFactorial(World &world, float64 n)
static float64 testObjects(World &world, int32 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
// create some objects, put some properties, and retrieve them.
uint32 position = 0;
@ -492,7 +492,7 @@ static float64 testObjects(World &world, int32 n)
static float64 testProto(World &world, int32 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
Tracer t;
@ -547,7 +547,7 @@ static float64 testProto(World &world, int32 n)
stdOut << initCG;
// run initialization code.
JSValues args(1);
JSValues args;
cx.interpret(initCode, args);
// objects now exist, do real prototype chain manipulation.
@ -565,7 +565,6 @@ static float64 testProto(World &world, int32 n)
ICodeModule* callCode = callCG.complete();
// call the increment method some number of times.
args[0] = JSValue(globalObject);
while (n-- > 0)
(void) cx.interpret(callCode, args);

View File

@ -44,16 +44,16 @@ namespace Interpreter {
class Context : public gc_base {
public:
explicit Context(World& world, JSNamespace* aGlobal)
explicit Context(World& world, JSScope* aGlobal)
: mWorld(world), mGlobal(aGlobal), mLinkage(0), mActivation(0) {}
JSNamespace* getGlobalObject() { return mGlobal; }
JSScope* getGlobalObject() { return mGlobal; }
JSNamespace* setGlobalObject(JSNamespace* aGlobal)
JSScope* setGlobalObject(JSScope* aGlobal)
{
JSNamespace* t = mGlobal;
JSScope* oldGlobal = mGlobal;
mGlobal = aGlobal;
return t;
return oldGlobal;
}
InstructionIterator getPC()
@ -92,7 +92,7 @@ namespace Interpreter {
private:
World& mWorld;
JSNamespace* mGlobal;
JSScope* mGlobal;
Linkage* mLinkage;
std::vector<Listener*> mListeners;
Activation* mActivation;

View File

@ -308,7 +308,7 @@ static void testICG(World &world)
static float64 testFunctionCall(World &world, float64 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
Tracer t;
cx.addListener(&t);
@ -361,7 +361,7 @@ static float64 testFunctionCall(World &world, float64 n)
static float64 testFactorial(World &world, float64 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
// generate code for factorial, and interpret it.
uint32 position = 0;
@ -426,7 +426,7 @@ static float64 testFactorial(World &world, float64 n)
static float64 testObjects(World &world, int32 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
// create some objects, put some properties, and retrieve them.
uint32 position = 0;
@ -492,7 +492,7 @@ static float64 testObjects(World &world, int32 n)
static float64 testProto(World &world, int32 n)
{
JSNamespace glob;
JSScope glob;
Context cx(world, &glob);
Tracer t;
@ -547,7 +547,7 @@ static float64 testProto(World &world, int32 n)
stdOut << initCG;
// run initialization code.
JSValues args(1);
JSValues args;
cx.interpret(initCode, args);
// objects now exist, do real prototype chain manipulation.
@ -565,7 +565,6 @@ static float64 testProto(World &world, int32 n)
ICodeModule* callCode = callCG.complete();
// call the increment method some number of times.
args[0] = JSValue(globalObject);
while (n-- > 0)
(void) cx.interpret(callCode, args);