Class InterpreterData
java.lang.Object
org.mozilla.javascript.InterpreterData
- All Implemented Interfaces:
Serializable, DebuggableScript
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) boolean[](package private) String[](package private) booleantrue if the function has been declared like "!function() {}".(package private) booleantrue if the function has been declared like "var foo = function() {...}"(package private) String(package private) int(package private) int(package private) boolean(package private) intprivate int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) boolean(package private) boolean(package private) BigInteger[](package private) double[](package private) int[](package private) int(package private) byte[](package private) int(package private) int(package private) int(package private) int(package private) int(package private) String(package private) boolean(package private) InterpreterData[](package private) Object[](package private) String(package private) String[](package private) Object[](package private) int(package private) Object[](package private) UintMap(package private) InterpreterDataprivate static final long(package private) boolean -
Constructor Summary
ConstructorsConstructorDescriptionInterpreterData(int languageVersion, String sourceFile, String encodedSource, boolean isStrict) InterpreterData(InterpreterData parent) -
Method Summary
Modifier and TypeMethodDescriptiongetFunction(int index) intGet name of the function described by this script.int[]Get array containing the line numbers that that can be passed toDebugFrame.onLineChange().intGet number of declared parameters and local variables.intGet number of declared parameters in the function.booleangetParamOrVarConst(int index) getParamOrVarName(int index) Get name of a declared parameter or local variable.Get the name of the source (usually filename or URL) of the script.intprivate voidinit()booleanReturns true if this is a function, false if it is a script.booleanReturns true if this script or function were runtime-generated from JavaScript usingevalfunction orFunctionorScriptconstructors.boolean
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INITIAL_MAX_ICODE_LENGTH
static final int INITIAL_MAX_ICODE_LENGTH- See Also:
-
INITIAL_STRINGTABLE_SIZE
static final int INITIAL_STRINGTABLE_SIZE- See Also:
-
INITIAL_NUMBERTABLE_SIZE
static final int INITIAL_NUMBERTABLE_SIZE- See Also:
-
INITIAL_BIGINTTABLE_SIZE
static final int INITIAL_BIGINTTABLE_SIZE- See Also:
-
itsName
String itsName -
itsSourceFile
String itsSourceFile -
itsNeedsActivation
boolean itsNeedsActivation -
itsFunctionType
int itsFunctionType -
itsStringTable
String[] itsStringTable -
itsDoubleTable
double[] itsDoubleTable -
itsBigIntTable
BigInteger[] itsBigIntTable -
itsNestedFunctions
InterpreterData[] itsNestedFunctions -
itsRegExpLiterals
Object[] itsRegExpLiterals -
itsTemplateLiterals
Object[] itsTemplateLiterals -
itsICode
byte[] itsICode -
itsExceptionTable
int[] itsExceptionTable -
itsMaxVars
int itsMaxVars -
itsMaxLocals
int itsMaxLocals -
itsMaxStack
int itsMaxStack -
itsMaxFrameArray
int itsMaxFrameArray -
argNames
String[] argNames -
argIsConst
boolean[] argIsConst -
argCount
int argCount -
itsMaxCalleeArgs
int itsMaxCalleeArgs -
encodedSource
String encodedSource -
encodedSourceStart
int encodedSourceStart -
encodedSourceEnd
int encodedSourceEnd -
languageVersion
int languageVersion -
isStrict
boolean isStrict -
topLevel
boolean topLevel -
isES6Generator
boolean isES6Generator -
literalIds
Object[] literalIds -
longJumps
UintMap longJumps -
firstLinePC
int firstLinePC -
parentData
InterpreterData parentData -
evalScriptFlag
boolean evalScriptFlag -
icodeHashCode
private int icodeHashCode -
declaredAsVar
boolean declaredAsVartrue if the function has been declared like "var foo = function() {...}" -
declaredAsFunctionExpression
boolean declaredAsFunctionExpressiontrue if the function has been declared like "!function() {}".
-
-
Constructor Details
-
InterpreterData
-
InterpreterData
InterpreterData(InterpreterData parent)
-
-
Method Details
-
init
private void init() -
isTopLevel
public boolean isTopLevel()- Specified by:
isTopLevelin interfaceDebuggableScript
-
isFunction
public boolean isFunction()Description copied from interface:DebuggableScriptReturns true if this is a function, false if it is a script.- Specified by:
isFunctionin interfaceDebuggableScript
-
getFunctionName
Description copied from interface:DebuggableScriptGet name of the function described by this script. Return null or an empty string if this script is not a function.- Specified by:
getFunctionNamein interfaceDebuggableScript
-
getParamCount
public int getParamCount()Description copied from interface:DebuggableScriptGet number of declared parameters in the function. Return 0 if this script is not a function.- Specified by:
getParamCountin interfaceDebuggableScript- See Also:
-
getParamAndVarCount
public int getParamAndVarCount()Description copied from interface:DebuggableScriptGet number of declared parameters and local variables. Return number of declared global variables if this script is not a function.- Specified by:
getParamAndVarCountin interfaceDebuggableScript- See Also:
-
getParamOrVarName
Description copied from interface:DebuggableScriptGet name of a declared parameter or local variable.indexshould be less thenDebuggableScript.getParamAndVarCount(). Ifindex <, return the name of the corresponding parameter, otherwise return the name of variable. If this script is not function, return the name of the declared global variable.DebuggableScript.getParamCount()- Specified by:
getParamOrVarNamein interfaceDebuggableScript
-
getParamOrVarConst
public boolean getParamOrVarConst(int index) -
getSourceName
Description copied from interface:DebuggableScriptGet the name of the source (usually filename or URL) of the script.- Specified by:
getSourceNamein interfaceDebuggableScript
-
isGeneratedScript
public boolean isGeneratedScript()Description copied from interface:DebuggableScriptReturns true if this script or function were runtime-generated from JavaScript usingevalfunction orFunctionorScriptconstructors.- Specified by:
isGeneratedScriptin interfaceDebuggableScript
-
getLineNumbers
public int[] getLineNumbers()Description copied from interface:DebuggableScriptGet array containing the line numbers that that can be passed toDebugFrame.onLineChange(). Note that line order in the resulting array is arbitrary- Specified by:
getLineNumbersin interfaceDebuggableScript
-
getFunctionCount
public int getFunctionCount()- Specified by:
getFunctionCountin interfaceDebuggableScript
-
getFunction
- Specified by:
getFunctionin interfaceDebuggableScript
-
getParent
- Specified by:
getParentin interfaceDebuggableScript
-
icodeHashCode
public int icodeHashCode()
-