зеркало из https://github.com/mozilla/gecko-dev.git
Fixed instance member resolution & superclass slot layout.
This commit is contained in:
Родитель
189cc94548
Коммит
a635daa6de
|
@ -239,11 +239,19 @@ js2val load(JS2Metadata *meta, const js2val /* thisValue */, js2val argv[], uint
|
||||||
// load happens into the top frame.
|
// load happens into the top frame.
|
||||||
if (argc) {
|
if (argc) {
|
||||||
// Save off the current top frame and root it.
|
// Save off the current top frame and root it.
|
||||||
Frame *curTop = meta->env.getTopFrame();
|
Frame *curTopFrame = meta->env.getTopFrame();
|
||||||
JS2Object::RootIterator ri = JS2Object::addRoot(&curTop);
|
JS2Object::RootIterator ri = JS2Object::addRoot(&curTopFrame);
|
||||||
meta->env.setTopFrame(meta->env.getPackageOrGlobalFrame());
|
meta->env.setTopFrame(meta->env.getPackageOrGlobalFrame());
|
||||||
js2val result = meta->readEvalFile(*meta->toString(argv[0]));
|
js2val result = JS2VAL_UNDEFINED;
|
||||||
meta->env.setTopFrame(curTop);
|
try {
|
||||||
|
result = meta->readEvalFile(*meta->toString(argv[0]));
|
||||||
|
}
|
||||||
|
catch (Exception x) {
|
||||||
|
meta->env.setTopFrame(curTopFrame);
|
||||||
|
JS2Object::removeRoot(ri);
|
||||||
|
throw x;
|
||||||
|
}
|
||||||
|
meta->env.setTopFrame(curTopFrame);
|
||||||
JS2Object::removeRoot(ri);
|
JS2Object::removeRoot(ri);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,17 +66,19 @@ namespace MetaData {
|
||||||
// Begin execution of a bytecodeContainer
|
// Begin execution of a bytecodeContainer
|
||||||
js2val JS2Engine::interpret(Phase execPhase, BytecodeContainer *targetbCon)
|
js2val JS2Engine::interpret(Phase execPhase, BytecodeContainer *targetbCon)
|
||||||
{
|
{
|
||||||
ActivationFrame *f = activationStackTop;
|
|
||||||
jsr(execPhase, targetbCon);
|
jsr(execPhase, targetbCon);
|
||||||
|
ActivationFrame *f = activationStackTop;
|
||||||
js2val result;
|
js2val result;
|
||||||
try {
|
try {
|
||||||
result = interpreterLoop();
|
result = interpreterLoop();
|
||||||
}
|
}
|
||||||
catch (Exception &jsx) {
|
catch (Exception &jsx) {
|
||||||
activationStackTop = f;
|
activationStackTop = f;
|
||||||
|
rts();
|
||||||
throw jsx;
|
throw jsx;
|
||||||
}
|
}
|
||||||
activationStackTop = f;
|
activationStackTop = f; // when execution falls 'off the bottom' an rts hasn't occurred
|
||||||
|
// so the activation stack is off by 1.
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче