зеркало из https://github.com/mozilla/pjs.git
Resolving bug 256339: interpreter does not recurse across calls to interpreted functions and scripts and instead uses explicit State object to store JS frame information. It removes the limit on maximum recursion depth in scripts.
This commit is contained in:
Родитель
57b6bbb6ec
Коммит
0fe0aba4b1
|
@ -2163,15 +2163,6 @@ public class Context
|
|||
{
|
||||
}
|
||||
|
||||
final void addInstructionCount(int n)
|
||||
{
|
||||
instructionCount += n;
|
||||
if (instructionCount > instructionThreshold) {
|
||||
observeInstructionCount(instructionCount);
|
||||
instructionCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public GeneratedClassLoader createClassLoader(ClassLoader parent)
|
||||
{
|
||||
return new DefiningClassLoader(parent);
|
||||
|
@ -2428,7 +2419,7 @@ public class Context
|
|||
Context cx = getCurrentContext();
|
||||
if (cx == null)
|
||||
return null;
|
||||
if (cx.interpreterData != null) {
|
||||
if (cx.interpreterLineCounting != null) {
|
||||
return Interpreter.getSourcePositionFromStack(cx, linep);
|
||||
}
|
||||
/**
|
||||
|
@ -2636,8 +2627,7 @@ public class Context
|
|||
Hashtable activationNames;
|
||||
|
||||
// For the interpreter to indicate line/source for error reports.
|
||||
int interpreterLineIndex;
|
||||
InterpreterData interpreterData;
|
||||
Object interpreterLineCounting;
|
||||
|
||||
// For instruction counting (interpreter only)
|
||||
int instructionCount;
|
||||
|
|
|
@ -137,11 +137,7 @@ final class InterpretedFunction extends NativeFunction implements Script
|
|||
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
|
||||
Object[] args)
|
||||
{
|
||||
if (!ScriptRuntime.hasTopCall(cx)) {
|
||||
return ScriptRuntime.doTopCall(this, cx, scope, thisObj, args);
|
||||
}
|
||||
return Interpreter.interpret(cx, scope, thisObj, args, null,
|
||||
0, args.length, this);
|
||||
return Interpreter.interpret(this, cx, scope, thisObj, args);
|
||||
}
|
||||
|
||||
public Object exec(Context cx, Scriptable scope)
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче