зеркало из https://github.com/mozilla/pjs.git
Patch from Attila Szegedi <szegedia@freemail.hu> to adress bug 264637 :
Reducing InterpretedFunction footprint
This commit is contained in:
Родитель
cc626c7883
Коммит
bf7c485bb4
|
@ -44,7 +44,6 @@ final class InterpretedFunction extends NativeFunction implements Script
|
|||
SecurityController securityController;
|
||||
Object securityDomain;
|
||||
Scriptable[] functionRegExps;
|
||||
boolean evalScriptFlag; // true if script corresponds to eval() code
|
||||
|
||||
private InterpretedFunction(InterpreterData idata,
|
||||
Object staticSecurityDomain)
|
||||
|
|
|
@ -2134,7 +2134,7 @@ public class Interpreter
|
|||
InterpretedFunction fn;
|
||||
fn = InterpretedFunction.createFunction(cx, scope, parent, index);
|
||||
ScriptRuntime.initFunction(cx, scope, fn, fn.idata.itsFunctionType,
|
||||
parent.evalScriptFlag);
|
||||
parent.idata.evalScriptFlag);
|
||||
}
|
||||
|
||||
static Object interpret(InterpretedFunction ifun,
|
||||
|
@ -3663,7 +3663,7 @@ switch (op) {
|
|||
} else {
|
||||
scope = callerScope;
|
||||
ScriptRuntime.initScript(fnOrScript, thisObj, cx, scope,
|
||||
fnOrScript.evalScriptFlag);
|
||||
fnOrScript.idata.evalScriptFlag);
|
||||
}
|
||||
|
||||
if (idata.itsNestedFunctions != null) {
|
||||
|
|
|
@ -118,6 +118,8 @@ final class InterpreterData implements Serializable, DebuggableScript
|
|||
|
||||
InterpreterData parentData;
|
||||
|
||||
boolean evalScriptFlag; // true if script corresponds to eval() code
|
||||
|
||||
public boolean isTopLevel()
|
||||
{
|
||||
return topLevel;
|
||||
|
|
|
@ -2201,7 +2201,7 @@ public class ScriptRuntime {
|
|||
// mode.
|
||||
Script script = cx.compileString((String)x, new Interpreter(),
|
||||
reporter, sourceName, 1, null);
|
||||
((InterpretedFunction)script).evalScriptFlag = true;
|
||||
((InterpretedFunction)script).idata.evalScriptFlag = true;
|
||||
|
||||
// if the compile fails, an error has been reported by the
|
||||
// compiler, but we need to stop execution to avoid
|
||||
|
|
Загрузка…
Ссылка в новой задаче