Package org.mozilla.javascript
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) boolean
true if the function has been declared like "!function() {}".(package private) boolean
true if the function has been declared like "var foo = function() {...}"(package private) String
(package private) int
(package private) int
(package private) boolean
(package private) int
private 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) InterpreterData
private 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) int
Get name of the function described by this script.int[]
Get array containing the line numbers that that can be passed toDebugFrame.onLineChange()
.int
Get number of declared parameters and local variables.int
Get number of declared parameters in the function.boolean
getParamOrVarConst
(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.int
private void
init()
boolean
Returns true if this is a function, false if it is a script.boolean
Returns true if this script or function were runtime-generated from JavaScript usingeval
function orFunction
orScript
constructors.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:
isTopLevel
in interfaceDebuggableScript
-
isFunction
public boolean isFunction()Description copied from interface:DebuggableScript
Returns true if this is a function, false if it is a script.- Specified by:
isFunction
in interfaceDebuggableScript
-
getFunctionName
Description copied from interface:DebuggableScript
Get name of the function described by this script. Return null or an empty string if this script is not a function.- Specified by:
getFunctionName
in interfaceDebuggableScript
-
getParamCount
public int getParamCount()Description copied from interface:DebuggableScript
Get number of declared parameters in the function. Return 0 if this script is not a function.- Specified by:
getParamCount
in interfaceDebuggableScript
- See Also:
-
getParamAndVarCount
public int getParamAndVarCount()Description copied from interface:DebuggableScript
Get number of declared parameters and local variables. Return number of declared global variables if this script is not a function.- Specified by:
getParamAndVarCount
in interfaceDebuggableScript
- See Also:
-
getParamOrVarName
Description copied from interface:DebuggableScript
Get name of a declared parameter or local variable.index
should 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:
getParamOrVarName
in interfaceDebuggableScript
-
getParamOrVarConst
public boolean getParamOrVarConst(int index) -
getSourceName
Description copied from interface:DebuggableScript
Get the name of the source (usually filename or URL) of the script.- Specified by:
getSourceName
in interfaceDebuggableScript
-
isGeneratedScript
public boolean isGeneratedScript()Description copied from interface:DebuggableScript
Returns true if this script or function were runtime-generated from JavaScript usingeval
function orFunction
orScript
constructors.- Specified by:
isGeneratedScript
in interfaceDebuggableScript
-
getLineNumbers
public int[] getLineNumbers()Description copied from interface:DebuggableScript
Get array containing the line numbers that that can be passed toDebugFrame.onLineChange()
. Note that line order in the resulting array is arbitrary- Specified by:
getLineNumbers
in interfaceDebuggableScript
-
getFunctionCount
public int getFunctionCount()- Specified by:
getFunctionCount
in interfaceDebuggableScript
-
getFunction
- Specified by:
getFunction
in interfaceDebuggableScript
-
getParent
- Specified by:
getParent
in interfaceDebuggableScript
-
icodeHashCode
public int icodeHashCode()
-