Package org.htmlunit.corejs.javascript
Class InterpreterData
- java.lang.Object
-
- org.htmlunit.corejs.javascript.InterpreterData
-
- All Implemented Interfaces:
java.io.Serializable,DebuggableScript
final class InterpreterData extends java.lang.Object implements java.io.Serializable, DebuggableScript
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intargCount(package private) boolean[]argIsConst(package private) java.lang.String[]argNames(package private) booleanargsHasRest(package private) booleandeclaredAsFunctionExpressiontrue if the function has been declared like "!function() {}".(package private) booleandeclaredAsVartrue if the function has been declared like "var foo = function() {...}"(package private) java.lang.StringencodedSource(package private) intencodedSourceEnd(package private) intencodedSourceStart(package private) booleanevalScriptFlag(package private) intfirstLinePCprivate inticodeHashCode(package private) static intINITIAL_BIGINTTABLE_SIZE(package private) static intINITIAL_MAX_ICODE_LENGTH(package private) static intINITIAL_NUMBERTABLE_SIZE(package private) static intINITIAL_STRINGTABLE_SIZE(package private) booleanisES6Generator(package private) booleanisStrict(package private) java.math.BigInteger[]itsBigIntTable(package private) double[]itsDoubleTable(package private) int[]itsExceptionTable(package private) intitsFunctionType(package private) byte[]itsICode(package private) intitsMaxCalleeArgs(package private) intitsMaxFrameArray(package private) intitsMaxLocals(package private) intitsMaxStack(package private) intitsMaxVars(package private) java.lang.StringitsName(package private) booleanitsNeedsActivation(package private) InterpreterData[]itsNestedFunctions(package private) java.lang.Object[]itsRegExpLiterals(package private) java.lang.StringitsSourceFile(package private) java.lang.String[]itsStringTable(package private) java.lang.Object[]itsTemplateLiterals(package private) intlanguageVersion(package private) java.lang.Object[]literalIds(package private) UintMaplongJumps(package private) InterpreterDataparentDataprivate static longserialVersionUID(package private) booleantopLevel
-
Constructor Summary
Constructors Constructor Description InterpreterData(int languageVersion, java.lang.String sourceFile, java.lang.String encodedSource, boolean isStrict)InterpreterData(InterpreterData parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DebuggableScriptgetFunction(int index)intgetFunctionCount()java.lang.StringgetFunctionName()Get name of the function described by this script.int[]getLineNumbers()Get array containing the line numbers that that can be passed toDebugFrame.onLineChange().intgetParamAndVarCount()Get number of declared parameters and local variables.intgetParamCount()Get number of declared parameters in the function.booleangetParamOrVarConst(int index)java.lang.StringgetParamOrVarName(int index)Get name of a declared parameter or local variable.DebuggableScriptgetParent()java.lang.StringgetSourceName()Get the name of the source (usually filename or URL) of the script.inticodeHashCode()private voidinit()booleanisFunction()Returns true if this is a function, false if it is a script.booleanisGeneratedScript()Returns true if this script or function were runtime-generated from JavaScript usingevalfunction orFunctionorScriptconstructors.booleanisTopLevel()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
INITIAL_MAX_ICODE_LENGTH
static final int INITIAL_MAX_ICODE_LENGTH
- See Also:
- Constant Field Values
-
INITIAL_STRINGTABLE_SIZE
static final int INITIAL_STRINGTABLE_SIZE
- See Also:
- Constant Field Values
-
INITIAL_NUMBERTABLE_SIZE
static final int INITIAL_NUMBERTABLE_SIZE
- See Also:
- Constant Field Values
-
INITIAL_BIGINTTABLE_SIZE
static final int INITIAL_BIGINTTABLE_SIZE
- See Also:
- Constant Field Values
-
itsName
java.lang.String itsName
-
itsSourceFile
java.lang.String itsSourceFile
-
itsNeedsActivation
boolean itsNeedsActivation
-
itsFunctionType
int itsFunctionType
-
itsStringTable
java.lang.String[] itsStringTable
-
itsDoubleTable
double[] itsDoubleTable
-
itsBigIntTable
java.math.BigInteger[] itsBigIntTable
-
itsNestedFunctions
InterpreterData[] itsNestedFunctions
-
itsRegExpLiterals
java.lang.Object[] itsRegExpLiterals
-
itsTemplateLiterals
java.lang.Object[] itsTemplateLiterals
-
itsICode
byte[] itsICode
-
itsExceptionTable
int[] itsExceptionTable
-
itsMaxVars
int itsMaxVars
-
itsMaxLocals
int itsMaxLocals
-
itsMaxStack
int itsMaxStack
-
itsMaxFrameArray
int itsMaxFrameArray
-
argNames
java.lang.String[] argNames
-
argIsConst
boolean[] argIsConst
-
argCount
int argCount
-
argsHasRest
boolean argsHasRest
-
itsMaxCalleeArgs
int itsMaxCalleeArgs
-
encodedSource
java.lang.String encodedSource
-
encodedSourceStart
int encodedSourceStart
-
encodedSourceEnd
int encodedSourceEnd
-
languageVersion
int languageVersion
-
isStrict
boolean isStrict
-
topLevel
boolean topLevel
-
isES6Generator
boolean isES6Generator
-
literalIds
java.lang.Object[] literalIds
-
longJumps
UintMap longJumps
-
firstLinePC
int firstLinePC
-
parentData
InterpreterData parentData
-
evalScriptFlag
boolean evalScriptFlag
-
icodeHashCode
private int icodeHashCode
-
declaredAsVar
boolean declaredAsVar
true if the function has been declared like "var foo = function() {...}"
-
declaredAsFunctionExpression
boolean declaredAsFunctionExpression
true if the function has been declared like "!function() {}".
-
-
Constructor Detail
-
InterpreterData
InterpreterData(int languageVersion, java.lang.String sourceFile, java.lang.String encodedSource, boolean isStrict)
-
InterpreterData
InterpreterData(InterpreterData parent)
-
-
Method Detail
-
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
public java.lang.String 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:
DebuggableScript.getParamAndVarCount(),DebuggableScript.getParamOrVarName(int index)
-
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:
DebuggableScript.getParamCount(),DebuggableScript.getParamOrVarName(int index)
-
getParamOrVarName
public java.lang.String getParamOrVarName(int index)
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
public java.lang.String 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
public DebuggableScript getFunction(int index)
- Specified by:
getFunctionin interfaceDebuggableScript
-
getParent
public DebuggableScript getParent()
- Specified by:
getParentin interfaceDebuggableScript
-
icodeHashCode
public int icodeHashCode()
-
-