Fixed compile errors
git-svn-id: svn://10.0.0.236/trunk@143498 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -67,7 +67,7 @@ namespace MetaData {
|
||||
js2val JS2Engine::interpret(Phase execPhase, BytecodeContainer *targetbCon, Environment *env)
|
||||
{
|
||||
packageFrame = env->getPackageFrame();
|
||||
jsr(execPhase, targetbCon, sp - execStack, JS2VAL_VOID, env);
|
||||
jsr(execPhase, targetbCon, sp - execStack, JS2VAL_VOID, env, NULL);
|
||||
ActivationFrame *f = activationStackTop;
|
||||
js2val result;
|
||||
try {
|
||||
@@ -1028,7 +1028,7 @@ namespace MetaData {
|
||||
|
||||
// Save current engine state (pc, environment top) and
|
||||
// jump to start of new bytecodeContainer
|
||||
void JS2Engine::jsr(Phase execPhase, BytecodeContainer *new_bCon, uint32 stackBase, js2val returnVal, Environment *env)
|
||||
void JS2Engine::jsr(Phase execPhase, BytecodeContainer *new_bCon, uint32 stackBase, js2val returnVal, Environment *env, ParameterFrame *pFrame)
|
||||
{
|
||||
if (activationStackTop >= (activationStack + MAX_ACTIVATION_STACK))
|
||||
meta->reportError(Exception::internalError, "out of activation stack", meta->engine->errorPos());
|
||||
@@ -1042,6 +1042,7 @@ namespace MetaData {
|
||||
activationStackTop->topFrame = env->getTopFrame(); // remember how big the new env. is supposed to be so that local frames don't accumulate
|
||||
activationStackTop->localFrame = localFrame;
|
||||
activationStackTop->parameterFrame = parameterFrame;
|
||||
// if (pFrame && pFrame->)
|
||||
activationStackTop++;
|
||||
if (new_bCon) {
|
||||
bCon = new_bCon;
|
||||
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
NonWithFrame *localFrame;
|
||||
ParameterFrame *parameterFrame;
|
||||
};
|
||||
void jsr(Phase execPhase, BytecodeContainer *bCon, uint32 stackBase, js2val returnVal, Environment *env);
|
||||
void jsr(Phase execPhase, BytecodeContainer *bCon, uint32 stackBase, js2val returnVal, Environment *env, ParameterFrame *pFrame);
|
||||
bool activationStackEmpty() { return (activationStackTop == activationStack); }
|
||||
void rts();
|
||||
ActivationFrame *activationStack;
|
||||
|
||||
@@ -3593,7 +3593,7 @@ rescan:
|
||||
return argv[0];
|
||||
// need to reset the environment to the one in operation when eval was called so
|
||||
// that eval code can affect the apppropriate scopes.
|
||||
meta->engine->jsr(meta->engine->phase, NULL, meta->engine->sp - meta->engine->execStack, JS2VAL_VOID, meta->engine->activationStackTop[-1].env);
|
||||
meta->engine->jsr(meta->engine->phase, NULL, meta->engine->sp - meta->engine->execStack, JS2VAL_VOID, meta->engine->activationStackTop[-1].env, NULL);
|
||||
// meta->engine->localFrame = meta->engine->activationStackTop[-1].localFrame;
|
||||
js2val result = meta->readEvalString(*meta->toString(argv[0]), widenCString("Eval Source"));
|
||||
meta->engine->rts();
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
baseVal = OBJECT_TO_JS2VAL(new (meta) SimpleInstance(meta, protoVal, meta->objectType(protoVal)));
|
||||
pFrame->thisObject = baseVal;
|
||||
pFrame->assignArguments(meta, obj, base(argCount), argCount, length);
|
||||
jsr(phase, fWrap->bCon, base(argCount + 1) - execStack, baseVal, fWrap->env); // seems out of order, but we need to catch the current top frame
|
||||
jsr(phase, fWrap->bCon, base(argCount + 1) - execStack, baseVal, fWrap->env, pFrame);
|
||||
meta->env->addFrame(pFrame);
|
||||
parameterFrame = pFrame;
|
||||
pFrame = NULL;
|
||||
@@ -132,7 +132,7 @@ doCall:
|
||||
push(JS2VAL_UNDEFINED);
|
||||
argCount++;
|
||||
}
|
||||
jsr(phase, NULL, base(argCount + 2) - execStack, JS2VAL_VOID, fWrap->env);
|
||||
jsr(phase, NULL, base(argCount + 2) - execStack, JS2VAL_VOID, fWrap->env, NULL);
|
||||
if (fWrap->alien)
|
||||
a = fWrap->alien(meta, fInst, a, base(argCount), argc);
|
||||
else
|
||||
@@ -147,7 +147,7 @@ doCall:
|
||||
pFrame->thisObject = a;
|
||||
// XXX (use fWrap->compileFrame->signature)
|
||||
pFrame->assignArguments(meta, fObj, base(argCount), argCount, length);
|
||||
jsr(phase, fWrap->bCon, base(argCount + 2) - execStack, JS2VAL_VOID, fWrap->env);
|
||||
jsr(phase, fWrap->bCon, base(argCount + 2) - execStack, JS2VAL_VOID, fWrap->env, pFrame);
|
||||
if (fInst->isMethodClosure)
|
||||
meta->env->addFrame(meta->objectType(a));
|
||||
meta->env->addFrame(pFrame);
|
||||
@@ -155,7 +155,7 @@ doCall:
|
||||
pFrame = NULL;
|
||||
}
|
||||
else {
|
||||
jsr(phase, fWrap->bCon, base(argCount + 2) - execStack, JS2VAL_VOID, fWrap->env);
|
||||
jsr(phase, fWrap->bCon, base(argCount + 2) - execStack, JS2VAL_VOID, fWrap->env, pFrame);
|
||||
// XXX constructing a parameterFrame only for the purpose of holding the 'this'
|
||||
// need to find a more efficient way of stashing 'this'
|
||||
// used to be : "meta->env->addFrame(fWrap->compileFrame->prototype);"
|
||||
|
||||
Reference in New Issue
Block a user