Merged JSMap & JSObject. Introduced JSNamespace.

git-svn-id: svn://10.0.0.236/trunk@67576 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
beard%netscape.com
2000-04-28 23:04:43 +00:00
parent 10e15432a8
commit d8d71120b0
8 changed files with 134 additions and 90 deletions

View File

@@ -272,7 +272,7 @@ static void testICG(World &world)
static float64 testFunctionCall(World &world, float64 n)
{
JSObject glob;
JSNamespace glob;
Context cx(world, &glob);
Tracer t;
cx.addListener(&t);
@@ -325,7 +325,7 @@ static float64 testFunctionCall(World &world, float64 n)
static float64 testFactorial(World &world, float64 n)
{
JSObject glob;
JSNamespace glob;
Context cx(world, &glob);
// generate code for factorial, and interpret it.
uint32 position = 0;
@@ -390,7 +390,7 @@ static float64 testFactorial(World &world, float64 n)
static float64 testObjects(World &world, int32 n)
{
JSObject glob;
JSNamespace glob;
Context cx(world, &glob);
// create some objects, put some properties, and retrieve them.
uint32 position = 0;
@@ -456,7 +456,7 @@ static float64 testObjects(World &world, int32 n)
static float64 testProto(World &world, int32 n)
{
JSObject glob;
JSNamespace glob;
Context cx(world, &glob);
Tracer t;
@@ -515,8 +515,8 @@ static float64 testProto(World &world, int32 n)
cx.interpret(initCode, args);
// objects now exist, do real prototype chain manipulation.
JSObject* globalObject = glob.getProperty(global).object;
globalObject->setPrototype(glob.getProperty(proto).object);
JSObject* globalObject = glob.getVariable(global).object;
globalObject->setPrototype(glob.getVariable(proto).object);
// generate call to global.increment()
ICodeGenerator callCG;
@@ -533,7 +533,7 @@ static float64 testProto(World &world, int32 n)
while (n-- > 0)
(void) cx.interpret(callCode, args);
JSValue result = glob.getProperty(global).object->getProperty(counter);
JSValue result = glob.getVariable(global).object->getProperty(counter);
stdOut << "result = " << result.f64 << "\n";