I removed InterpretedFunction.itsClosure as it was effectively used only itsClosure != null test and the effect can be done via setting InterpretedFunction.useDynamicScope to false.

This commit is contained in:
igor%mir2.org 2002-12-12 10:46:52 +00:00
Родитель 4b0f00697f
Коммит f4cfc98e4d
2 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -62,7 +62,6 @@ final class InterpretedFunction extends NativeFunction
}
InterpreterData itsData;
Scriptable itsClosure;
boolean itsUseDynamicScope;
}

Просмотреть файл

@ -1598,9 +1598,7 @@ public class Interpreter {
if (idata.itsFunctionType != 0) {
InterpretedFunction f = (InterpretedFunction)fnOrScript;
if (f.itsClosure != null) {
scope = f.itsClosure;
} else if (!f.itsUseDynamicScope) {
if (!f.itsUseDynamicScope) {
scope = fnOrScript.getParentScope();
}
@ -2442,7 +2440,7 @@ public class Interpreter {
InterpreterData closureData = idata.itsNestedFunctions[i];
InterpretedFunction closure = createFunction(cx, scope, closureData,
idata.itsFromEvalCode);
closure.itsClosure = scope;
closure.itsUseDynamicScope = false;
stack[++stackTop] = closure;
pc += 2;
break;