Class CodeStream
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.codegen.CodeStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionintbyte[]intintintintstatic FieldBinding[]static final intintintintintintint[]static final intintintint[]intintbooleanstatic final CompilationResultstatic final CompilationResultintintintprotected longboolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId) voidaaload()voidaastore()voidvoidaddDefinitelyAssignedVariables(Scope scope, int initStateIndex) voidaddLabel(BranchLabel aLabel) voidaddVariable(LocalVariableBinding localBinding) voidaddVisibleLocalVariable(LocalVariableBinding localBinding) voidaload(int iArg) voidaload_0()voidaload_1()voidaload_2()voidaload_3()voidanewarray(TypeBinding typeBinding) voidareturn()voidarrayAt(int typeBindingID) voidarrayAtPut(int elementTypeID, boolean valueRequired) voidvoidastore(int iArg) voidastore_0()voidastore_1()voidastore_2()voidastore_3()voidathrow()voidbaload()voidbastore()voidbipush(byte b) voidcaload()voidcastore()voidcheckcast(int baseId) voidcheckcast(TypeReference typeReference, TypeBinding typeBinding, int currentPosition) voidcheckcast(TypeBinding typeBinding) voidvoidd2f()voidd2i()voidd2l()voiddadd()voiddaload()voiddastore()voiddcmpg()voiddcmpl()voiddconst_0()voiddconst_1()voidddiv()voiddload(int iArg) voiddload_0()voiddload_1()voiddload_2()voiddload_3()voiddmul()voiddneg()voiddrem()voiddreturn()voiddstore(int iArg) voiddstore_0()voiddstore_1()voiddstore_2()voiddstore_3()voiddsub()voiddup()voiddup_x1()voiddup_x2()voiddup2()voiddup2_x1()voiddup2_x2()voidexitUserScope(BlockScope currentScope) voidexitUserScope(BlockScope currentScope, Predicate<LocalVariableBinding> condition) voidf2d()voidf2i()voidf2l()voidfadd()voidfaload()voidfastore()voidfcmpg()voidfcmpl()voidfconst_0()voidfconst_1()voidfconst_2()voidfdiv()voidfieldAccess(byte opcode, FieldBinding fieldBinding, TypeBinding declaringClass) voidfload(int iArg) voidfload_0()voidfload_1()voidfload_2()voidfload_3()voidfmul()voidfneg()voidfrem()voidfreturn()voidfstore(int iArg) voidfstore_0()voidfstore_1()voidfstore_2()voidfstore_3()voidfsub()voidgenerateBoxingConversion(int unboxedTypeID) voidgenerateClassLiteralAccessForType(Scope scope, TypeBinding accessedType, FieldBinding syntheticFieldBinding) Macro for building a class descriptor objectfinal voidgenerateCodeAttributeForProblemMethod(String problemMessage) This method generates the code attribute bytecodevoidgenerateConstant(Constant constant, int implicitConversionCode) voidgenerateEmulatedReadAccessForField(FieldBinding fieldBinding) voidgenerateEmulatedWriteAccessForField(FieldBinding fieldBinding) voidgenerateEmulationForConstructor(Scope scope, MethodBinding methodBinding) voidgenerateEmulationForField(FieldBinding fieldBinding) voidgenerateEmulationForMethod(Scope scope, MethodBinding methodBinding) voidgenerateImplicitConversion(int implicitConversionCode) Generates the sequence of instructions which will perform the conversion of the expression on the stack into a different type (e.g.voidgenerateInlinedValue(boolean inlinedValue) voidgenerateInlinedValue(byte inlinedValue) voidgenerateInlinedValue(char inlinedValue) voidgenerateInlinedValue(double inlinedValue) voidgenerateInlinedValue(float inlinedValue) voidgenerateInlinedValue(int inlinedValue) voidgenerateInlinedValue(long inlinedValue) voidgenerateInlinedValue(short inlinedValue) voidgenerateOuterAccess(Object[] mappingSequence, ASTNode invocationSite, Binding target, Scope scope) voidgenerateReturnBytecode(Expression expression) voidgenerateStringConcatenationAppend(BlockScope blockScope, Expression oper1, Expression oper2) The equivalent code performs a string conversion:voidgenerateSyntheticBodyForArrayClone(SyntheticMethodBinding methodBinding) voidgenerateSyntheticBodyForArrayConstructor(SyntheticMethodBinding methodBinding) voidgenerateSyntheticBodyForConstructorAccess(SyntheticMethodBinding accessBinding) voidgenerateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding methodBinding, SyntheticMethodBinding[] syntheticMethodBindings) This is intended to match what javac generates.voidvoidgenerateSyntheticBodyForEnumValueOf(SyntheticMethodBinding methodBinding) voidgenerateSyntheticBodyForEnumValues(SyntheticMethodBinding methodBinding) voidgenerateSyntheticBodyForFactoryMethod(SyntheticMethodBinding methodBinding) voidvoidvoidgenerateSyntheticBodyForMethodAccess(SyntheticMethodBinding accessMethod) voidgenerateSyntheticBodyForRecordCanonicalConstructor(SyntheticMethodBinding canonConstructor) voidgenerateSyntheticBodyForRecordEquals(SyntheticMethodBinding methodBinding, int index) voidgenerateSyntheticBodyForRecordHashCode(SyntheticMethodBinding methodBinding, int index) voidgenerateSyntheticBodyForRecordToString(SyntheticMethodBinding methodBinding, int index) voidgenerateSyntheticBodyForSwitchTable(SyntheticMethodBinding methodBinding) voidgenerateSyntheticEnclosingInstanceValues(BlockScope currentScope, ReferenceBinding targetType, Expression enclosingInstance, ASTNode invocationSite) Code responsible to generate the suitable code to supply values for the synthetic enclosing instance arguments of a constructor invocation of a nested type.voidgenerateSyntheticOuterArgumentValues(BlockScope currentScope, ReferenceBinding targetType, ASTNode invocationSite) Code responsible to generate the suitable code to supply values for the synthetic outer local variable arguments of a constructor invocation of a nested type.voidgenerateUnboxingConversion(int unboxedTypeID) voidgenerateWideRevertedConditionalBranch(byte revertedOpcode, BranchLabel wideTarget) voidgetBaseTypeValue(int baseTypeID) static TypeBindinggetConstantPoolDeclaringClass(Scope currentScope, FieldBinding codegenBinding, TypeBinding actualReceiverType, boolean isImplicitThisReceiver) Returns the type that should be substituted to original binding declaring class as the proper receiver typestatic TypeBindinggetConstantPoolDeclaringClass(Scope currentScope, MethodBinding codegenBinding, TypeBinding actualReceiverType, boolean isImplicitThisReceiver) Returns the type that should be substituted to original binding declaring class as the proper receiver typefinal byte[]protected intvoidgetTYPE(int baseTypeID) voidgoto_(BranchLabel label) We didn't call it goto, because there is a conflit with the goto keywordvoidgoto_w(BranchLabel label) voidvoidi2b()voidi2c()voidi2d()voidi2f()voidi2l()voidi2s()voidiadd()voidiaload()voidiand()voidiastore()voidiconst_0()voidiconst_1()voidiconst_2()voidiconst_3()voidiconst_4()voidiconst_5()voidvoididiv()voidif_acmpeq(BranchLabel lbl) voidif_acmpne(BranchLabel lbl) voidif_icmpeq(BranchLabel lbl) voidif_icmpge(BranchLabel lbl) voidif_icmpgt(BranchLabel lbl) voidif_icmple(BranchLabel lbl) voidif_icmplt(BranchLabel lbl) voidif_icmpne(BranchLabel lbl) voidifeq(BranchLabel lbl) voidifge(BranchLabel lbl) voidifgt(BranchLabel lbl) voidifle(BranchLabel lbl) voidiflt(BranchLabel lbl) voidifne(BranchLabel lbl) voidifnonnull(BranchLabel lbl) voidifnull(BranchLabel lbl) final voidiinc(int index, int value) voidiload(int iArg) voidiload_0()voidiload_1()voidiload_2()voidiload_3()voidimul()voidineg()voidvoidinitializeMaxLocals(MethodBinding methodBinding) booleaninlineForwardReferencesFromLabelsTargeting(BranchLabel targetLabel, int gotoLocation) Some placed labels might be branching to a goto bytecode which we can optimize better.static intinsertionIndex(int[] pcToSourceMap, int length, int pc) This methods searches for an existing entry inside the pcToSourceMap table with a pc equals to @pc.voidinstance_of(TypeReference typeReference, TypeBinding typeBinding) We didn't call it instanceof because there is a conflict with the instanceof keywordvoidinstance_of(TypeBinding typeBinding) We didn't call it instanceof because there is a conflict with the instanceof keywordprotected voidinvoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId, TypeBinding type) protected voidinvoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, TypeBinding type) voidinvoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass) voidinvoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) protected voidprotected voidvoidinvokeAutoCloseableClose(TypeBinding resourceType) voidprotected voidprotected voidprotected voidvoidinvokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature, boolean isConstructorReference, TypeReference lhsTypeReference, TypeReference[] typeArguments, int typeId, TypeBinding type) voidinvokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature, int typeId, TypeBinding type) voidinvokeDynamicForStringConcat(StringBuilder recipe, List<TypeBinding> arguments) voidinvokeEnumOrdinal(char[] enumTypeConstantPoolName) voidinvokeIterableIterator(TypeBinding iterableReceiverType) voidinvokeJavaLangAssertionErrorConstructor(int typeBindingID) voidvoidvoidvoidinvokeJavaLangEnumValues(TypeBinding enumBinding, ArrayBinding arrayBinding) voidvoidvoidvoidprotected voidprotected voidvoidvoidvoidvoidvoidvoidvoidvoidinvokeStringConcatenationAppendForType(int typeID) The equivalent code performs a string conversion of the TOSvoidvoidvoidvoidvoidvoidvoidinvokeStringValueOf(int typeID) voidvoidvoidvoidvoidior()voidirem()voidireturn()booleanisDefinitelyAssigned(Scope scope, int initStateIndex, LocalVariableBinding local) voidishl()voidishr()voidistore(int iArg) voidistore_0()voidistore_1()voidistore_2()voidistore_3()voidisub()voidiushr()voidixor()final voidjsr(BranchLabel lbl) final voidjsr_w(BranchLabel lbl) voidl2d()voidl2f()voidl2i()voidladd()voidlaload()voidland()voidlastore()voidlcmp()voidlconst_0()voidlconst_1()voidldc(float constant) voidldc(int constant) voidvoidldc(TypeBinding typeBinding) voidldc2_w(double constant) voidldc2_w(long constant) voidldcForIndex(int index) voidldiv()voidlload(int iArg) voidlload_0()voidlload_1()voidlload_2()voidlload_3()voidlmul()voidlneg()final voidload(LocalVariableBinding localBinding) final voidload(TypeBinding typeBinding, int resolvedPosition) voidloadInt(int value) Based on the supplied value add the most efficient load instruction to the code stream for that value.voidlookupswitch(CaseLabel defaultLabel, int[] keys, int[] sortedIndexes, CaseLabel[] casesLabel) voidlor()voidlrem()voidlreturn()voidlshl()voidlshr()voidlstore(int iArg) voidlstore_0()voidlstore_1()voidlstore_2()voidlstore_3()voidlsub()voidlushr()voidlxor()voidvoidvoidmultianewarray(TypeReference typeReference, TypeBinding typeBinding, int dimensions, ArrayAllocationExpression allocationExpression) voidnew_(TypeReference typeReference, TypeBinding typeBinding) voidnew_(TypeBinding typeBinding) voidnewarray(int array_Type) voidnewArray(TypeReference typeReference, ArrayAllocationExpression allocationExpression, ArrayBinding arrayBinding) voidnewArray(ArrayBinding arrayBinding) voidvoidvoidvoidvoidvoidvoidnewWrapperFor(int typeID) voidnop()voidoptimizeBranch(int oldPosition, BranchLabel lbl) booleanShould the reference context associated with the scope handle pattern access exceptions ?voidpop()voidpop2()voidpushExceptionOnStack(TypeBinding binding) voidpushOnStack(TypeBinding binding) voidStack the scope responsible for any pattern access exceptions not trapped by subscopes.voidrecord(LocalVariableBinding local) voidrecordPositionsFrom(int startPC, int sourcePos) voidrecordPositionsFrom(int startPC, int sourcePos, boolean widen) voidregisterExceptionHandler(ExceptionLabel anExceptionLabel) voidremoveNotDefinitelyAssignedVariables(Scope scope, int initStateIndex) voidRemove all entries in pcToSourceMap table that are beyond this.positionvoidremoveVariable(LocalVariableBinding localBinding) voidreset(AbstractMethodDeclaration referenceMethod, ClassFile targetClassFile) voidreset(LambdaExpression lambda, ClassFile targetClassFile) voidvoidvoidresetForProblemClinit(ClassFile targetClassFile) voidfinal voidret(int index) voidreturn_()voidsaload()voidsastore()voidsendOperator(int operatorConstant, int type_ID) voidsipush(int s) static final voidsort(int[] tab, int lo0, int hi0, int[] result) voidstore(LocalVariableBinding localBinding, boolean valueRequired) voidswap()voidtableswitch(CaseLabel defaultLabel, int low, int high, int[] keys, int[] sortedIndexes, int[] mapping, CaseLabel[] casesLabel) voidthrowAnyException(LocalVariableBinding anyExceptionVariable) toString()protected voidwritePosition(BranchLabel label) protected voidwritePosition(BranchLabel label, int forwardReference) protected final voidwriteSignedWord(int value) protected voidwriteSignedWord(int pos, int value) protected voidwriteWidePosition(BranchLabel label)
-
Field Details
-
ImplicitThis
-
LABELS_INCREMENT
public static final int LABELS_INCREMENT- See Also:
-
LOCALS_INCREMENT
public static final int LOCALS_INCREMENT- See Also:
-
RESTART_IN_WIDE_MODE
-
RESTART_CODE_GEN_FOR_UNUSED_LOCALS_MODE
-
allLocalsCounter
public int allLocalsCounter -
bCodeStream
public byte[] bCodeStream -
classFile
-
classFileOffset
public int classFileOffset -
constantPool
-
countLabels
public int countLabels -
exceptionLabels
-
exceptionLabelsCounter
public int exceptionLabelsCounter -
generateAttributes
public int generateAttributes -
labels
-
lastEntryPC
public int lastEntryPC -
lastAbruptCompletion
public int lastAbruptCompletion -
lineSeparatorPositions
public int[] lineSeparatorPositions -
lineNumberStart
public int lineNumberStart -
lineNumberEnd
public int lineNumberEnd -
locals
-
maxFieldCount
public int maxFieldCount -
maxLocals
public int maxLocals -
methodDeclaration
-
lambdaExpression
-
pcToSourceMap
public int[] pcToSourceMap -
pcToSourceMapSize
public int pcToSourceMapSize -
position
public int position -
preserveUnusedLocals
public boolean preserveUnusedLocals -
stackDepth
public int stackDepth -
stackMax
public int stackMax -
startingClassFileOffset
public int startingClassFileOffset -
targetLevel
protected long targetLevel -
visibleLocals
-
wideMode
public boolean wideMode -
switchSaveTypeBindings
-
lastSwitchCumulativeSyntheticVars
public int lastSwitchCumulativeSyntheticVars -
patternAccessorMap
-
accessorExceptionTrapScopes
-
-
Constructor Details
-
CodeStream
-
-
Method Details
-
insertionIndex
public static int insertionIndex(int[] pcToSourceMap, int length, int pc) This methods searches for an existing entry inside the pcToSourceMap table with a pc equals to @pc. If there is an existing entry it returns -1 (no insertion required). Otherwise it returns the index where the entry for the pc has to be inserted. This is based on the fact that the pcToSourceMap table is sorted according to the pc.- Parameters:
pcToSourceMap- the given pcToSourceMap arraylength- the given lengthpc- the given pc- Returns:
- int
-
sort
public static final void sort(int[] tab, int lo0, int hi0, int[] result) -
aaload
public void aaload() -
aastore
public void aastore() -
aconst_null
public void aconst_null() -
addDefinitelyAssignedVariables
-
addLabel
-
addVariable
-
addVisibleLocalVariable
-
aload
public void aload(int iArg) -
aload_0
public void aload_0() -
aload_1
public void aload_1() -
aload_2
public void aload_2() -
aload_3
public void aload_3() -
anewarray
-
areturn
public void areturn() -
arrayAt
public void arrayAt(int typeBindingID) -
arrayAtPut
public void arrayAtPut(int elementTypeID, boolean valueRequired) -
arraylength
public void arraylength() -
astore
public void astore(int iArg) -
astore_0
public void astore_0() -
astore_1
public void astore_1() -
astore_2
public void astore_2() -
astore_3
public void astore_3() -
athrow
public void athrow() -
baload
public void baload() -
bastore
public void bastore() -
bipush
public void bipush(byte b) -
caload
public void caload() -
castore
public void castore() -
checkcast
public void checkcast(int baseId) -
checkcast
-
checkcast
-
d2f
public void d2f() -
d2i
public void d2i() -
d2l
public void d2l() -
dadd
public void dadd() -
daload
public void daload() -
dastore
public void dastore() -
dcmpg
public void dcmpg() -
dcmpl
public void dcmpl() -
dconst_0
public void dconst_0() -
dconst_1
public void dconst_1() -
ddiv
public void ddiv() -
dload
public void dload(int iArg) -
dload_0
public void dload_0() -
dload_1
public void dload_1() -
dload_2
public void dload_2() -
dload_3
public void dload_3() -
dmul
public void dmul() -
dneg
public void dneg() -
drem
public void drem() -
dreturn
public void dreturn() -
dstore
public void dstore(int iArg) -
dstore_0
public void dstore_0() -
dstore_1
public void dstore_1() -
dstore_2
public void dstore_2() -
dstore_3
public void dstore_3() -
dsub
public void dsub() -
dup
public void dup() -
dup_x1
public void dup_x1() -
dup_x2
public void dup_x2() -
dup2
public void dup2() -
dup2_x1
public void dup2_x1() -
dup2_x2
public void dup2_x2() -
exitUserScope
-
exitUserScope
-
f2d
public void f2d() -
f2i
public void f2i() -
f2l
public void f2l() -
fadd
public void fadd() -
faload
public void faload() -
fastore
public void fastore() -
fcmpg
public void fcmpg() -
fcmpl
public void fcmpl() -
fconst_0
public void fconst_0() -
fconst_1
public void fconst_1() -
fconst_2
public void fconst_2() -
fdiv
public void fdiv() -
fieldAccess
-
fload
public void fload(int iArg) -
fload_0
public void fload_0() -
fload_1
public void fload_1() -
fload_2
public void fload_2() -
fload_3
public void fload_3() -
fmul
public void fmul() -
fneg
public void fneg() -
frem
public void frem() -
freturn
public void freturn() -
fstore
public void fstore(int iArg) -
fstore_0
public void fstore_0() -
fstore_1
public void fstore_1() -
fstore_2
public void fstore_2() -
fstore_3
public void fstore_3() -
fsub
public void fsub() -
generateBoxingConversion
public void generateBoxingConversion(int unboxedTypeID) -
generateClassLiteralAccessForType
public void generateClassLiteralAccessForType(Scope scope, TypeBinding accessedType, FieldBinding syntheticFieldBinding) Macro for building a class descriptor object -
generateCodeAttributeForProblemMethod
This method generates the code attribute bytecode -
generateConstant
-
generateEmulatedReadAccessForField
-
generateEmulatedWriteAccessForField
-
generateEmulationForConstructor
-
generateEmulationForField
-
generateEmulationForMethod
-
generateImplicitConversion
public void generateImplicitConversion(int implicitConversionCode) Generates the sequence of instructions which will perform the conversion of the expression on the stack into a different type (e.g. long l = someInt; --> i2l must be inserted).- Parameters:
implicitConversionCode- int
-
generateInlinedValue
public void generateInlinedValue(boolean inlinedValue) -
generateInlinedValue
public void generateInlinedValue(byte inlinedValue) -
generateInlinedValue
public void generateInlinedValue(char inlinedValue) -
generateInlinedValue
public void generateInlinedValue(double inlinedValue) -
generateInlinedValue
public void generateInlinedValue(float inlinedValue) -
generateInlinedValue
public void generateInlinedValue(int inlinedValue) -
generateInlinedValue
public void generateInlinedValue(long inlinedValue) -
generateInlinedValue
public void generateInlinedValue(short inlinedValue) -
generateOuterAccess
-
generateReturnBytecode
-
invokeDynamicForStringConcat
-
generateStringConcatenationAppend
public void generateStringConcatenationAppend(BlockScope blockScope, Expression oper1, Expression oper2) The equivalent code performs a string conversion:- Parameters:
blockScope- the given blockScopeoper1- the first expressionoper2- the second expression
-
generateSyntheticBodyForConstructorAccess
- Parameters:
accessBinding- the access method binding to generate
-
generateSyntheticBodyForArrayConstructor
-
generateSyntheticBodyForArrayClone
-
generateSyntheticBodyForFactoryMethod
-
generateSyntheticBodyForEnumValueOf
-
generateSyntheticBodyForDeserializeLambda
public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding methodBinding, SyntheticMethodBinding[] syntheticMethodBindings) This is intended to match what javac generates. First there is a switch statement on the hashcode of the lambda method name - based on that an id is computed (0..N). An unrecognized hash gets the id -1. Then a second switch is on the id and each case here checks all the properties of the serialized lambda. If they all checkout OK an invokedynamic call to a bootstrap method targeting the altMetafactory. If any of the tests fail an IllegalArgumentException is thrown. This exception is not typically seen by the 'user', instead they seem to see a NPE when the lambda does not deserialize properly. -
loadInt
public void loadInt(int value) Based on the supplied value add the most efficient load instruction to the code stream for that value. Note: Does not handle negative values. -
generateSyntheticBodyForEnumValues
-
generateSyntheticBodyForEnumInitializationMethod
-
generateSyntheticBodyForFieldReadAccess
-
generateSyntheticBodyForFieldWriteAccess
-
generateSyntheticBodyForMethodAccess
-
generateSyntheticBodyForSwitchTable
-
generateSyntheticEnclosingInstanceValues
public void generateSyntheticEnclosingInstanceValues(BlockScope currentScope, ReferenceBinding targetType, Expression enclosingInstance, ASTNode invocationSite) Code responsible to generate the suitable code to supply values for the synthetic enclosing instance arguments of a constructor invocation of a nested type. -
generateSyntheticOuterArgumentValues
public void generateSyntheticOuterArgumentValues(BlockScope currentScope, ReferenceBinding targetType, ASTNode invocationSite) Code responsible to generate the suitable code to supply values for the synthetic outer local variable arguments of a constructor invocation of a nested type. (bug 26122) - synthetic values for outer locals must be passed after user arguments, e.g. new X(i = 1){} -
generateSyntheticBodyForRecordCanonicalConstructor
public void generateSyntheticBodyForRecordCanonicalConstructor(SyntheticMethodBinding canonConstructor) -
generateSyntheticBodyForRecordEquals
-
generateSyntheticBodyForRecordHashCode
-
generateSyntheticBodyForRecordToString
-
generateUnboxingConversion
public void generateUnboxingConversion(int unboxedTypeID) -
generateWideRevertedConditionalBranch
-
getBaseTypeValue
public void getBaseTypeValue(int baseTypeID) -
getContents
public final byte[] getContents() -
getConstantPoolDeclaringClass
public static TypeBinding getConstantPoolDeclaringClass(Scope currentScope, FieldBinding codegenBinding, TypeBinding actualReceiverType, boolean isImplicitThisReceiver) Returns the type that should be substituted to original binding declaring class as the proper receiver type- Returns:
- the receiver type to use in constant pool
-
getConstantPoolDeclaringClass
public static TypeBinding getConstantPoolDeclaringClass(Scope currentScope, MethodBinding codegenBinding, TypeBinding actualReceiverType, boolean isImplicitThisReceiver) Returns the type that should be substituted to original binding declaring class as the proper receiver type- Returns:
- the receiver type to use in constant pool
-
getPosition
protected int getPosition() -
getTYPE
public void getTYPE(int baseTypeID) -
goto_
We didn't call it goto, because there is a conflit with the goto keyword -
goto_w
-
i2b
public void i2b() -
i2c
public void i2c() -
i2d
public void i2d() -
i2f
public void i2f() -
i2l
public void i2l() -
i2s
public void i2s() -
iadd
public void iadd() -
iaload
public void iaload() -
iand
public void iand() -
iastore
public void iastore() -
iconst_0
public void iconst_0() -
iconst_1
public void iconst_1() -
iconst_2
public void iconst_2() -
iconst_3
public void iconst_3() -
iconst_4
public void iconst_4() -
iconst_5
public void iconst_5() -
iconst_m1
public void iconst_m1() -
idiv
public void idiv() -
if_acmpeq
-
if_acmpne
-
if_icmpeq
-
if_icmpge
-
if_icmpgt
-
if_icmple
-
if_icmplt
-
if_icmpne
-
ifeq
-
ifge
-
ifgt
-
ifle
-
iflt
-
ifne
-
ifnonnull
-
ifnull
-
iinc
public final void iinc(int index, int value) -
iload
public void iload(int iArg) -
iload_0
public void iload_0() -
iload_1
public void iload_1() -
iload_2
public void iload_2() -
iload_3
public void iload_3() -
imul
public void imul() -
ineg
public void ineg() -
init
-
initializeMaxLocals
- Parameters:
methodBinding- the given method binding to initialize the max locals
-
inlineForwardReferencesFromLabelsTargeting
public boolean inlineForwardReferencesFromLabelsTargeting(BranchLabel targetLabel, int gotoLocation) Some placed labels might be branching to a goto bytecode which we can optimize better. -
instance_of
We didn't call it instanceof because there is a conflict with the instanceof keyword -
instance_of
We didn't call it instanceof because there is a conflict with the instanceof keyword -
invoke
protected void invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, TypeBinding type) -
_invoke
protected void _invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId) -
invoke
protected void invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId, TypeBinding type) -
invokeDynamic
public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature, int typeId, TypeBinding type) -
invokeDynamic
public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature, boolean isConstructorReference, TypeReference lhsTypeReference, TypeReference[] typeArguments, int typeId, TypeBinding type) -
invoke
-
invoke
public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) -
invokeAccessibleObjectSetAccessible
protected void invokeAccessibleObjectSetAccessible() -
invokeArrayNewInstance
protected void invokeArrayNewInstance() -
invokeClassForName
public void invokeClassForName() -
invokeClassGetDeclaredConstructor
protected void invokeClassGetDeclaredConstructor() -
invokeClassGetDeclaredField
protected void invokeClassGetDeclaredField() -
invokeClassGetDeclaredMethod
protected void invokeClassGetDeclaredMethod() -
invokeEnumOrdinal
public void invokeEnumOrdinal(char[] enumTypeConstantPoolName) -
invokeIterableIterator
-
invokeAutoCloseableClose
-
invokeThrowableAddSuppressed
public void invokeThrowableAddSuppressed() -
invokeJavaLangAssertionErrorConstructor
public void invokeJavaLangAssertionErrorConstructor(int typeBindingID) -
invokeJavaLangAssertionErrorDefaultConstructor
public void invokeJavaLangAssertionErrorDefaultConstructor() -
invokeJavaLangIncompatibleClassChangeErrorDefaultConstructor
public void invokeJavaLangIncompatibleClassChangeErrorDefaultConstructor() -
invokeJavaLangClassDesiredAssertionStatus
public void invokeJavaLangClassDesiredAssertionStatus() -
invokeJavaLangEnumvalueOf
-
invokeJavaLangEnumValues
-
invokeJavaLangErrorConstructor
public void invokeJavaLangErrorConstructor() -
invokeJavaLangReflectConstructorNewInstance
public void invokeJavaLangReflectConstructorNewInstance() -
invokeJavaLangReflectFieldGetter
-
invokeJavaLangReflectFieldSetter
-
invokeJavaLangReflectMethodInvoke
public void invokeJavaLangReflectMethodInvoke() -
invokeJavaUtilIteratorHasNext
public void invokeJavaUtilIteratorHasNext() -
invokeJavaUtilIteratorNext
public void invokeJavaUtilIteratorNext() -
invokeJavaUtilObjectsrequireNonNull
public void invokeJavaUtilObjectsrequireNonNull() -
invokeNoClassDefFoundErrorStringConstructor
public void invokeNoClassDefFoundErrorStringConstructor() -
invokeObjectGetClass
public void invokeObjectGetClass() -
invokeStringConcatenationAppendForType
public void invokeStringConcatenationAppendForType(int typeID) The equivalent code performs a string conversion of the TOS- Parameters:
typeID-int
-
invokeStringConcatenationDefaultConstructor
public void invokeStringConcatenationDefaultConstructor() -
invokeStringConcatenationStringConstructor
public void invokeStringConcatenationStringConstructor() -
invokeStringConcatenationToString
public void invokeStringConcatenationToString() -
invokeStringEquals
public void invokeStringEquals() -
invokeObjectEquals
public void invokeObjectEquals() -
invokeStringHashCode
public void invokeStringHashCode() -
invokeStringIntern
public void invokeStringIntern() -
invokeStringValueOf
public void invokeStringValueOf(int typeID) -
invokeThrowableToString
public void invokeThrowableToString() -
invokeSystemArraycopy
public void invokeSystemArraycopy() -
invokeThrowableGetMessage
public void invokeThrowableGetMessage() -
ior
public void ior() -
irem
public void irem() -
ireturn
public void ireturn() -
isDefinitelyAssigned
-
ishl
public void ishl() -
ishr
public void ishr() -
istore
public void istore(int iArg) -
istore_0
public void istore_0() -
istore_1
public void istore_1() -
istore_2
public void istore_2() -
istore_3
public void istore_3() -
isub
public void isub() -
iushr
public void iushr() -
ixor
public void ixor() -
jsr
-
jsr_w
-
l2d
public void l2d() -
l2f
public void l2f() -
l2i
public void l2i() -
ladd
public void ladd() -
laload
public void laload() -
land
public void land() -
lastore
public void lastore() -
lcmp
public void lcmp() -
lconst_0
public void lconst_0() -
lconst_1
public void lconst_1() -
ldc
public void ldc(float constant) -
ldc
public void ldc(int constant) -
ldc
-
ldc
-
ldc2_w
public void ldc2_w(double constant) -
ldc2_w
public void ldc2_w(long constant) -
ldcForIndex
public void ldcForIndex(int index) -
ldiv
public void ldiv() -
lload
public void lload(int iArg) -
lload_0
public void lload_0() -
lload_1
public void lload_1() -
lload_2
public void lload_2() -
lload_3
public void lload_3() -
lmul
public void lmul() -
lneg
public void lneg() -
load
-
load
-
lookupswitch
-
lor
public void lor() -
lrem
public void lrem() -
lreturn
public void lreturn() -
lshl
public void lshl() -
lshr
public void lshr() -
lstore
public void lstore(int iArg) -
lstore_0
public void lstore_0() -
lstore_1
public void lstore_1() -
lstore_2
public void lstore_2() -
lstore_3
public void lstore_3() -
lsub
public void lsub() -
lushr
public void lushr() -
lxor
public void lxor() -
monitorenter
public void monitorenter() -
monitorexit
public void monitorexit() -
multianewarray
public void multianewarray(TypeReference typeReference, TypeBinding typeBinding, int dimensions, ArrayAllocationExpression allocationExpression) -
new_
-
new_
-
newarray
public void newarray(int array_Type) -
newArray
-
newArray
public void newArray(TypeReference typeReference, ArrayAllocationExpression allocationExpression, ArrayBinding arrayBinding) -
newJavaLangAssertionError
public void newJavaLangAssertionError() -
newJavaLangError
public void newJavaLangError() -
newJavaLangIncompatibleClassChangeError
public void newJavaLangIncompatibleClassChangeError() -
newJavaLangMatchException
public void newJavaLangMatchException() -
invokeJavaLangMatchExceptionConstructor
public void invokeJavaLangMatchExceptionConstructor() -
newNoClassDefFoundError
public void newNoClassDefFoundError() -
newStringContatenation
public void newStringContatenation() -
newWrapperFor
public void newWrapperFor(int typeID) -
nop
public void nop() -
optimizeBranch
-
pop
public void pop() -
pop2
public void pop2() -
pushExceptionOnStack
-
pushOnStack
-
record
-
recordPositionsFrom
public void recordPositionsFrom(int startPC, int sourcePos) -
recordPositionsFrom
public void recordPositionsFrom(int startPC, int sourcePos, boolean widen) -
registerExceptionHandler
- Parameters:
anExceptionLabel- org.eclipse.jdt.internal.compiler.codegen.ExceptionLabel
-
removeNotDefinitelyAssignedVariables
-
removeUnusedPcToSourceMapEntries
public void removeUnusedPcToSourceMapEntries()Remove all entries in pcToSourceMap table that are beyond this.position -
removeVariable
-
reset
- Parameters:
referenceMethod- org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclarationtargetClassFile- org.eclipse.jdt.internal.compiler.codegen.ClassFile
-
reset
-
reset
-
resetForProblemClinit
- Parameters:
targetClassFile- The given classfile to reset the code stream
-
resetInWideMode
public void resetInWideMode() -
resetForCodeGenUnusedLocals
public void resetForCodeGenUnusedLocals() -
ret
public final void ret(int index) -
return_
public void return_() -
saload
public void saload() -
sastore
public void sastore() -
sendOperator
public void sendOperator(int operatorConstant, int type_ID) - Parameters:
operatorConstant- inttype_ID- int
-
sipush
public void sipush(int s) -
store
-
swap
public void swap() -
tableswitch
-
throwAnyException
-
toString
-
writePosition
-
writePosition
-
writeSignedWord
protected final void writeSignedWord(int value) -
writeSignedWord
protected void writeSignedWord(int pos, int value) -
writeWidePosition
-
clearTypeBindingStack
public void clearTypeBindingStack() -
pushPatternAccessTrapScope
Stack the scope responsible for any pattern access exceptions not trapped by subscopes. Not all scopes bear responsibility: only method scopes (including clinit, init, lambdas) and try block scopes need to trap component pattern accessor exceptions and install handlers that throw a MatchException.- Parameters:
scope- some scope where the buck should stop for all pattern access exceptions underneath
-
patternAccessorsMayThrow
Should the reference context associated with the scope handle pattern access exceptions ?- Parameters:
scope-- Returns:
- true if pattern accesses do occur underneath, false otherwise
-
handleRecordAccessorExceptions
-