mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
JSNamespace -> JSScope.
This commit is contained in:
parent
e9c3fbc2e1
commit
6f9510ebc6
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user