зеркало из 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.
|
||||
if (argc) {
|
||||
// Save off the current top frame and root it.
|
||||
Frame *curTop = meta->env.getTopFrame();
|
||||
JS2Object::RootIterator ri = JS2Object::addRoot(&curTop);
|
||||
Frame *curTopFrame = meta->env.getTopFrame();
|
||||
JS2Object::RootIterator ri = JS2Object::addRoot(&curTopFrame);
|
||||
meta->env.setTopFrame(meta->env.getPackageOrGlobalFrame());
|
||||
js2val result = meta->readEvalFile(*meta->toString(argv[0]));
|
||||
meta->env.setTopFrame(curTop);
|
||||
js2val result = JS2VAL_UNDEFINED;
|
||||
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);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -66,17 +66,19 @@ namespace MetaData {
|
|||
// Begin execution of a bytecodeContainer
|
||||
js2val JS2Engine::interpret(Phase execPhase, BytecodeContainer *targetbCon)
|
||||
{
|
||||
ActivationFrame *f = activationStackTop;
|
||||
jsr(execPhase, targetbCon);
|
||||
ActivationFrame *f = activationStackTop;
|
||||
js2val result;
|
||||
try {
|
||||
result = interpreterLoop();
|
||||
}
|
||||
catch (Exception &jsx) {
|
||||
activationStackTop = f;
|
||||
rts();
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче