public void pushExceptionOnStack(TypeBinding binding) { super.pushExceptionOnStack(binding); addExceptionMarker(this.position, binding); } public void goto_(BranchLabel label) {
public void freturn() { super.freturn(); addFramePosition(this.position); } public void dreturn() {
@Override public void recordExpressionType(TypeBinding typeBinding) { addStackDepthMarker(this.position, 0, typeBinding); } /**
getTYPE(accessedType.id); return; this.ldc(accessedType); } else { fieldAccess(Opcodes.OPC_getstatic, syntheticFieldBinding, null /* default declaringClass */); dup(); ifnonnull(endLabel); pop(); this.ldc(accessedType == TypeBinding.NULL ? "java.lang.Object" : String.valueOf(accessedType.constantPoolName()).replace('/', '.')); //$NON-NLS-1$ invokeClassForName(); dup(); fieldAccess(Opcodes.OPC_putstatic, syntheticFieldBinding, null /* default declaringClass */); goto_(endLabel); int savedStackDepth = this.stackDepth; pushExceptionOnStack(TypeBinding.NULL);/*represents ClassNotFoundException*/ classNotFoundExceptionHandler.place(); newNoClassDefFoundError(); dup_x1(); swap(); invokeThrowableGetMessage();
public void traverse(MethodBinding methodBinding, int maxLocals, byte[] bytecodes, int codeOffset, int codeLength, ArrayList frames, boolean isClinit) { StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream; int[] framePositions = stackMapFrameCodeStream.getFramePositions(); int pc = codeOffset; int index; StackDepthMarker[] stackDepthMarkers = stackMapFrameCodeStream.getStackDepthMarkers(); int stackDepthMarkersLength = stackDepthMarkers == null ? 0 : stackDepthMarkers.length; boolean hasStackDepthMarkers = stackDepthMarkersLength != 0; StackMarker[] stackMarkers = stackMapFrameCodeStream.getStackMarkers(); int stackMarkersLength = stackMarkers == null ? 0 : stackMarkers.length; boolean hasStackMarkers = stackMarkersLength != 0; ExceptionMarker[] exceptionMarkers= stackMapFrameCodeStream.getExceptionMarkers(); int exceptionsMarkersLength = exceptionMarkers == null ? 0 : exceptionMarkers.length; boolean hasExceptionMarkers = exceptionsMarkersLength != 0;
public ClassFile(ModuleBinding moduleBinding, CompilerOptions options) { this.constantPool = new ConstantPool(this); this.targetJDK = options.targetJDK; this.produceAttributes = ClassFileConstants.ATTR_SOURCE; this.isNestedType = false; this.codeStream = new StackMapFrameCodeStream(this); initByteArrays(0); }
getTYPE(accessedType.id); return; this.ldc(accessedType); } else { fieldAccess(Opcodes.OPC_getstatic, syntheticFieldBinding, null /* default declaringClass */); dup(); ifnonnull(endLabel); pop(); this.ldc(accessedType == TypeBinding.NULL ? "java.lang.Object" : String.valueOf(accessedType.constantPoolName()).replace('/', '.')); //$NON-NLS-1$ invokeClassForName(); dup(); fieldAccess(Opcodes.OPC_putstatic, syntheticFieldBinding, null /* default declaringClass */); goto_(endLabel); int savedStackDepth = this.stackDepth; pushExceptionOnStack(TypeBinding.NULL);/*represents ClassNotFoundException*/ classNotFoundExceptionHandler.place(); newNoClassDefFoundError(); dup_x1(); swap(); invokeThrowableGetMessage();
public void traverse(MethodBinding methodBinding, int maxLocals, byte[] bytecodes, int codeOffset, int codeLength, ArrayList frames, boolean isClinit) { StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream; int[] framePositions = stackMapFrameCodeStream.getFramePositions(); int pc = codeOffset; int index; StackDepthMarker[] stackDepthMarkers = stackMapFrameCodeStream.getStackDepthMarkers(); int stackDepthMarkersLength = stackDepthMarkers == null ? 0 : stackDepthMarkers.length; boolean hasStackDepthMarkers = stackDepthMarkersLength != 0; StackMarker[] stackMarkers = stackMapFrameCodeStream.getStackMarkers(); int stackMarkersLength = stackMarkers == null ? 0 : stackMarkers.length; boolean hasStackMarkers = stackMarkersLength != 0; ExceptionMarker[] exceptionMarkers= stackMapFrameCodeStream.getExceptionMarkers(); int exceptionsMarkersLength = exceptionMarkers == null ? 0 : exceptionMarkers.length; boolean hasExceptionMarkers = exceptionsMarkersLength != 0;
public ClassFile(ModuleBinding moduleBinding, CompilerOptions options) { this.constantPool = new ConstantPool(this); this.targetJDK = options.targetJDK; this.produceAttributes = ClassFileConstants.ATTR_SOURCE; this.isNestedType = false; this.codeStream = new StackMapFrameCodeStream(this); initByteArrays(0); }
getTYPE(accessedType.id); return; this.ldc(accessedType); } else { fieldAccess(Opcodes.OPC_getstatic, syntheticFieldBinding, null /* default declaringClass */); dup(); ifnonnull(endLabel); pop(); this.ldc(accessedType == TypeBinding.NULL ? "java.lang.Object" : String.valueOf(accessedType.constantPoolName()).replace('/', '.')); //$NON-NLS-1$ invokeClassForName(); dup(); fieldAccess(Opcodes.OPC_putstatic, syntheticFieldBinding, null /* default declaringClass */); goto_(endLabel); int savedStackDepth = this.stackDepth; pushExceptionOnStack(TypeBinding.NULL);/*represents ClassNotFoundException*/ classNotFoundExceptionHandler.place(); newNoClassDefFoundError(); dup_x1(); swap(); invokeThrowableGetMessage();
public void traverse(MethodBinding methodBinding, int maxLocals, byte[] bytecodes, int codeOffset, int codeLength, ArrayList frames, boolean isClinit) { StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream; int[] framePositions = stackMapFrameCodeStream.getFramePositions(); int pc = codeOffset; int index; StackDepthMarker[] stackDepthMarkers = stackMapFrameCodeStream.getStackDepthMarkers(); int stackDepthMarkersLength = stackDepthMarkers == null ? 0 : stackDepthMarkers.length; boolean hasStackDepthMarkers = stackDepthMarkersLength != 0; StackMarker[] stackMarkers = stackMapFrameCodeStream.getStackMarkers(); int stackMarkersLength = stackMarkers == null ? 0 : stackMarkers.length; boolean hasStackMarkers = stackMarkersLength != 0; ExceptionMarker[] exceptionMarkers= stackMapFrameCodeStream.getExceptionMarkers(); int exceptionsMarkersLength = exceptionMarkers == null ? 0 : exceptionMarkers.length; boolean hasExceptionMarkers = exceptionsMarkersLength != 0;
@Override protected void writePosition(BranchLabel label) { super.writePosition(label); addFramePosition(label.position); } @Override
public void recordExpressionType(TypeBinding typeBinding) { addStackDepthMarker(this.position, 0, typeBinding); } /**
public ClassFile(SourceTypeBinding typeBinding) { // default constructor for subclasses this.constantPool = new ConstantPool(this); final CompilerOptions options = typeBinding.scope.compilerOptions(); this.targetJDK = options.targetJDK; this.produceAttributes = options.produceDebugAttributes; this.referenceBinding = typeBinding; this.isNestedType = typeBinding.isNestedType(); if (this.targetJDK >= ClassFileConstants.JDK1_6) { this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE; this.codeStream = new StackMapFrameCodeStream(this); } else if (this.targetJDK == ClassFileConstants.CLDC_1_1) { this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3 this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP; this.codeStream = new StackMapFrameCodeStream(this); } else { this.codeStream = new CodeStream(this); } initByteArrays(); }
public void pushExceptionOnStack(TypeBinding binding) { super.pushExceptionOnStack(binding); addExceptionMarker(this.position, binding); } public void goto_(BranchLabel label) {
getTYPE(accessedType.id); return; this.ldc(accessedType); } else { fieldAccess(Opcodes.OPC_getstatic, syntheticFieldBinding, null /* default declaringClass */); dup(); ifnonnull(endLabel); pop(); this.ldc(accessedType == TypeBinding.NULL ? "java.lang.Object" : String.valueOf(accessedType.constantPoolName()).replace('/', '.')); //$NON-NLS-1$ invokeClassForName(); dup(); fieldAccess(Opcodes.OPC_putstatic, syntheticFieldBinding, null /* default declaringClass */); goto_(endLabel); int savedStackDepth = this.stackDepth; pushExceptionOnStack(TypeBinding.NULL);/*represents ClassNotFoundException*/ classNotFoundExceptionHandler.place(); newNoClassDefFoundError(); dup_x1(); swap(); invokeThrowableGetMessage();
int[] framePositions = stackMapFrameCodeStream.getFramePositions(); int pc = codeOffset; int index; StackDepthMarker[] stackDepthMarkers = stackMapFrameCodeStream.getStackDepthMarkers(); int stackDepthMarkersLength = stackDepthMarkers == null ? 0 : stackDepthMarkers.length; boolean hasStackDepthMarkers = stackDepthMarkersLength != 0; StackMarker[] stackMarkers = stackMapFrameCodeStream.getStackMarkers(); int stackMarkersLength = stackMarkers == null ? 0 : stackMarkers.length; boolean hasStackMarkers = stackMarkersLength != 0; ExceptionMarker[] exceptionMarkers= stackMapFrameCodeStream.getExceptionMarkers(); int exceptionsMarkersLength = exceptionMarkers == null ? 0 : exceptionMarkers.length; boolean hasExceptionMarkers = exceptionsMarkersLength != 0;
protected void writeSignedWord(int pos, int value) { super.writeSignedWord(pos, value); addFramePosition(this.position); } protected void writeWidePosition(BranchLabel label) {
public void pushOnStack(TypeBinding binding) { super.pushOnStack(binding); addStackDepthMarker(this.position, 1, binding); } public void pushExceptionOnStack(TypeBinding binding) {
public ClassFile(SourceTypeBinding typeBinding) { // default constructor for subclasses this.constantPool = new ConstantPool(this); final CompilerOptions options = typeBinding.scope.compilerOptions(); this.targetJDK = options.targetJDK; this.produceAttributes = options.produceDebugAttributes; this.referenceBinding = typeBinding; this.isNestedType = typeBinding.isNestedType(); if (this.targetJDK >= ClassFileConstants.JDK1_6) { this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE; this.codeStream = new StackMapFrameCodeStream(this); } else if (this.targetJDK == ClassFileConstants.CLDC_1_1) { this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3 this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP; this.codeStream = new StackMapFrameCodeStream(this); } else { this.codeStream = new CodeStream(this); } initByteArrays(); }