diff --git a/.project b/.project
new file mode 100644
index 00000000000..07dbabe5687
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ eclipse.jdt.core
+
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ClassFile.java
index 97eac3723a3..73e72275320 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -89,7 +89,6 @@
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
import org.eclipse.jdt.internal.compiler.codegen.ExceptionLabel;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.codegen.StackMapFrame;
import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream;
import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream.ExceptionMarker;
@@ -6705,50 +6704,50 @@ public List traverse(
currentFramePosition = Integer.MAX_VALUE;
}
}
- byte opcode = (byte) u1At(bytecodes, 0, pc);
+ int opcode = Byte.toUnsignedInt((byte) u1At(bytecodes, 0, pc));
switch (opcode) {
- case Opcodes.OPC_nop:
+ case ByteCodes.nop:
pc++;
break;
- case Opcodes.OPC_aconst_null:
+ case ByteCodes.aconst_null:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.NULL));
pc++;
break;
- case Opcodes.OPC_iconst_m1:
- case Opcodes.OPC_iconst_0:
- case Opcodes.OPC_iconst_1:
- case Opcodes.OPC_iconst_2:
- case Opcodes.OPC_iconst_3:
- case Opcodes.OPC_iconst_4:
- case Opcodes.OPC_iconst_5:
+ case ByteCodes.iconst_m1:
+ case ByteCodes.iconst_0:
+ case ByteCodes.iconst_1:
+ case ByteCodes.iconst_2:
+ case ByteCodes.iconst_3:
+ case ByteCodes.iconst_4:
+ case ByteCodes.iconst_5:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.INT));
pc++;
break;
- case Opcodes.OPC_lconst_0:
- case Opcodes.OPC_lconst_1:
+ case ByteCodes.lconst_0:
+ case ByteCodes.lconst_1:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.LONG));
pc++;
break;
- case Opcodes.OPC_fconst_0:
- case Opcodes.OPC_fconst_1:
- case Opcodes.OPC_fconst_2:
+ case ByteCodes.fconst_0:
+ case ByteCodes.fconst_1:
+ case ByteCodes.fconst_2:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.FLOAT));
pc++;
break;
- case Opcodes.OPC_dconst_0:
- case Opcodes.OPC_dconst_1:
+ case ByteCodes.dconst_0:
+ case ByteCodes.dconst_1:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.DOUBLE));
pc++;
break;
- case Opcodes.OPC_bipush:
+ case ByteCodes.bipush:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.BYTE));
pc += 2;
break;
- case Opcodes.OPC_sipush:
+ case ByteCodes.sipush:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.SHORT));
pc += 3;
break;
- case Opcodes.OPC_ldc:
+ case ByteCodes.ldc1:
index = u1At(bytecodes, 1, pc);
switch (u1At(poolContents, 0, constantPoolOffsets[index])) {
case ClassFileConstants.StringTag:
@@ -6766,7 +6765,7 @@ public List traverse(
}
pc += 2;
break;
- case Opcodes.OPC_ldc_w:
+ case ByteCodes.ldc2:
index = u2At(bytecodes, 1, pc);
switch (u1At(poolContents, 0, constantPoolOffsets[index])) {
case ClassFileConstants.StringTag:
@@ -6784,7 +6783,7 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_ldc2_w:
+ case ByteCodes.ldc2w:
index = u2At(bytecodes, 1, pc);
switch (u1At(poolContents, 0, constantPoolOffsets[index])) {
case ClassFileConstants.DoubleTag:
@@ -6796,57 +6795,57 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_iload:
+ case ByteCodes.iload:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.INT));
pc += 2;
break;
- case Opcodes.OPC_lload:
+ case ByteCodes.lload:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.LONG));
pc += 2;
break;
- case Opcodes.OPC_fload:
+ case ByteCodes.fload:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.FLOAT));
pc += 2;
break;
- case Opcodes.OPC_dload:
+ case ByteCodes.dload:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.DOUBLE));
pc += 2;
break;
- case Opcodes.OPC_aload:
+ case ByteCodes.aload:
index = u1At(bytecodes, 1, pc);
VerificationTypeInfo localsN = retrieveLocal(currentPC, index);
frame.addStackItem(localsN);
pc += 2;
break;
- case Opcodes.OPC_iload_0:
- case Opcodes.OPC_iload_1:
- case Opcodes.OPC_iload_2:
- case Opcodes.OPC_iload_3:
+ case ByteCodes.iload_0:
+ case ByteCodes.iload_1:
+ case ByteCodes.iload_2:
+ case ByteCodes.iload_3:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.INT));
pc++;
break;
- case Opcodes.OPC_lload_0:
- case Opcodes.OPC_lload_1:
- case Opcodes.OPC_lload_2:
- case Opcodes.OPC_lload_3:
+ case ByteCodes.lload_0:
+ case ByteCodes.lload_1:
+ case ByteCodes.lload_2:
+ case ByteCodes.lload_3:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.LONG));
pc++;
break;
- case Opcodes.OPC_fload_0:
- case Opcodes.OPC_fload_1:
- case Opcodes.OPC_fload_2:
- case Opcodes.OPC_fload_3:
+ case ByteCodes.fload_0:
+ case ByteCodes.fload_1:
+ case ByteCodes.fload_2:
+ case ByteCodes.fload_3:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.FLOAT));
pc++;
break;
- case Opcodes.OPC_dload_0:
- case Opcodes.OPC_dload_1:
- case Opcodes.OPC_dload_2:
- case Opcodes.OPC_dload_3:
+ case ByteCodes.dload_0:
+ case ByteCodes.dload_1:
+ case ByteCodes.dload_2:
+ case ByteCodes.dload_3:
frame.addStackItem(new VerificationTypeInfo(TypeBinding.DOUBLE));
pc++;
break;
- case Opcodes.OPC_aload_0:
+ case ByteCodes.aload_0:
VerificationTypeInfo locals0 = frame.locals[0];
if (locals0 == null || locals0.tag != VerificationTypeInfo.ITEM_UNINITIALIZED_THIS) {
// special case to handle uninitialized object
@@ -6855,116 +6854,116 @@ public List traverse(
frame.addStackItem(locals0);
pc++;
break;
- case Opcodes.OPC_aload_1:
+ case ByteCodes.aload_1:
VerificationTypeInfo locals1 = retrieveLocal(currentPC, 1);
frame.addStackItem(locals1);
pc++;
break;
- case Opcodes.OPC_aload_2:
+ case ByteCodes.aload_2:
VerificationTypeInfo locals2 = retrieveLocal(currentPC, 2);
frame.addStackItem(locals2);
pc++;
break;
- case Opcodes.OPC_aload_3:
+ case ByteCodes.aload_3:
VerificationTypeInfo locals3 = retrieveLocal(currentPC, 3);
frame.addStackItem(locals3);
pc++;
break;
- case Opcodes.OPC_iaload:
+ case ByteCodes.iaload:
frame.numberOfStackItems -=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.INT));
pc++;
break;
- case Opcodes.OPC_laload:
+ case ByteCodes.laload:
frame.numberOfStackItems -=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.LONG));
pc++;
break;
- case Opcodes.OPC_faload:
+ case ByteCodes.faload:
frame.numberOfStackItems -=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.FLOAT));
pc++;
break;
- case Opcodes.OPC_daload:
+ case ByteCodes.daload:
frame.numberOfStackItems -=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.DOUBLE));
pc++;
break;
- case Opcodes.OPC_aaload:
+ case ByteCodes.aaload:
frame.numberOfStackItems--;
frame.replaceWithElementType();
pc++;
break;
- case Opcodes.OPC_baload:
+ case ByteCodes.baload:
frame.numberOfStackItems -=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.BYTE));
pc++;
break;
- case Opcodes.OPC_caload:
+ case ByteCodes.caload:
frame.numberOfStackItems -=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.CHAR));
pc++;
break;
- case Opcodes.OPC_saload:
+ case ByteCodes.saload:
frame.numberOfStackItems -=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.SHORT));
pc++;
break;
- case Opcodes.OPC_istore:
- case Opcodes.OPC_lstore:
- case Opcodes.OPC_fstore:
- case Opcodes.OPC_dstore:
+ case ByteCodes.istore:
+ case ByteCodes.lstore:
+ case ByteCodes.fstore:
+ case ByteCodes.dstore:
frame.numberOfStackItems--;
pc += 2;
break;
- case Opcodes.OPC_astore:
+ case ByteCodes.astore:
index = u1At(bytecodes, 1, pc);
frame.numberOfStackItems--;
pc += 2;
break;
- case Opcodes.OPC_astore_0:
+ case ByteCodes.astore_0:
frame.locals[0] = frame.stackItems[frame.numberOfStackItems - 1];
frame.numberOfStackItems--;
pc++;
break;
- case Opcodes.OPC_astore_1:
- case Opcodes.OPC_astore_2:
- case Opcodes.OPC_astore_3:
- case Opcodes.OPC_istore_0:
- case Opcodes.OPC_istore_1:
- case Opcodes.OPC_istore_2:
- case Opcodes.OPC_istore_3:
- case Opcodes.OPC_lstore_0:
- case Opcodes.OPC_lstore_1:
- case Opcodes.OPC_lstore_2:
- case Opcodes.OPC_lstore_3:
- case Opcodes.OPC_fstore_0:
- case Opcodes.OPC_fstore_1:
- case Opcodes.OPC_fstore_2:
- case Opcodes.OPC_fstore_3:
- case Opcodes.OPC_dstore_0:
- case Opcodes.OPC_dstore_1:
- case Opcodes.OPC_dstore_2:
- case Opcodes.OPC_dstore_3:
+ case ByteCodes.astore_1:
+ case ByteCodes.astore_2:
+ case ByteCodes.astore_3:
+ case ByteCodes.istore_0:
+ case ByteCodes.istore_1:
+ case ByteCodes.istore_2:
+ case ByteCodes.istore_3:
+ case ByteCodes.lstore_0:
+ case ByteCodes.lstore_1:
+ case ByteCodes.lstore_2:
+ case ByteCodes.lstore_3:
+ case ByteCodes.fstore_0:
+ case ByteCodes.fstore_1:
+ case ByteCodes.fstore_2:
+ case ByteCodes.fstore_3:
+ case ByteCodes.dstore_0:
+ case ByteCodes.dstore_1:
+ case ByteCodes.dstore_2:
+ case ByteCodes.dstore_3:
frame.numberOfStackItems--;
pc++;
break;
- case Opcodes.OPC_iastore:
- case Opcodes.OPC_lastore:
- case Opcodes.OPC_fastore:
- case Opcodes.OPC_dastore:
- case Opcodes.OPC_aastore:
- case Opcodes.OPC_bastore:
- case Opcodes.OPC_castore:
- case Opcodes.OPC_sastore:
+ case ByteCodes.iastore:
+ case ByteCodes.lastore:
+ case ByteCodes.fastore:
+ case ByteCodes.dastore:
+ case ByteCodes.aastore:
+ case ByteCodes.bastore:
+ case ByteCodes.castore:
+ case ByteCodes.sastore:
frame.numberOfStackItems-=3;
pc++;
break;
- case Opcodes.OPC_pop:
+ case ByteCodes.pop:
frame.numberOfStackItems--;
pc++;
break;
- case Opcodes.OPC_pop2:
+ case ByteCodes.pop2:
int numberOfStackItems = frame.numberOfStackItems;
switch(frame.stackItems[numberOfStackItems - 1].id()) {
case TypeIds.T_long :
@@ -6976,11 +6975,11 @@ public List traverse(
}
pc++;
break;
- case Opcodes.OPC_dup:
+ case ByteCodes.dup:
frame.addStackItem(frame.stackItems[frame.numberOfStackItems - 1]);
pc++;
break;
- case Opcodes.OPC_dup_x1:
+ case ByteCodes.dup_x1:
VerificationTypeInfo info = frame.stackItems[frame.numberOfStackItems - 1];
frame.numberOfStackItems--;
VerificationTypeInfo info2 = frame.stackItems[frame.numberOfStackItems - 1];
@@ -6990,7 +6989,7 @@ public List traverse(
frame.addStackItem(info);
pc++;
break;
- case Opcodes.OPC_dup_x2:
+ case ByteCodes.dup_x2:
info = frame.stackItems[frame.numberOfStackItems - 1];
frame.numberOfStackItems--;
info2 = frame.stackItems[frame.numberOfStackItems - 1];
@@ -7013,7 +7012,7 @@ public List traverse(
}
pc++;
break;
- case Opcodes.OPC_dup2:
+ case ByteCodes.dup2:
info = frame.stackItems[frame.numberOfStackItems - 1];
frame.numberOfStackItems--;
switch(info.id()) {
@@ -7032,7 +7031,7 @@ public List traverse(
}
pc++;
break;
- case Opcodes.OPC_dup2_x1:
+ case ByteCodes.dup2_x1:
info = frame.stackItems[frame.numberOfStackItems - 1];
frame.numberOfStackItems--;
info2 = frame.stackItems[frame.numberOfStackItems - 1];
@@ -7055,7 +7054,7 @@ public List traverse(
}
pc++;
break;
- case Opcodes.OPC_dup2_x2:
+ case ByteCodes.dup2_x2:
numberOfStackItems = frame.numberOfStackItems;
info = frame.stackItems[numberOfStackItems - 1];
frame.numberOfStackItems--;
@@ -7112,7 +7111,7 @@ public List traverse(
}
pc++;
break;
- case Opcodes.OPC_swap:
+ case ByteCodes.swap:
numberOfStackItems = frame.numberOfStackItems;
info = frame.stackItems[numberOfStackItems - 1];
info2 = frame.stackItems[numberOfStackItems - 2];
@@ -7120,150 +7119,150 @@ public List traverse(
frame.stackItems[numberOfStackItems - 2] = info;
pc++;
break;
- case Opcodes.OPC_iadd:
- case Opcodes.OPC_ladd:
- case Opcodes.OPC_fadd:
- case Opcodes.OPC_dadd:
- case Opcodes.OPC_isub:
- case Opcodes.OPC_lsub:
- case Opcodes.OPC_fsub:
- case Opcodes.OPC_dsub:
- case Opcodes.OPC_imul:
- case Opcodes.OPC_lmul:
- case Opcodes.OPC_fmul:
- case Opcodes.OPC_dmul:
- case Opcodes.OPC_idiv:
- case Opcodes.OPC_ldiv:
- case Opcodes.OPC_fdiv:
- case Opcodes.OPC_ddiv:
- case Opcodes.OPC_irem:
- case Opcodes.OPC_lrem:
- case Opcodes.OPC_frem:
- case Opcodes.OPC_drem:
- case Opcodes.OPC_ishl:
- case Opcodes.OPC_lshl:
- case Opcodes.OPC_ishr:
- case Opcodes.OPC_lshr:
- case Opcodes.OPC_iushr:
- case Opcodes.OPC_lushr:
- case Opcodes.OPC_iand:
- case Opcodes.OPC_land:
- case Opcodes.OPC_ior:
- case Opcodes.OPC_lor:
- case Opcodes.OPC_ixor:
- case Opcodes.OPC_lxor:
+ case ByteCodes.iadd:
+ case ByteCodes.ladd:
+ case ByteCodes.fadd:
+ case ByteCodes.dadd:
+ case ByteCodes.isub:
+ case ByteCodes.lsub:
+ case ByteCodes.fsub:
+ case ByteCodes.dsub:
+ case ByteCodes.imul:
+ case ByteCodes.lmul:
+ case ByteCodes.fmul:
+ case ByteCodes.dmul:
+ case ByteCodes.idiv:
+ case ByteCodes.ldiv:
+ case ByteCodes.fdiv:
+ case ByteCodes.ddiv:
+ case ByteCodes.imod:
+ case ByteCodes.lmod:
+ case ByteCodes.fmod:
+ case ByteCodes.dmod:
+ case ByteCodes.ishl:
+ case ByteCodes.lshl:
+ case ByteCodes.ishr:
+ case ByteCodes.lshr:
+ case ByteCodes.iushr:
+ case ByteCodes.lushr:
+ case ByteCodes.iand:
+ case ByteCodes.land:
+ case ByteCodes.ior:
+ case ByteCodes.lor:
+ case ByteCodes.ixor:
+ case ByteCodes.lxor:
frame.numberOfStackItems--;
pc++;
break;
- case Opcodes.OPC_ineg:
- case Opcodes.OPC_lneg:
- case Opcodes.OPC_fneg:
- case Opcodes.OPC_dneg:
+ case ByteCodes.ineg:
+ case ByteCodes.lneg:
+ case ByteCodes.fneg:
+ case ByteCodes.dneg:
pc++;
break;
- case Opcodes.OPC_iinc:
+ case ByteCodes.iinc:
pc += 3;
break;
- case Opcodes.OPC_i2l:
+ case ByteCodes.i2l:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG);
pc++;
break;
- case Opcodes.OPC_i2f:
+ case ByteCodes.i2f:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT);
pc++;
break;
- case Opcodes.OPC_i2d:
+ case ByteCodes.i2d:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE);
pc++;
break;
- case Opcodes.OPC_l2i:
+ case ByteCodes.l2i:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT);
pc++;
break;
- case Opcodes.OPC_l2f:
+ case ByteCodes.l2f:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT);
pc++;
break;
- case Opcodes.OPC_l2d:
+ case ByteCodes.l2d:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE);
pc++;
break;
- case Opcodes.OPC_f2i:
+ case ByteCodes.f2i:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT);
pc++;
break;
- case Opcodes.OPC_f2l:
+ case ByteCodes.f2l:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG);
pc++;
break;
- case Opcodes.OPC_f2d:
+ case ByteCodes.f2d:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.DOUBLE);
pc++;
break;
- case Opcodes.OPC_d2i:
+ case ByteCodes.d2i:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT);
pc++;
break;
- case Opcodes.OPC_d2l:
+ case ByteCodes.d2l:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.LONG);
pc++;
break;
- case Opcodes.OPC_d2f:
+ case ByteCodes.d2f:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.FLOAT);
pc++;
break;
- case Opcodes.OPC_i2b:
+ case ByteCodes.int2byte:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.BYTE);
pc++;
break;
- case Opcodes.OPC_i2c:
+ case ByteCodes.int2char:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.CHAR);
pc++;
break;
- case Opcodes.OPC_i2s:
+ case ByteCodes.int2short:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.SHORT);
pc++;
break;
- case Opcodes.OPC_lcmp:
- case Opcodes.OPC_fcmpl:
- case Opcodes.OPC_fcmpg:
- case Opcodes.OPC_dcmpl:
- case Opcodes.OPC_dcmpg:
+ case ByteCodes.lcmp:
+ case ByteCodes.fcmpl:
+ case ByteCodes.fcmpg:
+ case ByteCodes.dcmpl:
+ case ByteCodes.dcmpg:
frame.numberOfStackItems-=2;
frame.addStackItem(new VerificationTypeInfo(TypeBinding.INT));
pc++;
break;
- case Opcodes.OPC_ifeq:
- case Opcodes.OPC_ifne:
- case Opcodes.OPC_iflt:
- case Opcodes.OPC_ifge:
- case Opcodes.OPC_ifgt:
- case Opcodes.OPC_ifle:
+ case ByteCodes.ifeq:
+ case ByteCodes.ifne:
+ case ByteCodes.iflt:
+ case ByteCodes.ifge:
+ case ByteCodes.ifgt:
+ case ByteCodes.ifle:
frame.numberOfStackItems--;
int jumpPC = currentPC + i2At(bytecodes, 1, pc);
addRealJumpTarget(realJumpTarget, jumpPC, frames, createNewFrame(jumpPC, frame, isClinit, methodBinding), scope);
pc += 3;
break;
- case Opcodes.OPC_if_icmpeq:
- case Opcodes.OPC_if_icmpne:
- case Opcodes.OPC_if_icmplt:
- case Opcodes.OPC_if_icmpge:
- case Opcodes.OPC_if_icmpgt:
- case Opcodes.OPC_if_icmple:
- case Opcodes.OPC_if_acmpeq:
- case Opcodes.OPC_if_acmpne:
+ case ByteCodes.if_icmpeq:
+ case ByteCodes.if_icmpne:
+ case ByteCodes.if_icmplt:
+ case ByteCodes.if_icmpge:
+ case ByteCodes.if_icmpgt:
+ case ByteCodes.if_icmple:
+ case ByteCodes.if_acmpeq:
+ case ByteCodes.if_acmpne:
frame.numberOfStackItems -= 2;
jumpPC = currentPC + i2At(bytecodes, 1, pc);
addRealJumpTarget(realJumpTarget, jumpPC, frames, createNewFrame(jumpPC, frame, isClinit, methodBinding), scope);
pc += 3;
break;
- case Opcodes.OPC_goto:
+ case ByteCodes.goto_:
jumpPC = currentPC + i2At(bytecodes, 1, pc);
addRealJumpTarget(realJumpTarget, jumpPC, frames, createNewFrame(jumpPC, frame, isClinit, methodBinding), scope);
pc += 3;
addRealJumpTarget(realJumpTarget, pc - codeOffset);
break;
- case Opcodes.OPC_tableswitch:
+ case ByteCodes.tableswitch:
frame.numberOfStackItems--;
pc++;
while (((pc - codeOffset) & 0x03) != 0) {
@@ -7285,7 +7284,7 @@ public List traverse(
pc += 4;
}
break;
- case Opcodes.OPC_lookupswitch:
+ case ByteCodes.lookupswitch:
frame.numberOfStackItems--;
pc++;
while (((pc - codeOffset) & 0x03) != 0) {
@@ -7304,20 +7303,20 @@ public List traverse(
pc += 4;
}
break;
- case Opcodes.OPC_ireturn:
- case Opcodes.OPC_lreturn:
- case Opcodes.OPC_freturn:
- case Opcodes.OPC_dreturn:
- case Opcodes.OPC_areturn:
+ case ByteCodes.ireturn:
+ case ByteCodes.lreturn:
+ case ByteCodes.freturn:
+ case ByteCodes.dreturn:
+ case ByteCodes.areturn:
frame.numberOfStackItems--;
pc++;
addRealJumpTarget(realJumpTarget, pc - codeOffset);
break;
- case Opcodes.OPC_return:
+ case ByteCodes.return_:
pc++;
addRealJumpTarget(realJumpTarget, pc - codeOffset);
break;
- case Opcodes.OPC_getstatic:
+ case ByteCodes.getstatic:
index = u2At(bytecodes, 1, pc);
int nameAndTypeIndex = u2At(poolContents, 3,
constantPoolOffsets[index]);
@@ -7333,11 +7332,11 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_putstatic:
+ case ByteCodes.putstatic:
frame.numberOfStackItems--;
pc += 3;
break;
- case Opcodes.OPC_getfield:
+ case ByteCodes.getfield:
index = u2At(bytecodes, 1, pc);
nameAndTypeIndex = u2At(poolContents, 3,
constantPoolOffsets[index]);
@@ -7354,11 +7353,11 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_putfield:
+ case ByteCodes.putfield:
frame.numberOfStackItems -= 2;
pc += 3;
break;
- case Opcodes.OPC_invokevirtual:
+ case ByteCodes.invokevirtual:
index = u2At(bytecodes, 1, pc);
nameAndTypeIndex = u2At(poolContents, 3,
constantPoolOffsets[index]);
@@ -7382,7 +7381,7 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_invokedynamic:
+ case ByteCodes.invokedynamic:
index = u2At(bytecodes, 1, pc);
nameAndTypeIndex = u2At(poolContents, 3,
constantPoolOffsets[index]);
@@ -7400,7 +7399,7 @@ public List traverse(
}
pc += 5;
break;
- case Opcodes.OPC_invokespecial:
+ case ByteCodes.invokespecial:
index = u2At(bytecodes, 1, pc);
nameAndTypeIndex = u2At(poolContents, 3,
constantPoolOffsets[index]);
@@ -7429,7 +7428,7 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_invokestatic:
+ case ByteCodes.invokestatic:
index = u2At(bytecodes, 1, pc);
nameAndTypeIndex = u2At(poolContents, 3,
constantPoolOffsets[index]);
@@ -7453,7 +7452,7 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_invokeinterface:
+ case ByteCodes.invokeinterface:
index = u2At(bytecodes, 1, pc);
nameAndTypeIndex = u2At(poolContents, 3,
constantPoolOffsets[index]);
@@ -7480,7 +7479,7 @@ public List traverse(
}
pc += 5;
break;
- case Opcodes.OPC_new:
+ case ByteCodes.new_:
index = u2At(bytecodes, 1, pc);
utf8index = u2At(poolContents, 1,
constantPoolOffsets[index]);
@@ -7494,7 +7493,7 @@ public List traverse(
frame.addStackItem(verificationTypeInfo);
pc += 3;
break;
- case Opcodes.OPC_newarray:
+ case ByteCodes.newarray:
TypeBinding arrayType = null;
switch (u1At(bytecodes, 1, pc)) {
case ClassFileConstants.INT_ARRAY :
@@ -7525,7 +7524,7 @@ public List traverse(
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(arrayType);
pc += 2;
break;
- case Opcodes.OPC_anewarray:
+ case ByteCodes.anewarray:
index = u2At(bytecodes, 1, pc);
utf8index = u2At(poolContents, 1,
constantPoolOffsets[index]);
@@ -7545,16 +7544,16 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_arraylength:
+ case ByteCodes.arraylength:
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT);
pc++;
break;
- case Opcodes.OPC_athrow:
+ case ByteCodes.athrow:
frame.numberOfStackItems--;
pc++;
addRealJumpTarget(realJumpTarget, pc - codeOffset);
break;
- case Opcodes.OPC_checkcast:
+ case ByteCodes.checkcast:
index = u2At(bytecodes, 1, pc);
utf8index = u2At(poolContents, 1,
constantPoolOffsets[index]);
@@ -7568,19 +7567,19 @@ public List traverse(
}
pc += 3;
break;
- case Opcodes.OPC_instanceof:
+ case ByteCodes.instanceof_:
// no need to know the class index = u2At(bytecodes, 1, pc);
frame.stackItems[frame.numberOfStackItems - 1] = new VerificationTypeInfo(TypeBinding.INT);
pc += 3;
break;
- case Opcodes.OPC_monitorenter:
- case Opcodes.OPC_monitorexit:
+ case ByteCodes.monitorenter:
+ case ByteCodes.monitorexit:
frame.numberOfStackItems--;
pc++;
break;
- case Opcodes.OPC_wide:
- opcode = (byte) u1At(bytecodes, 1, pc);
- if (opcode == Opcodes.OPC_iinc) {
+ case ByteCodes.wide:
+ opcode = Byte.toUnsignedInt((byte) u1At(bytecodes, 1, pc));
+ if (opcode == ByteCodes.iinc) {
// index = u2At(bytecodes, 2, pc);
// i2At(bytecodes, 4, pc); // const
// we don't need the index and the const value
@@ -7589,46 +7588,46 @@ public List traverse(
index = u2At(bytecodes, 2, pc);
// need to handle iload, fload, aload, lload, dload, istore, fstore, astore, lstore or dstore
switch(opcode) {
- case Opcodes.OPC_iload :
+ case ByteCodes.iload :
frame.addStackItem(new VerificationTypeInfo(TypeBinding.INT));
break;
- case Opcodes.OPC_fload :
+ case ByteCodes.fload :
frame.addStackItem(new VerificationTypeInfo(TypeBinding.FLOAT));
break;
- case Opcodes.OPC_aload :
+ case ByteCodes.aload :
localsN = frame.locals[index];
if (localsN == null) {
localsN = retrieveLocal(currentPC, index);
}
frame.addStackItem(localsN);
break;
- case Opcodes.OPC_lload :
+ case ByteCodes.lload :
frame.addStackItem(new VerificationTypeInfo(TypeBinding.LONG));
break;
- case Opcodes.OPC_dload :
+ case ByteCodes.dload :
frame.addStackItem(new VerificationTypeInfo(TypeBinding.DOUBLE));
break;
- case Opcodes.OPC_istore :
+ case ByteCodes.istore :
frame.numberOfStackItems--;
break;
- case Opcodes.OPC_fstore :
+ case ByteCodes.fstore :
frame.numberOfStackItems--;
break;
- case Opcodes.OPC_astore :
+ case ByteCodes.astore :
frame.locals[index] = frame.stackItems[frame.numberOfStackItems - 1];
frame.numberOfStackItems--;
break;
- case Opcodes.OPC_lstore :
+ case ByteCodes.lstore :
frame.numberOfStackItems--;
break;
- case Opcodes.OPC_dstore :
+ case ByteCodes.dstore :
frame.numberOfStackItems--;
break;
}
pc += 4;
}
break;
- case Opcodes.OPC_multianewarray:
+ case ByteCodes.multianewarray:
index = u2At(bytecodes, 1, pc);
utf8index = u2At(poolContents, 1,
constantPoolOffsets[index]);
@@ -7645,14 +7644,14 @@ public List traverse(
}
pc += 4;
break;
- case Opcodes.OPC_ifnull:
- case Opcodes.OPC_ifnonnull:
+ case ByteCodes.if_acmp_null:
+ case ByteCodes.if_acmp_nonnull:
frame.numberOfStackItems--;
jumpPC = currentPC + i2At(bytecodes, 1, pc);
addRealJumpTarget(realJumpTarget, jumpPC, frames, createNewFrame(jumpPC, frame, isClinit, methodBinding), scope);
pc += 3;
break;
- case Opcodes.OPC_goto_w:
+ case ByteCodes.goto_w:
jumpPC = currentPC + i4At(bytecodes, 1, pc);
addRealJumpTarget(realJumpTarget, jumpPC, frames, createNewFrame(jumpPC, frame, isClinit, methodBinding), scope);
pc += 5;
@@ -7664,7 +7663,7 @@ public List traverse(
Messages.bind(
Messages.abort_invalidOpcode,
new Object[] {
- Byte.valueOf(opcode),
+ Integer.valueOf(opcode),
Integer.valueOf(pc),
new String(methodBinding.shortReadableName()),
}),
@@ -7674,7 +7673,7 @@ public List traverse(
Messages.bind(
Messages.abort_invalidOpcode,
new Object[] {
- Byte.valueOf(opcode),
+ Integer.valueOf(opcode),
Integer.valueOf(pc),
new String(methodBinding.shortReadableName()),
}),
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
index 61179617b39..53e62de4374 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
@@ -69,6 +69,8 @@
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class AllocationExpression extends Expression implements IPolyExpression, Invocation {
public TypeReference type;
@@ -219,7 +221,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
}
// invoke constructor
if (this.syntheticAccessor == null) {
- codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
} else {
// synthetic accessor got some extra arguments appended to its signature, which need values
for (int i = 0,
@@ -228,7 +230,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
i++) {
codeStream.aconst_null();
}
- codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
}
if (valueRequired) {
codeStream.generateImplicitConversion(this.implicitConversion);
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
index 87b5d8eeb1e..80c92463dab 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
@@ -24,6 +24,9 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.lookup.*;
+
+import com.sun.tools.javac.jvm.ByteCodes;
+
import org.eclipse.jdt.internal.compiler.ASTVisitor;
public class AssertStatement extends Statement {
@@ -115,7 +118,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if (this.assertionSyntheticFieldBinding != null) {
BranchLabel assertionActivationLabel = new BranchLabel(codeStream);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, this.assertionSyntheticFieldBinding, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.getstatic, this.assertionSyntheticFieldBinding, null /* default declaringClass */);
codeStream.ifne(assertionActivationLabel);
BranchLabel falseLabel;
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Clinit.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Clinit.java
index 7320fd11f00..4ec551bc4ba 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Clinit.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Clinit.java
@@ -23,7 +23,6 @@
import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.flow.InitializationFlowContext;
@@ -37,6 +36,8 @@
import org.eclipse.jdt.internal.compiler.parser.Parser;
import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class Clinit extends AbstractMethodDeclaration {
private static int ENUM_CONSTANTS_THRESHOLD = 2000;
@@ -214,7 +215,7 @@ private void generateCode(
falseLabel.place();
codeStream.iconst_0();
jumpLabel.place();
- codeStream.fieldAccess(Opcodes.OPC_putstatic, this.assertionSyntheticFieldBinding, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.putstatic, this.assertionSyntheticFieldBinding, null /* default declaringClass */);
}
boolean isJava9 = classScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK9;
// generate static fields/initializers/enum constants
@@ -239,7 +240,7 @@ private void generateCode(
count++;
if (count > ENUM_CONSTANTS_THRESHOLD) {
SyntheticMethodBinding syntheticMethod = declaringType.binding.addSyntheticMethodForEnumInitialization(begin, i);
- codeStream.invoke(Opcodes.OPC_invokestatic, syntheticMethod, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, syntheticMethod, null /* default declaringClass */);
begin = i;
count = 1;
}
@@ -251,7 +252,7 @@ private void generateCode(
if (count != 0) {
// add last synthetic method
SyntheticMethodBinding syntheticMethod = declaringType.binding.addSyntheticMethodForEnumInitialization(begin, max);
- codeStream.invoke(Opcodes.OPC_invokestatic, syntheticMethod, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, syntheticMethod, null /* default declaringClass */);
}
}
} else if (fieldDeclarations != null) {
@@ -278,13 +279,13 @@ private void generateCode(
if (fieldDecl.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) {
codeStream.dup();
codeStream.generateInlinedValue(fieldDecl.binding.id);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, fieldDecl.binding, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.getstatic, fieldDecl.binding, null /* default declaringClass */);
codeStream.aastore();
}
}
}
}
- codeStream.fieldAccess(Opcodes.OPC_putstatic, declaringType.enumValuesSyntheticfield, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.putstatic, declaringType.enumValuesSyntheticfield, null /* default declaringClass */);
if (remainingFieldCount != 0) {
// if fields that are not enum constants need to be generated (static initializer/static field)
for (int i = 0, max = fieldDeclarations.length; i < max && remainingFieldCount >= 0; i++) {
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index 218bc9f71b3..02dffd0e657 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -33,18 +33,46 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.jdt.core.compiler.*;
-import org.eclipse.jdt.internal.compiler.*;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.ClassFile;
+import org.eclipse.jdt.internal.compiler.CompilationResult;
import org.eclipse.jdt.internal.compiler.ast.TypeReference.AnnotationCollector;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.jdt.internal.compiler.codegen.*;
-import org.eclipse.jdt.internal.compiler.flow.*;
+import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream;
+import org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.jdt.internal.compiler.flow.InitializationFlowContext;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.jdt.internal.compiler.lookup.*;
-import org.eclipse.jdt.internal.compiler.parser.*;
-import org.eclipse.jdt.internal.compiler.problem.*;
+import org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Binding;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
+import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
+import org.eclipse.jdt.internal.compiler.lookup.NestedTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.RecordComponentBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.SyntheticArgumentBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.jdt.internal.compiler.parser.Parser;
+import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
+import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
import org.eclipse.jdt.internal.compiler.util.Util;
+import com.sun.tools.javac.jvm.ByteCodes;
+
@SuppressWarnings({"rawtypes", "unchecked"})
public class ConstructorDeclaration extends AbstractMethodDeclaration {
@@ -357,7 +385,7 @@ public void generateSyntheticFieldInitializationsIfNecessary(MethodScope methodS
if ((syntheticArg = syntheticArgs[i]).matchingField != null) {
codeStream.aload_0();
codeStream.load(syntheticArg);
- codeStream.fieldAccess(Opcodes.OPC_putfield, syntheticArg.matchingField, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.putfield, syntheticArg.matchingField, null /* default declaringClass */);
}
}
}
@@ -368,7 +396,7 @@ public void generateSyntheticFieldInitializationsIfNecessary(MethodScope methodS
if ((syntheticArg = syntheticArgs[i]).matchingField != null) {
codeStream.aload_0();
codeStream.load(syntheticArg);
- codeStream.fieldAccess(Opcodes.OPC_putfield, syntheticArg.matchingField, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.putfield, syntheticArg.matchingField, null /* default declaringClass */);
}
}
}
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
index 37bac3808f7..b16ed526446 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
@@ -38,7 +38,6 @@
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.lookup.Binding;
@@ -61,6 +60,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class ExplicitConstructorCall extends Statement implements Invocation {
public Expression[] arguments;
@@ -190,9 +191,9 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
i++) {
codeStream.aconst_null();
}
- codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
} else {
- codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
} finally {
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
index 714ef30c957..7da61f5ee75 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
@@ -39,6 +39,8 @@
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
import org.eclipse.jdt.internal.compiler.util.Util;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class FieldDeclaration extends AbstractVariableDeclaration {
public FieldBinding binding;
@@ -135,9 +137,9 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
this.initialization.generateCode(currentScope, codeStream, true);
// store into field
if (isStatic) {
- codeStream.fieldAccess(Opcodes.OPC_putstatic, this.binding, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.putstatic, this.binding, null /* default declaringClass */);
} else {
- codeStream.fieldAccess(Opcodes.OPC_putfield, this.binding, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.putfield, this.binding, null /* default declaringClass */);
}
}
// The fields escape CodeStream#exitUserScope(), and as a result end PC wouldn't be set.
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldReference.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
index 3fa15be4397..a3de5fcc94c 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
@@ -28,7 +28,6 @@
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
@@ -52,6 +51,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class FieldReference extends Reference implements InvocationSite {
public static final int READ = 0;
@@ -287,12 +288,12 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
if (this.syntheticAccessors == null || this.syntheticAccessors[FieldReference.READ] == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
if (isStatic) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenBinding, constantPoolDeclaringClass);
} else {
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenBinding, constantPoolDeclaringClass);
}
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
}
// required cast must occur even if no value is required
if (this.genericCast != null) codeStream.checkcast(this.genericCast);
@@ -320,9 +321,9 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
MethodBinding accessor = this.syntheticAccessors == null ? null : this.syntheticAccessors[FieldReference.READ];
if (accessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
switch (codegenBinding.type.id) {
case T_long :
@@ -355,17 +356,17 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
if (isStatic) {
if (this.syntheticAccessors == null || this.syntheticAccessors[FieldReference.READ] == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
}
} else {
codeStream.dup();
if (this.syntheticAccessors == null || this.syntheticAccessors[FieldReference.READ] == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
}
}
int operationTypeID;
@@ -405,17 +406,17 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
if (isStatic) {
if (this.syntheticAccessors == null || this.syntheticAccessors[FieldReference.READ] == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
}
} else {
codeStream.dup();
if (this.syntheticAccessors == null || this.syntheticAccessors[FieldReference.READ] == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[FieldReference.READ], null /* default declaringClass */);
}
}
TypeBinding operandType;
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index 96b05934a98..09e950b205c 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -74,7 +74,6 @@
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo;
@@ -113,6 +112,8 @@
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class MessageSend extends Expression implements IPolyExpression, Invocation {
public Expression receiver;
@@ -552,17 +553,17 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
if (this.syntheticAccessor == null){
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
if (isStatic){
- codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokestatic, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
} else if((this.receiver.isSuper()) ||
(!currentScope.enclosingSourceType().isNestmateOf(this.binding.declaringClass) && codegenBinding.isPrivate())){
- codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
} else if (constantPoolDeclaringClass.isInterface()) { // interface or annotation type
- codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokeinterface, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
} else {
- codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
}
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
}
// required cast must occur even if no value is required
if (this.valueCast != null) codeStream.checkcast(this.valueCast);
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
index 3014f1e67fd..d6c56a4814d 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
@@ -44,7 +44,6 @@
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -74,6 +73,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
/**
* Variation on allocation, where can optionally be specified any of:
* - leading enclosing instance
@@ -219,7 +220,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
// invoke constructor
if (this.syntheticAccessor == null) {
- codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
} else {
// synthetic accessor got some extra arguments appended to its signature, which need values
for (int i = 0,
@@ -228,7 +229,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
i++) {
codeStream.aconst_null();
}
- codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
}
if (valueRequired) {
codeStream.generateImplicitConversion(this.implicitConversion);
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index 81f92f4f819..90c99bf2db0 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -32,7 +32,6 @@
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -58,6 +57,8 @@
import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class QualifiedNameReference extends NameReference {
public char[][] tokens;
@@ -392,12 +393,12 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
if (accessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);
if (isStatic) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.fieldAccess(Opcodes.OPC_getfield, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, lastFieldBinding, constantPoolDeclaringClass);
}
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
if (requiredGenericCast != null) codeStream.checkcast(requiredGenericCast);
if (valueRequired) {
@@ -444,16 +445,16 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
SyntheticMethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
if (lastFieldBinding.isStatic()) {
if (accessor == null) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
} else {
codeStream.dup();
if (accessor == null) {
- codeStream.fieldAccess(Opcodes.OPC_getfield, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
}
// the last field access is a write access
@@ -500,16 +501,16 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
: this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
if (lastFieldBinding.isStatic()) {
if (accessor == null) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, constantPoolDeclaringClass);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, constantPoolDeclaringClass);
}
} else {
codeStream.dup();
if (accessor == null) {
- codeStream.fieldAccess(Opcodes.OPC_getfield, lastFieldBinding, null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.getfield, lastFieldBinding, null /* default declaringClass */);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
}
TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length);
@@ -640,12 +641,12 @@ public FieldBinding generateReadSequence(BlockScope currentScope, CodeStream cod
if (accessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, lastReceiverType, i == 0 && this.indexOfFirstFieldBinding == 1);
if (lastFieldBinding.isStatic()) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.fieldAccess(Opcodes.OPC_getfield, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, lastFieldBinding, constantPoolDeclaringClass);
}
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
if (lastGenericCast != null) {
codeStream.checkcast(lastGenericCast);
@@ -662,9 +663,9 @@ public FieldBinding generateReadSequence(BlockScope currentScope, CodeStream cod
MethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[i];
if (accessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, lastReceiverType, i == 0 && this.indexOfFirstFieldBinding == 1);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
codeStream.pop();
}
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/RecordPattern.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/RecordPattern.java
index 5b4613bbb6c..29166b15e8b 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/RecordPattern.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/RecordPattern.java
@@ -16,7 +16,6 @@
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
@@ -28,6 +27,8 @@
import org.eclipse.jdt.internal.compiler.lookup.Scope;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class RecordPattern extends TypePattern {
public Pattern[] patterns;
@@ -260,7 +261,7 @@ protected void generatePatternVariable(BlockScope currentScope, CodeStream codeS
if (!this.isTotalTypeNode)
codeStream.checkcast(this.resolvedType);
generateArguments(p.accessorMethod, null, currentScope, codeStream);
- codeStream.invoke(Opcodes.OPC_invokevirtual, p.accessorMethod.original(), this.resolvedType, null);
+ codeStream.invoke(ByteCodes.invokevirtual, p.accessorMethod.original(), this.resolvedType, null);
if (!p.accessorMethod.original().equals(p.accessorMethod))
codeStream.checkcast(p.accessorMethod.returnType);
if (!p.isTotalTypeNode) {
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Reference.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Reference.java
index c50f5aac7ae..570079b5d54 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Reference.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/Reference.java
@@ -23,7 +23,6 @@
package org.eclipse.jdt.internal.compiler.ast;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
@@ -38,6 +37,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public abstract class Reference extends Expression {
/**
* BaseLevelReference constructor comment.
@@ -103,9 +104,9 @@ public void fieldStore(Scope currentScope, CodeStream codeStream, FieldBinding f
}
if (syntheticWriteAccessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, fieldBinding, receiverType, isImplicitThisReceiver);
- codeStream.fieldAccess(Opcodes.OPC_putstatic, fieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.putstatic, fieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, syntheticWriteAccessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, syntheticWriteAccessor, null /* default declaringClass */);
}
} else { // Stack: [owner][new field value] ---> [new field value][owner][new field value]
if (valueRequired) {
@@ -121,9 +122,9 @@ public void fieldStore(Scope currentScope, CodeStream codeStream, FieldBinding f
}
if (syntheticWriteAccessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, fieldBinding, receiverType, isImplicitThisReceiver);
- codeStream.fieldAccess(Opcodes.OPC_putfield, fieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.putfield, fieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, syntheticWriteAccessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, syntheticWriteAccessor, null /* default declaringClass */);
}
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
index bf21f48d2d0..628026c4d7f 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
@@ -57,7 +57,6 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FieldInitsFakingFlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
@@ -96,6 +95,8 @@
import org.eclipse.jdt.internal.compiler.parser.Parser;
import org.eclipse.jdt.internal.compiler.parser.Scanner;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class ReferenceExpression extends FunctionalExpression implements IPolyExpression, InvocationSite {
// secret variable name
private static final String SecretReceiverVariableName = " rec_"; //$NON-NLS-1$
@@ -364,7 +365,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
MethodBinding mb = currentScope.getJavaLangObject().getExactMethod(TypeConstants.GETCLASS,
Binding.NO_PARAMETERS, currentScope.compilationUnitScope());
codeStream.dup();
- codeStream.invoke(Opcodes.OPC_invokevirtual, mb, mb.declaringClass);
+ codeStream.invoke(ByteCodes.invokevirtual, mb, mb.declaringClass);
codeStream.pop();
}
if (this.lhs.isSuper() && !this.actualMethodBinding.isPrivate()) {
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index 397a3d168bd..f073eb5af88 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -30,7 +30,6 @@
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -56,6 +55,8 @@
import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class SingleNameReference extends NameReference implements OperatorIds {
public static final int READ = 0;
@@ -457,9 +458,9 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
// managing private access
if ((this.syntheticAccessors == null) || (this.syntheticAccessors[SingleNameReference.READ] == null)) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenField, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
}
} else {
if (!valueRequired
@@ -480,9 +481,9 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
// managing private access
if ((this.syntheticAccessors == null) || (this.syntheticAccessors[SingleNameReference.READ] == null)) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenField, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
}
}
break;
@@ -577,9 +578,9 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
if (codegenField.isStatic()) {
if ((this.syntheticAccessors == null) || (this.syntheticAccessors[SingleNameReference.READ] == null)) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenField, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
}
} else {
if ((this.bits & ASTNode.DepthMASK) != 0) {
@@ -592,9 +593,9 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
codeStream.dup();
if ((this.syntheticAccessors == null) || (this.syntheticAccessors[SingleNameReference.READ] == null)) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenField, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
}
}
break;
@@ -734,9 +735,9 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
if (codegenField.isStatic()) {
if ((this.syntheticAccessors == null) || (this.syntheticAccessors[SingleNameReference.READ] == null)) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenField, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
}
} else {
if ((this.bits & ASTNode.DepthMASK) != 0) {
@@ -749,9 +750,9 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
codeStream.dup();
if ((this.syntheticAccessors == null) || (this.syntheticAccessors[SingleNameReference.READ] == null)) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenField, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
}
}
TypeBinding operandType;
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
index 58252437935..99a327545e2 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
@@ -33,7 +33,6 @@
import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
import org.eclipse.jdt.internal.compiler.codegen.CaseLabel;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.flow.SwitchFlowContext;
@@ -51,6 +50,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding;
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+import com.sun.tools.javac.jvm.ByteCodes;
+
@SuppressWarnings("rawtypes")
public class SwitchStatement extends Expression {
@@ -531,7 +532,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
transformConstants();
} else if (resolvedType1.isEnum()) {
// go through the translation table
- codeStream.invoke(Opcodes.OPC_invokestatic, this.synthetic, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, this.synthetic, null /* default declaringClass */);
this.expression.generateCode(currentScope, codeStream, true);
// get enum constant ordinal()
codeStream.invokeEnumOrdinal(resolvedType1.constantPoolName());
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java
index 5a2082e771c..3bf9cca3741 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/BranchLabel.java
@@ -18,6 +18,8 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class BranchLabel extends Label {
private int[] forwardReferences = new int[10]; // Add an overflow check here.
@@ -196,7 +198,7 @@ public void place() { // Currently lacking wide support.
int oldPosition = this.position;
boolean isOptimizedBranch = false;
if (this.forwardReferenceCount != 0) {
- isOptimizedBranch = (this.forwardReferences[this.forwardReferenceCount - 1] + 2 == this.position) && (this.codeStream.bCodeStream[this.codeStream.classFileOffset - 3] == Opcodes.OPC_goto);
+ isOptimizedBranch = (this.forwardReferences[this.forwardReferenceCount - 1] + 2 == this.position) && (Byte.toUnsignedInt(this.codeStream.bCodeStream[this.codeStream.classFileOffset - 3]) == ByteCodes.goto_);
if (isOptimizedBranch) {
if (this.codeStream.lastAbruptCompletion == this.position) {
this.codeStream.lastAbruptCompletion = -1;
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
index f4d05982566..85f120fb8ad 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
@@ -62,6 +62,8 @@
import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
import org.eclipse.jdt.internal.compiler.util.Util;
+import com.sun.tools.javac.jvm.ByteCodes;
+
@SuppressWarnings({"rawtypes", "unchecked"})
public class CodeStream {
@@ -223,7 +225,7 @@ public void aaload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aaload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aaload;
pushTypeBindingArray();
}
@@ -234,7 +236,7 @@ public void aastore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aastore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aastore;
popTypeBinding(3);
}
@@ -248,7 +250,7 @@ public void aconst_null() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aconst_null;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aconst_null;
pushTypeBinding(TypeBinding.NULL);
}
@@ -315,8 +317,8 @@ public void aload(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aload;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aload;
writeUnsignedShort(iArg);
} else {
// Don't need to use the wide bytecode
@@ -324,7 +326,7 @@ public void aload(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aload;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -343,7 +345,7 @@ public void aload_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aload_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aload_0;
}
public void aload_1() {
@@ -359,7 +361,7 @@ public void aload_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aload_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aload_1;
}
public void aload_2() {
@@ -375,7 +377,7 @@ public void aload_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aload_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aload_2;
}
public void aload_3() {
@@ -391,7 +393,7 @@ public void aload_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_aload_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.aload_3;
}
public void anewarray(TypeBinding typeBinding) {
@@ -400,7 +402,7 @@ public void anewarray(TypeBinding typeBinding) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_anewarray;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.anewarray;
writeUnsignedShort(this.constantPool.literalIndexForType(typeBinding));
pushTypeBinding(1, typeBinding);
}
@@ -414,7 +416,7 @@ public void areturn() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_areturn;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.areturn;
this.lastAbruptCompletion = this.position;
}
@@ -498,7 +500,7 @@ public void arraylength() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_arraylength;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.arraylength;
pushTypeBinding(1, TypeBinding.INT);
}
@@ -514,15 +516,15 @@ public void astore(int iArg) {
resizeByteArray();
}
this.position+=2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_astore;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.astore;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position+=2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_astore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.astore;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -538,7 +540,7 @@ public void astore_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_astore_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.astore_0;
}
public void astore_1() {
@@ -552,7 +554,7 @@ public void astore_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_astore_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.astore_1;
}
public void astore_2() {
@@ -566,7 +568,7 @@ public void astore_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_astore_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.astore_2;
}
public void astore_3() {
@@ -580,7 +582,7 @@ public void astore_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_astore_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.astore_3;
}
public void athrow() {
@@ -591,7 +593,7 @@ public void athrow() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_athrow;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.athrow;
this.lastAbruptCompletion = this.position;
}
@@ -603,7 +605,7 @@ public void baload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_baload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.baload;
}
public void bastore() {
@@ -614,7 +616,7 @@ public void bastore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_bastore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.bastore;
}
public void bipush(byte b) {
@@ -627,7 +629,7 @@ public void bipush(byte b) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_bipush;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.bipush;
this.bCodeStream[this.classFileOffset++] = b;
}
@@ -639,7 +641,7 @@ public void caload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_caload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.caload;
}
public void castore() {
@@ -650,7 +652,7 @@ public void castore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_castore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.castore;
}
public void checkcast(int baseId) {
@@ -659,7 +661,7 @@ public void checkcast(int baseId) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_checkcast;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.checkcast;
switch (baseId) {
case TypeIds.T_byte :
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangByteConstantPoolName));
@@ -698,7 +700,7 @@ public void checkcast(TypeReference typeReference, TypeBinding typeBinding, int
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_checkcast;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.checkcast;
writeUnsignedShort(this.constantPool.literalIndexForType(typeBinding));
pushTypeBinding(1, typeBinding);
@@ -712,7 +714,7 @@ public void d2f() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_d2f;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.d2f;
}
public void d2i() {
@@ -723,7 +725,7 @@ public void d2i() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_d2i;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.d2i;
}
public void d2l() {
@@ -732,7 +734,7 @@ public void d2l() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_d2l;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.d2l;
pushTypeBinding(1, TypeBinding.LONG);
}
@@ -743,7 +745,7 @@ public void dadd() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dadd;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dadd;
pushTypeBinding(2, TypeBinding.DOUBLE);
}
@@ -753,7 +755,7 @@ public void daload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_daload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.daload;
pushTypeBindingArray();
}
@@ -764,7 +766,7 @@ public void dastore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dastore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dastore;
popTypeBinding(3);
}
@@ -775,7 +777,7 @@ public void dcmpg() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dcmpg;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.dcmpg;
pushTypeBinding(2, TypeBinding.INT);
}
@@ -786,7 +788,7 @@ public void dcmpl() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dcmpl;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.dcmpl;
pushTypeBinding(2, TypeBinding.INT);
}
@@ -800,7 +802,7 @@ public void dconst_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dconst_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dconst_0;
}
public void dconst_1() {
@@ -813,7 +815,7 @@ public void dconst_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dconst_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dconst_1;
}
public void ddiv() {
@@ -824,7 +826,7 @@ public void ddiv() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ddiv;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ddiv;
}
public void decrStackSize(int offset) {
@@ -845,8 +847,8 @@ public void dload(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dload;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dload;
writeUnsignedShort(iArg);
} else {
// Don't need to use the wide bytecode
@@ -854,7 +856,7 @@ public void dload(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dload;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -872,7 +874,7 @@ public void dload_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dload_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dload_0;
}
public void dload_1() {
@@ -888,7 +890,7 @@ public void dload_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dload_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dload_1;
}
public void dload_2() {
@@ -904,7 +906,7 @@ public void dload_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dload_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dload_2;
}
public void dload_3() {
@@ -920,7 +922,7 @@ public void dload_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dload_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dload_3;
}
public void dmul() {
@@ -931,7 +933,7 @@ public void dmul() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dmul;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dmul;
}
public void dneg() {
@@ -940,7 +942,7 @@ public void dneg() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dneg;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dneg;
pushTypeBinding(1, TypeBinding.DOUBLE);
}
@@ -952,7 +954,7 @@ public void drem() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_drem;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dmod;
}
public void dreturn() {
@@ -964,7 +966,7 @@ public void dreturn() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dreturn;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.dreturn;
this.lastAbruptCompletion = this.position;
}
@@ -980,15 +982,15 @@ public void dstore(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dstore;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dstore;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dstore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dstore;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -1004,7 +1006,7 @@ public void dstore_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dstore_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dstore_0;
}
public void dstore_1() {
@@ -1018,7 +1020,7 @@ public void dstore_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dstore_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dstore_1;
}
public void dstore_2() {
@@ -1032,7 +1034,7 @@ public void dstore_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dstore_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dstore_2;
}
public void dstore_3() {
@@ -1046,7 +1048,7 @@ public void dstore_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dstore_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dstore_3;
}
public void dsub() {
@@ -1057,7 +1059,7 @@ public void dsub() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dsub;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dsub;
}
public void dup() {
@@ -1073,7 +1075,7 @@ public void dup() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dup;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dup;
}
private void adjustTypeBindingStackForDupX1() {
@@ -1095,7 +1097,7 @@ public void dup_x1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dup_x1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dup_x1;
}
private void adjustTypeBindingStackForDupX2() {
@@ -1129,7 +1131,7 @@ public void dup_x2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dup_x2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dup_x2;
}
private void adjustTypeBindingStackForDup2() {
@@ -1159,7 +1161,7 @@ public void dup2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dup2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dup2;
}
private void adjustTypeBindingStackForDup2X1() {
@@ -1196,7 +1198,7 @@ public void dup2_x1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dup2_x1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dup2_x1;
}
private void adjustTypeBindingStackForDup2X2() {
@@ -1254,7 +1256,7 @@ public void dup2_x2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_dup2_x2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.dup2_x2;
}
public void exitUserScope(BlockScope currentScope) {
@@ -1312,7 +1314,7 @@ public void f2d() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_f2d;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.f2d;
}
public void f2i() {
@@ -1321,7 +1323,7 @@ public void f2i() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_f2i;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.f2i;
pushTypeBinding(1, TypeBinding.INT);
}
@@ -1335,7 +1337,7 @@ public void f2l() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_f2l;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.f2l;
}
public void fadd() {
@@ -1346,7 +1348,7 @@ public void fadd() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fadd;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fadd;
}
public void faload() {
@@ -1357,7 +1359,7 @@ public void faload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_faload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.faload;
}
public void fastore() {
@@ -1368,7 +1370,7 @@ public void fastore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fastore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fastore;
}
public void fcmpg() {
@@ -1379,7 +1381,7 @@ public void fcmpg() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fcmpg;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.fcmpg;
}
public void fcmpl() {
@@ -1390,7 +1392,7 @@ public void fcmpl() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fcmpl;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.fcmpl;
}
public void fconst_0() {
@@ -1403,7 +1405,7 @@ public void fconst_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fconst_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fconst_0;
}
public void fconst_1() {
@@ -1416,7 +1418,7 @@ public void fconst_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fconst_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fconst_1;
}
public void fconst_2() {
@@ -1429,7 +1431,7 @@ public void fconst_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fconst_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fconst_2;
}
public void fdiv() {
@@ -1440,10 +1442,10 @@ public void fdiv() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fdiv;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fdiv;
}
-public void fieldAccess(byte opcode, FieldBinding fieldBinding, TypeBinding declaringClass) {
+public void fieldAccess(int opcode, FieldBinding fieldBinding, TypeBinding declaringClass) {
if (declaringClass == null) declaringClass = fieldBinding.declaringClass;
if ((declaringClass.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
Util.recordNestedType(this.classFile, declaringClass);
@@ -1462,19 +1464,19 @@ public void fieldAccess(byte opcode, FieldBinding fieldBinding, TypeBinding decl
this.fieldAccess(opcode, returnTypeSize, declaringClass.constantPoolName(), fieldBinding.name, returnType.signature(), returnType.id, returnType);
}
-private void fieldAccess(byte opcode, int returnTypeSize, char[] declaringClass, char[] fieldName, char[] signature, int typeId) {
+private void fieldAccess(int opcode, int returnTypeSize, char[] declaringClass, char[] fieldName, char[] signature, int typeId) {
fieldAccess(opcode, returnTypeSize, declaringClass, fieldName, signature, typeId, null);
}
-private void fieldAccess(byte opcode, int returnTypeSize, char[] declaringClass, char[] fieldName, char[] signature, int typeId, TypeBinding typeBinding) {
+private void fieldAccess(int opcode, int returnTypeSize, char[] declaringClass, char[] fieldName, char[] signature, int typeId, TypeBinding typeBinding) {
this.countLabels = 0;
switch(opcode) {
- case Opcodes.OPC_getfield :
+ case ByteCodes.getfield :
if (returnTypeSize == 2) {
this.stackDepth++;
}
pushTypeBinding(1, typeBinding);
break;
- case Opcodes.OPC_getstatic :
+ case ByteCodes.getstatic :
if (returnTypeSize == 2) {
this.stackDepth += 2;
pushTypeBinding(typeBinding);
@@ -1483,7 +1485,7 @@ private void fieldAccess(byte opcode, int returnTypeSize, char[] declaringClass,
pushTypeBinding(typeBinding);
}
break;
- case Opcodes.OPC_putfield :
+ case ByteCodes.putfield :
if (returnTypeSize == 2) {
this.stackDepth -= 3;
popTypeBinding(2);
@@ -1492,7 +1494,7 @@ private void fieldAccess(byte opcode, int returnTypeSize, char[] declaringClass,
popTypeBinding(2);
}
break;
- case Opcodes.OPC_putstatic :
+ case ByteCodes.putstatic :
if (returnTypeSize == 2) {
this.stackDepth -= 2;
popTypeBinding();
@@ -1508,7 +1510,7 @@ private void fieldAccess(byte opcode, int returnTypeSize, char[] declaringClass,
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = opcode;
+ this.bCodeStream[this.classFileOffset++] = (byte)opcode;
writeUnsignedShort(this.constantPool.literalIndexForField(declaringClass, fieldName, signature));
}
@@ -1526,15 +1528,15 @@ public void fload(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fload;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fload;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fload;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -1552,7 +1554,7 @@ public void fload_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fload_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fload_0;
}
public void fload_1() {
@@ -1568,7 +1570,7 @@ public void fload_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fload_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fload_1;
}
public void fload_2() {
@@ -1584,7 +1586,7 @@ public void fload_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fload_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fload_2;
}
public void fload_3() {
@@ -1600,7 +1602,7 @@ public void fload_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fload_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fload_3;
}
public void fmul() {
@@ -1611,7 +1613,7 @@ public void fmul() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fmul;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fmul;
}
public void fneg() {
@@ -1620,7 +1622,7 @@ public void fneg() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fneg;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fneg;
pushTypeBinding(1, TypeBinding.FLOAT);
}
@@ -1632,7 +1634,7 @@ public void frem() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_frem;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fmod;
}
public void freturn() {
@@ -1644,7 +1646,7 @@ public void freturn() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_freturn;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.freturn;
this.lastAbruptCompletion = this.position;
}
@@ -1660,15 +1662,15 @@ public void fstore(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fstore;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fstore;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fstore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fstore;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -1684,7 +1686,7 @@ public void fstore_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fstore_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fstore_0;
}
public void fstore_1() {
@@ -1698,7 +1700,7 @@ public void fstore_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fstore_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fstore_1;
}
public void fstore_2() {
@@ -1712,7 +1714,7 @@ public void fstore_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fstore_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fstore_2;
}
public void fstore_3() {
@@ -1726,7 +1728,7 @@ public void fstore_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fstore_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fstore_3;
}
public void fsub() {
@@ -1737,7 +1739,7 @@ public void fsub() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_fsub;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.fsub;
}
public void generateBoxingConversion(int unboxedTypeID) {
@@ -1746,7 +1748,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if (this.targetLevel >= ClassFileConstants.JDK1_5) {
// invokestatic: Byte.valueOf(byte)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangByteConstantPoolName,
@@ -1760,7 +1762,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
dup_x1();
swap();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangByteConstantPoolName,
@@ -1774,7 +1776,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if ( this.targetLevel >= ClassFileConstants.JDK1_5 ) {
// invokestatic: Short.valueOf(short)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangShortConstantPoolName,
@@ -1788,7 +1790,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
dup_x1();
swap();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangShortConstantPoolName,
@@ -1802,7 +1804,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if ( this.targetLevel >= ClassFileConstants.JDK1_5 ) {
// invokestatic: Character.valueOf(char)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangCharacterConstantPoolName,
@@ -1816,7 +1818,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
dup_x1();
swap();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangCharacterConstantPoolName,
@@ -1830,7 +1832,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if (this.targetLevel >= ClassFileConstants.JDK1_5) {
// invokestatic: Integer.valueOf(int)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangIntegerConstantPoolName,
@@ -1844,7 +1846,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
dup_x1();
swap();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangIntegerConstantPoolName,
@@ -1858,7 +1860,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if (this.targetLevel >= ClassFileConstants.JDK1_5) {
// invokestatic: Long.valueOf(long)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangLongConstantPoolName,
@@ -1873,7 +1875,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
dup_x2();
pop();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
3, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangLongConstantPoolName,
@@ -1887,7 +1889,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if ( this.targetLevel >= ClassFileConstants.JDK1_5 ) {
// invokestatic: Float.valueOf(float)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangFloatConstantPoolName,
@@ -1901,7 +1903,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
dup_x1();
swap();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangFloatConstantPoolName,
@@ -1915,7 +1917,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if ( this.targetLevel >= ClassFileConstants.JDK1_5 ) {
// invokestatic: Double.valueOf(double)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangDoubleConstantPoolName,
@@ -1931,7 +1933,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
pop();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
3, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangDoubleConstantPoolName,
@@ -1946,7 +1948,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
if ( this.targetLevel >= ClassFileConstants.JDK1_5 ) {
// invokestatic: Boolean.valueOf(boolean)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangBooleanConstantPoolName,
@@ -1960,7 +1962,7 @@ public void generateBoxingConversion(int unboxedTypeID) {
dup_x1();
swap();
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangBooleanConstantPoolName,
@@ -1986,7 +1988,7 @@ public void generateClassLiteralAccessForType(Scope scope, TypeBinding accessedT
} else {
BranchLabel endLabel = new BranchLabel(this);
if (syntheticFieldBinding != null) { // non interface case
- fieldAccess(Opcodes.OPC_getstatic, syntheticFieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.getstatic, syntheticFieldBinding, null /* default declaringClass */);
dup();
ifnonnull(endLabel);
pop();
@@ -2029,7 +2031,7 @@ into a NoClassDefError(old ex message), we thus need to build an exception handl
if (syntheticFieldBinding != null) { // non interface case
dup();
- fieldAccess(Opcodes.OPC_putstatic, syntheticFieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.putstatic, syntheticFieldBinding, null /* default declaringClass */);
}
goto_(endLabel);
@@ -2563,16 +2565,16 @@ public void generateOuterAccess(Object[] mappingSequence, ASTNode invocationSite
} else if (mappingSequence[0] instanceof FieldBinding) {
FieldBinding fieldBinding = (FieldBinding) mappingSequence[0];
aload_0();
- fieldAccess(Opcodes.OPC_getfield, fieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.getfield, fieldBinding, null /* default declaringClass */);
} else {
load((LocalVariableBinding) mappingSequence[0]);
}
for (int i = 1, length = mappingSequence.length; i < length; i++) {
if (mappingSequence[i] instanceof FieldBinding) {
FieldBinding fieldBinding = (FieldBinding) mappingSequence[i];
- fieldAccess(Opcodes.OPC_getfield, fieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.getfield, fieldBinding, null /* default declaringClass */);
} else {
- invoke(Opcodes.OPC_invokestatic, (MethodBinding) mappingSequence[i], null /* default declaringClass */);
+ invoke(ByteCodes.invokestatic, (MethodBinding) mappingSequence[i], null /* default declaringClass */);
}
}
}
@@ -2736,7 +2738,7 @@ public void generateSyntheticBodyForConstructorAccess(SyntheticMethodBinding acc
}
}
}
- invoke(Opcodes.OPC_invokespecial, constructorBinding, null /* default declaringClass */);
+ invoke(ByteCodes.invokespecial, constructorBinding, null /* default declaringClass */);
return_();
}
public void generateSyntheticBodyForArrayConstructor(SyntheticMethodBinding methodBinding) {
@@ -2750,7 +2752,7 @@ public void generateSyntheticBodyForArrayClone(SyntheticMethodBinding methodBind
TypeBinding arrayType = methodBinding.parameters[0];
aload_0();
invoke( // // invokevirtual: "[I".clone:()Ljava/lang/Object;
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
arrayType.signature(), // declaring class e.g "[I"
@@ -2786,7 +2788,7 @@ public void generateSyntheticBodyForFactoryMethod(SyntheticMethodBinding methodB
for (int i = 0; i < methodBinding.fakePaddedParameters; i++)
aconst_null();
- invoke(Opcodes.OPC_invokespecial, constructorBinding, null /* default declaringClass */);
+ invoke(ByteCodes.invokespecial, constructorBinding, null /* default declaringClass */);
areturn();
}
//static X valueOf(String name) {
@@ -2833,7 +2835,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
// Generate the first switch, on method name hashcode
aload_0();
- invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName, ConstantPool.GetImplMethodName, ConstantPool.GetImplMethodNameSignature,
+ invoke(ByteCodes.invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName, ConstantPool.GetImplMethodName, ConstantPool.GetImplMethodNameSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
astore_1();
LocalVariableBinding lvb1 = new LocalVariableBinding("hashcode".toCharArray(),scope.getJavaLangString(),0,false); //$NON-NLS-1$
@@ -2929,7 +2931,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
FunctionalExpression funcEx = syntheticMethodBinding.lambda != null ? syntheticMethodBinding.lambda
: syntheticMethodBinding.serializableMethodRef;
MethodBinding mb = funcEx.binding;
- invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
+ invoke(ByteCodes.invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetImplMethodKind, ConstantPool.GetImplMethodKindSignature, TypeIds.T_int,
TypeBinding.INT);
byte methodKind = 0;
@@ -2949,7 +2951,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
// Compare FunctionalInterfaceClass
aload_0();
- invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
+ invoke(ByteCodes.invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetFunctionalInterfaceClass, ConstantPool.GetFunctionalInterfaceClassSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
String functionalInterface = null;
@@ -2966,7 +2968,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
// Compare FunctionalInterfaceMethodName
aload_0();
- invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
+ invoke(ByteCodes.invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetFunctionalInterfaceMethodName,
ConstantPool.GetFunctionalInterfaceMethodNameSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
@@ -2976,7 +2978,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
// Compare FunctionalInterfaceMethodSignature
aload_0();
- invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
+ invoke(ByteCodes.invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetFunctionalInterfaceMethodSignature,
ConstantPool.GetFunctionalInterfaceMethodSignatureSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
@@ -2986,7 +2988,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
// Compare ImplClass
aload_0();
- invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
+ invoke(ByteCodes.invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetImplClass, ConstantPool.GetImplClassSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
ldc(new String(mb.declaringClass.constantPoolName())); // e.g. "com/foo/X"
@@ -2995,7 +2997,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
// Compare ImplMethodSignature
aload_0();
- invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
+ invoke(ByteCodes.invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetImplMethodSignature, ConstantPool.GetImplMethodSignatureSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
ldc(new String(mb.original().signature())); // e.g. "(I)I"
@@ -3022,7 +3024,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
if (receiverType != null) {
aload_0();
loadInt(index++);
- invoke(Opcodes.OPC_invokevirtual, 1, 1,
+ invoke(ByteCodes.invokevirtual, 1, 1,
ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetCapturedArg, ConstantPool.GetCapturedArgSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
@@ -3033,7 +3035,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
TypeBinding varType = outerLocalVariables[p].type;
aload_0();
loadInt(index);
- invoke(Opcodes.OPC_invokevirtual, 1, 1,
+ invoke(ByteCodes.invokevirtual, 1, 1,
ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName,
ConstantPool.GetCapturedArg, ConstantPool.GetCapturedArgSignature,
getPopularBinding(ConstantPool.JavaLangStringConstantPoolName));
@@ -3076,7 +3078,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
ldc("Invalid lambda deserialization"); //$NON-NLS-1$ // TODO into a constant?
// invokespecial: java.lang.IllegalArgumentException.(Ljava/lang/String;)V
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangIllegalArgumentExceptionConstantPoolName,
@@ -3125,7 +3127,7 @@ public void generateSyntheticBodyForEnumValues(SyntheticMethodBinding methodBind
ClassScope scope = ((SourceTypeBinding)methodBinding.declaringClass).scope;
initializeMaxLocals(methodBinding);
TypeBinding enumArray = methodBinding.returnType;
- fieldAccess(Opcodes.OPC_getstatic, scope.referenceContext.enumValuesSyntheticfield, null /* default declaringClass */);
+ fieldAccess(ByteCodes.getstatic, scope.referenceContext.enumValuesSyntheticfield, null /* default declaringClass */);
dup();
astore_0();
iconst_0();
@@ -3168,10 +3170,10 @@ public void generateSyntheticBodyForFieldReadAccess(SyntheticMethodBinding acces
? accessMethod.declaringClass.superclass()
: accessMethod.declaringClass;
if (fieldBinding.isStatic()) {
- fieldAccess(Opcodes.OPC_getstatic, fieldBinding, declaringClass);
+ fieldAccess(ByteCodes.getstatic, fieldBinding, declaringClass);
} else {
aload_0();
- fieldAccess(Opcodes.OPC_getfield, fieldBinding, declaringClass);
+ fieldAccess(ByteCodes.getfield, fieldBinding, declaringClass);
}
switch (fieldBinding.type.id) {
// case T_void :
@@ -3207,11 +3209,11 @@ public void generateSyntheticBodyForFieldWriteAccess(SyntheticMethodBinding acce
: accessMethod.declaringClass;
if (fieldBinding.isStatic()) {
load(fieldBinding.type, 0);
- fieldAccess(Opcodes.OPC_putstatic, fieldBinding, declaringClass);
+ fieldAccess(ByteCodes.putstatic, fieldBinding, declaringClass);
} else {
aload_0();
load(fieldBinding.type, 1);
- fieldAccess(Opcodes.OPC_putfield, fieldBinding, declaringClass);
+ fieldAccess(ByteCodes.putfield, fieldBinding, declaringClass);
}
return_();
}
@@ -3252,7 +3254,7 @@ public void generateSyntheticBodyForMethodAccess(SyntheticMethodBinding accessMe
}
}
if (targetMethod.isStatic())
- invoke(Opcodes.OPC_invokestatic, targetMethod, accessMethod.declaringClass); // target method declaring class may not be accessible (128563)
+ invoke(ByteCodes.invokestatic, targetMethod, accessMethod.declaringClass); // target method declaring class may not be accessible (128563)
else {
if (targetMethod.isConstructor()
|| targetMethod.isPrivate()
@@ -3262,12 +3264,12 @@ public void generateSyntheticBodyForMethodAccess(SyntheticMethodBinding accessMe
TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperMethodAccess
? findDirectSuperTypeTowards(accessMethod, targetMethod)
: accessMethod.declaringClass;
- invoke(Opcodes.OPC_invokespecial, targetMethod, declaringClass);
+ invoke(ByteCodes.invokespecial, targetMethod, declaringClass);
} else {
if (targetMethod.declaringClass.isInterface()) { // interface or annotation type
- invoke(Opcodes.OPC_invokeinterface, targetMethod, null /* default declaringClass */);
+ invoke(ByteCodes.invokeinterface, targetMethod, null /* default declaringClass */);
} else {
- invoke(Opcodes.OPC_invokevirtual, targetMethod, accessMethod.declaringClass); // target method declaring class may not be accessible (128563)
+ invoke(ByteCodes.invokevirtual, targetMethod, accessMethod.declaringClass); // target method declaring class may not be accessible (128563)
}
}
}
@@ -3330,7 +3332,7 @@ public void generateSyntheticBodyForSwitchTable(SyntheticMethodBinding methodBin
initializeMaxLocals(methodBinding);
final BranchLabel nullLabel = new BranchLabel(this);
FieldBinding syntheticFieldBinding = methodBinding.targetReadField;
- fieldAccess(Opcodes.OPC_getstatic, syntheticFieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.getstatic, syntheticFieldBinding, null /* default declaringClass */);
dup();
ifnull(nullLabel);
areturn();
@@ -3354,7 +3356,7 @@ public void generateSyntheticBodyForSwitchTable(SyntheticMethodBinding methodBin
final ExceptionLabel anyExceptionHandler = new ExceptionLabel(this, TypeBinding.LONG /* represents NoSuchFieldError*/);
anyExceptionHandler.placeStart();
aload_0();
- fieldAccess(Opcodes.OPC_getstatic, fieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.getstatic, fieldBinding, null /* default declaringClass */);
invokeEnumOrdinal(enumBinding.constantPoolName());
this.generateInlinedValue(fieldBinding.id + 1); // zero should not be returned see bug 141810
iastore();
@@ -3372,7 +3374,7 @@ public void generateSyntheticBodyForSwitchTable(SyntheticMethodBinding methodBin
if (scope.compilerOptions().complianceLevel < ClassFileConstants.JDK9 || !syntheticFieldBinding.isFinal()) {
// Modifying a final field outside of the method is not allowed in 9
dup();
- fieldAccess(Opcodes.OPC_putstatic, syntheticFieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.putstatic, syntheticFieldBinding, null /* default declaringClass */);
}
areturn();
removeVariable(localVariableBinding);
@@ -3473,7 +3475,7 @@ public void generateSyntheticBodyForRecordCanonicalConstructor(SyntheticMethodBi
ReferenceBinding superClass = declaringClass.superclass();
MethodBinding superCons = superClass.getExactConstructor(new TypeBinding[0]);
aload_0();
- invoke(Opcodes.OPC_invokespecial, superCons, superClass);
+ invoke(ByteCodes.invokespecial, superCons, superClass);
int resolvedPosition;
FieldBinding[] fields = declaringClass.getImplicitComponentFields();
int len = fields != null ? fields.length : 0;
@@ -3492,7 +3494,7 @@ public void generateSyntheticBodyForRecordCanonicalConstructor(SyntheticMethodBi
resolvedPosition++;
break;
}
- fieldAccess(Opcodes.OPC_putfield, field, declaringClass);
+ fieldAccess(ByteCodes.putfield, field, declaringClass);
}
return_();
}
@@ -3530,7 +3532,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_byte :
// invokevirtual: byteValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangByteConstantPoolName,
@@ -3542,7 +3544,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_short :
// invokevirtual: shortValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangShortConstantPoolName,
@@ -3554,7 +3556,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_char :
// invokevirtual: charValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangCharacterConstantPoolName,
@@ -3566,7 +3568,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_int :
// invokevirtual: intValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangIntegerConstantPoolName,
@@ -3578,7 +3580,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_long :
// invokevirtual: longValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
2, // return type size
ConstantPool.JavaLangLongConstantPoolName,
@@ -3590,7 +3592,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_float :
// invokevirtual: floatValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangFloatConstantPoolName,
@@ -3602,7 +3604,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_double :
// invokevirtual: doubleValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
2, // return type size
ConstantPool.JavaLangDoubleConstantPoolName,
@@ -3614,7 +3616,7 @@ public void generateUnboxingConversion(int unboxedTypeID) {
case TypeIds.T_boolean :
// invokevirtual: booleanValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangBooleanConstantPoolName,
@@ -3634,13 +3636,13 @@ public void generateUnboxingConversion(int unboxedTypeID) {
* gotow WideTarget
* Intermediate:
*/
-public void generateWideRevertedConditionalBranch(byte revertedOpcode, BranchLabel wideTarget) {
+public void generateWideRevertedConditionalBranch(int revertedOpcode, BranchLabel wideTarget) {
BranchLabel intermediate = new BranchLabel(this);
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = revertedOpcode;
+ this.bCodeStream[this.classFileOffset++] = (byte)revertedOpcode;
intermediate.branch();
goto_w(wideTarget);
intermediate.place();
@@ -3651,7 +3653,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_byte :
// invokevirtual: byteValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangByteConstantPoolName,
@@ -3663,7 +3665,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_short :
// invokevirtual: shortValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangShortConstantPoolName,
@@ -3675,7 +3677,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_char :
// invokevirtual: charValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangCharacterConstantPoolName,
@@ -3687,7 +3689,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_int :
// invokevirtual: intValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangIntegerConstantPoolName,
@@ -3699,7 +3701,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_long :
// invokevirtual: longValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
2, // return type size
ConstantPool.JavaLangLongConstantPoolName,
@@ -3711,7 +3713,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_float :
// invokevirtual: floatValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangFloatConstantPoolName,
@@ -3723,7 +3725,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_double :
// invokevirtual: doubleValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
2, // return type size
ConstantPool.JavaLangDoubleConstantPoolName,
@@ -3735,7 +3737,7 @@ public void getBaseTypeValue(int baseTypeID) {
case TypeIds.T_boolean :
// invokevirtual: booleanValue()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangBooleanConstantPoolName,
@@ -3841,7 +3843,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_byte :
// getstatic: java.lang.Byte.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangByteConstantPoolName,
ConstantPool.TYPE,
@@ -3851,7 +3853,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_short :
// getstatic: java.lang.Short.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangShortConstantPoolName,
ConstantPool.TYPE,
@@ -3861,7 +3863,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_char :
// getstatic: java.lang.Character.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangCharacterConstantPoolName,
ConstantPool.TYPE,
@@ -3871,7 +3873,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_int :
// getstatic: java.lang.Integer.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangIntegerConstantPoolName,
ConstantPool.TYPE,
@@ -3881,7 +3883,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_long :
// getstatic: java.lang.Long.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangLongConstantPoolName,
ConstantPool.TYPE,
@@ -3891,7 +3893,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_float :
// getstatic: java.lang.Float.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangFloatConstantPoolName,
ConstantPool.TYPE,
@@ -3901,7 +3903,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_double :
// getstatic: java.lang.Double.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangDoubleConstantPoolName,
ConstantPool.TYPE,
@@ -3911,7 +3913,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_boolean :
// getstatic: java.lang.Boolean.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangBooleanConstantPoolName,
ConstantPool.TYPE,
@@ -3921,7 +3923,7 @@ public void getTYPE(int baseTypeID) {
case TypeIds.T_void :
// getstatic: java.lang.Void.TYPE
fieldAccess(
- Opcodes.OPC_getstatic,
+ ByteCodes.getstatic,
1, // return type size
ConstantPool.JavaLangVoidConstantPoolName,
ConstantPool.TYPE,
@@ -3972,7 +3974,7 @@ public Object foo() {
return;
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_goto;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.goto_;
label.branch();
this.lastAbruptCompletion = this.position;
}
@@ -3982,7 +3984,7 @@ public void goto_w(BranchLabel label) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_goto_w;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.goto_w;
label.branchWide();
this.lastAbruptCompletion = this.position;
}
@@ -3993,7 +3995,7 @@ public void i2b() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_i2b;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.int2byte;
pushTypeBinding(1, TypeBinding.INT);
}
@@ -4003,7 +4005,7 @@ public void i2c() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_i2c;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.int2char;
pushTypeBinding(1, TypeBinding.INT);
}
@@ -4017,7 +4019,7 @@ public void i2d() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_i2d;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.i2d;
}
public void i2f() {
@@ -4026,7 +4028,7 @@ public void i2f() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_i2f;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.i2f;
pushTypeBinding(1, TypeBinding.FLOAT);
}
@@ -4040,7 +4042,7 @@ public void i2l() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_i2l;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.i2l;
}
public void i2s() {
@@ -4049,7 +4051,7 @@ public void i2s() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_i2s;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.int2short;
pushTypeBinding(1, TypeBinding.INT);
}
@@ -4061,7 +4063,7 @@ public void iadd() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iadd;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iadd;
}
public void iaload() {
@@ -4072,7 +4074,7 @@ public void iaload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iaload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iaload;
}
public void iand() {
@@ -4083,7 +4085,7 @@ public void iand() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iand;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iand;
}
public void iastore() {
@@ -4094,7 +4096,7 @@ public void iastore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iastore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iastore;
}
public void iconst_0() {
@@ -4107,7 +4109,7 @@ public void iconst_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iconst_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iconst_0;
}
public void iconst_1() {
@@ -4120,7 +4122,7 @@ public void iconst_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iconst_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iconst_1;
}
public void iconst_2() {
@@ -4133,7 +4135,7 @@ public void iconst_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iconst_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iconst_2;
}
public void iconst_3() {
this.countLabels = 0;
@@ -4145,7 +4147,7 @@ public void iconst_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iconst_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iconst_3;
}
public void iconst_4() {
@@ -4158,7 +4160,7 @@ public void iconst_4() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iconst_4;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iconst_4;
}
public void iconst_5() {
@@ -4171,7 +4173,7 @@ public void iconst_5() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iconst_5;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iconst_5;
}
public void iconst_m1() {
@@ -4184,7 +4186,7 @@ public void iconst_m1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iconst_m1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iconst_m1;
}
public void idiv() {
@@ -4195,7 +4197,7 @@ public void idiv() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_idiv;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.idiv;
}
public void if_acmpeq(BranchLabel lbl) {
@@ -4203,13 +4205,13 @@ public void if_acmpeq(BranchLabel lbl) {
this.stackDepth-=2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_acmpne, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_acmpne, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_acmpeq;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_acmpeq;
lbl.branch();
}
}
@@ -4219,13 +4221,13 @@ public void if_acmpne(BranchLabel lbl) {
this.stackDepth-=2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_acmpeq, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_acmpeq, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_acmpne;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_acmpne;
lbl.branch();
}
}
@@ -4235,13 +4237,13 @@ public void if_icmpeq(BranchLabel lbl) {
this.stackDepth -= 2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_icmpne, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_icmpne, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_icmpeq;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_icmpeq;
lbl.branch();
}
}
@@ -4251,13 +4253,13 @@ public void if_icmpge(BranchLabel lbl) {
this.stackDepth -= 2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_icmplt, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_icmplt, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_icmpge;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_icmpge;
lbl.branch();
}
}
@@ -4267,13 +4269,13 @@ public void if_icmpgt(BranchLabel lbl) {
this.stackDepth -= 2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_icmple, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_icmple, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_icmpgt;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_icmpgt;
lbl.branch();
}
}
@@ -4283,13 +4285,13 @@ public void if_icmple(BranchLabel lbl) {
this.stackDepth -= 2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_icmpgt, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_icmpgt, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_icmple;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_icmple;
lbl.branch();
}
}
@@ -4299,13 +4301,13 @@ public void if_icmplt(BranchLabel lbl) {
this.stackDepth -= 2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_icmpge, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_icmpge, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_icmplt;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_icmplt;
lbl.branch();
}
}
@@ -4315,13 +4317,13 @@ public void if_icmpne(BranchLabel lbl) {
this.stackDepth -= 2;
popTypeBinding(2);
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_if_icmpeq, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_icmpeq, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_if_icmpne;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_icmpne;
lbl.branch();
}
}
@@ -4331,13 +4333,13 @@ public void ifeq(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_ifne, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.ifne, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ifeq;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ifeq;
lbl.branch();
}
}
@@ -4347,13 +4349,13 @@ public void ifge(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_iflt, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.iflt, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ifge;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ifge;
lbl.branch();
}
}
@@ -4363,13 +4365,13 @@ public void ifgt(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_ifle, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.ifle, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ifgt;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ifgt;
lbl.branch();
}
}
@@ -4379,13 +4381,13 @@ public void ifle(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_ifgt, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.ifgt, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ifle;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ifle;
lbl.branch();
}
}
@@ -4395,13 +4397,13 @@ public void iflt(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_ifge, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.ifge, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iflt;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.iflt;
lbl.branch();
}
}
@@ -4411,13 +4413,13 @@ public void ifne(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_ifeq, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.ifeq, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ifne;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ifne;
lbl.branch();
}
}
@@ -4427,13 +4429,13 @@ public void ifnonnull(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_ifnull, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_acmp_null, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ifnonnull;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_acmp_nonnull;
lbl.branch();
}
}
@@ -4443,13 +4445,13 @@ public void ifnull(BranchLabel lbl) {
this.stackDepth--;
popTypeBinding();
if (this.wideMode) {
- generateWideRevertedConditionalBranch(Opcodes.OPC_ifnonnull, lbl);
+ generateWideRevertedConditionalBranch(ByteCodes.if_acmp_nonnull, lbl);
} else {
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ifnull;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.if_acmp_null;
lbl.branch();
}
}
@@ -4461,8 +4463,8 @@ final public void iinc(int index, int value) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iinc;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.iinc;
writeUnsignedShort(index);
writeSignedShort(value);
} else {
@@ -4470,7 +4472,7 @@ final public void iinc(int index, int value) {
resizeByteArray();
}
this.position += 3;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iinc;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.iinc;
this.bCodeStream[this.classFileOffset++] = (byte) index;
this.bCodeStream[this.classFileOffset++] = (byte) value;
}
@@ -4490,15 +4492,15 @@ public void iload(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iload;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iload;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iload;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -4516,7 +4518,7 @@ public void iload_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iload_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iload_0;
}
public void iload_1() {
@@ -4532,7 +4534,7 @@ public void iload_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iload_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iload_1;
}
public void iload_2() {
@@ -4548,7 +4550,7 @@ public void iload_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iload_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iload_2;
}
public void iload_3() {
@@ -4564,7 +4566,7 @@ public void iload_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iload_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iload_3;
}
public void imul() {
@@ -4575,7 +4577,7 @@ public void imul() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_imul;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.imul;
}
public void ineg() {
@@ -4584,7 +4586,7 @@ public void ineg() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ineg;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ineg;
pushTypeBinding(1, TypeBinding.INT);
}
@@ -4692,19 +4694,19 @@ public void instance_of(TypeReference typeReference, TypeBinding typeBinding) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_instanceof;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.instanceof_;
writeUnsignedShort(this.constantPool.literalIndexForType(typeBinding));
pushTypeBinding(1, TypeBinding.INT);
}
-protected void invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, TypeBinding type) {
+protected void invoke(int opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, TypeBinding type) {
invoke(opcode, receiverAndArgsSize, returnTypeSize, declaringClass, selector, signature, TypeIds.T_JavaLangObject, type);
}
-protected void _invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId) {
-// invoke18(opcode, receiverAndArgsSize, returnTypeSize, declaringClass, opcode == Opcodes.OPC_invokeinterface, selector, signature, typeId);
+protected void _invoke(int opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId) {
+// invoke18(opcode, receiverAndArgsSize, returnTypeSize, declaringClass, opcode == ByteCodes.invokeinterface, selector, signature, typeId);
}
-protected void invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId, TypeBinding type) {
- invoke18(opcode, receiverAndArgsSize, returnTypeSize, declaringClass, opcode == Opcodes.OPC_invokeinterface, selector, signature, typeId, type);
+protected void invoke(int opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass, char[] selector, char[] signature, int typeId, TypeBinding type) {
+ invoke18(opcode, receiverAndArgsSize, returnTypeSize, declaringClass, opcode == ByteCodes.invokeinterface, selector, signature, typeId, type);
}
private void popInvokeTypeBinding(int receiverAndArgsSize) {
@@ -4724,16 +4726,16 @@ private void popInvokeTypeBinding(int receiverAndArgsSize) {
// Starting with 1.8 we can no longer deduce isInterface from opcode, invokespecial can be used for default methods, too.
// Hence adding explicit parameter 'isInterface', which is needed only for non-ctor invokespecial invocations
// (i.e., other clients may still call the shorter overload).
-private void invoke18(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass,
+private void invoke18(int opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass,
boolean isInterface, char[] selector, char[] signature, int typeId, TypeBinding type) {
this.countLabels = 0;
- if (opcode == Opcodes.OPC_invokeinterface) {
+ if (opcode == ByteCodes.invokeinterface) {
// invokeinterface
if (this.classFileOffset + 4 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position +=3;
- this.bCodeStream[this.classFileOffset++] = opcode;
+ this.bCodeStream[this.classFileOffset++] = (byte)opcode;
writeUnsignedShort(this.constantPool.literalIndexForMethod(declaringClass, selector, signature, true));
this.bCodeStream[this.classFileOffset++] = (byte) receiverAndArgsSize;
this.bCodeStream[this.classFileOffset++] = 0;
@@ -4745,7 +4747,7 @@ private void invoke18(byte opcode, int receiverAndArgsSize, int returnTypeSize,
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = opcode;
+ this.bCodeStream[this.classFileOffset++] = (byte)opcode;
writeUnsignedShort(this.constantPool.literalIndexForMethod(declaringClass, selector, signature, isInterface));
}
this.stackDepth += returnTypeSize - receiverAndArgsSize;
@@ -4770,7 +4772,7 @@ public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize,
}
int invokeDynamicIndex = this.constantPool.literalIndexForInvokeDynamic(bootStrapIndex, selector, signature);
this.position +=3;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_invokedynamic;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.invokedynamic;
writeUnsignedShort(invokeDynamicIndex);
this.bCodeStream[this.classFileOffset++] = 0;
this.bCodeStream[this.classFileOffset++] = 0;
@@ -4784,11 +4786,11 @@ public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize,
}
}
-public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass) {
+public void invoke(int opcode, MethodBinding methodBinding, TypeBinding declaringClass) {
this.invoke(opcode, methodBinding, declaringClass, null);
}
-public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) {
+public void invoke(int opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) {
if (declaringClass == null) declaringClass = methodBinding.declaringClass;
if ((declaringClass.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
Util.recordNestedType(this.classFile, declaringClass);
@@ -4796,14 +4798,14 @@ public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declari
// compute receiverAndArgsSize
int receiverAndArgsSize;
switch(opcode) {
- case Opcodes.OPC_invokestatic :
+ case ByteCodes.invokestatic :
receiverAndArgsSize = 0; // no receiver
break;
- case Opcodes.OPC_invokeinterface :
- case Opcodes.OPC_invokevirtual :
+ case ByteCodes.invokeinterface :
+ case ByteCodes.invokevirtual :
receiverAndArgsSize = 1; // receiver
break;
- case Opcodes.OPC_invokespecial :
+ case ByteCodes.invokespecial :
receiverAndArgsSize = 1; // receiver
if (methodBinding.isConstructor()) {
if (declaringClass.isNestedType()) {
@@ -4833,7 +4835,7 @@ public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declari
}
break;
default :
- return; // should not occur
+ throw new IllegalStateException("Opcode " + opcode + " not expected at that stage"); //$NON-NLS-1$ //$NON-NLS-2$
}
for (int i = methodBinding.parameters.length - 1; i >= 0; i--) {
@@ -4876,7 +4878,7 @@ public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declari
protected void invokeAccessibleObjectSetAccessible() {
// invokevirtual: java.lang.reflect.AccessibleObject.setAccessible(Z)V;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JAVALANGREFLECTACCESSIBLEOBJECT_CONSTANTPOOLNAME,
@@ -4888,7 +4890,7 @@ protected void invokeAccessibleObjectSetAccessible() {
protected void invokeArrayNewInstance() {
// invokestatic: java.lang.reflect.Array.newInstance(Ljava.lang.Class;int[])Ljava.lang.Object;
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JAVALANGREFLECTARRAY_CONSTANTPOOLNAME,
@@ -4899,7 +4901,7 @@ protected void invokeArrayNewInstance() {
public void invokeClassForName() {
// invokestatic: java.lang.Class.forName(Ljava.lang.String;)Ljava.lang.Class;
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangClassConstantPoolName,
@@ -4911,7 +4913,7 @@ public void invokeClassForName() {
protected void invokeClassGetDeclaredConstructor() {
// invokevirtual: java.lang.Class getDeclaredConstructor([Ljava.lang.Class)Ljava.lang.reflect.Constructor;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangClassConstantPoolName,
@@ -4923,7 +4925,7 @@ protected void invokeClassGetDeclaredConstructor() {
protected void invokeClassGetDeclaredField() {
// invokevirtual: java.lang.Class.getDeclaredField(Ljava.lang.String)Ljava.lang.reflect.Field;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangClassConstantPoolName,
@@ -4935,7 +4937,7 @@ protected void invokeClassGetDeclaredField() {
protected void invokeClassGetDeclaredMethod() {
// invokevirtual: java.lang.Class getDeclaredMethod(Ljava.lang.String, [Ljava.lang.Class)Ljava.lang.reflect.Method;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
3, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangClassConstantPoolName,
@@ -4947,7 +4949,7 @@ protected void invokeClassGetDeclaredMethod() {
public void invokeEnumOrdinal(char[] enumTypeConstantPoolName) {
// invokevirtual: .ordinal()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
enumTypeConstantPoolName,
@@ -4963,7 +4965,7 @@ public void invokeIterableIterator(TypeBinding iterableReceiverType) {
Util.recordNestedType(this.classFile, iterableReceiverType);
}
invoke(
- iterableReceiverType.isInterface() ? Opcodes.OPC_invokeinterface : Opcodes.OPC_invokevirtual,
+ iterableReceiverType.isInterface() ? ByteCodes.invokeinterface : ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // returnTypeSize
iterableReceiverType.constantPoolName(),
@@ -4975,7 +4977,7 @@ public void invokeIterableIterator(TypeBinding iterableReceiverType) {
public void invokeAutoCloseableClose(TypeBinding resourceType) {
// invokevirtual/interface: .close()
invoke(
- resourceType.erasure().isInterface() ? Opcodes.OPC_invokeinterface : Opcodes.OPC_invokevirtual,
+ resourceType.erasure().isInterface() ? ByteCodes.invokeinterface : ByteCodes.invokevirtual,
1, // receiverAndArgsSize
0, // returnTypeSize
resourceType.constantPoolName(),
@@ -4985,7 +4987,7 @@ public void invokeAutoCloseableClose(TypeBinding resourceType) {
}
public void invokeThrowableAddSuppressed() {
- invoke(Opcodes.OPC_invokevirtual,
+ invoke(ByteCodes.invokevirtual,
2, // receiverAndArgsSize
0, // returnTypeSize
ConstantPool.JavaLangThrowableConstantPoolName,
@@ -5035,7 +5037,7 @@ public void invokeJavaLangAssertionErrorConstructor(int typeBindingID) {
return; // should not occur
}
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
receiverAndArgsSize,
0, // return type size
ConstantPool.JavaLangAssertionErrorConstantPoolName,
@@ -5047,7 +5049,7 @@ public void invokeJavaLangAssertionErrorConstructor(int typeBindingID) {
public void invokeJavaLangAssertionErrorDefaultConstructor() {
// invokespecial: java.lang.AssertionError.()V
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
1, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangAssertionErrorConstantPoolName,
@@ -5058,7 +5060,7 @@ public void invokeJavaLangAssertionErrorDefaultConstructor() {
public void invokeJavaLangIncompatibleClassChangeErrorDefaultConstructor() {
// invokespecial: java.lang.IncompatibleClassChangeError.()V
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
1, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangIncompatibleClassChangeErrorConstantPoolName,
@@ -5069,7 +5071,7 @@ public void invokeJavaLangIncompatibleClassChangeErrorDefaultConstructor() {
public void invokeJavaLangClassDesiredAssertionStatus() {
// invokevirtual: java.lang.Class.desiredAssertionStatus()Z;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangClassConstantPoolName,
@@ -5082,7 +5084,7 @@ public void invokeJavaLangClassDesiredAssertionStatus() {
public void invokeJavaLangEnumvalueOf(ReferenceBinding binding) {
// invokestatic: java.lang.Enum.valueOf(Class,String)
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangEnumConstantPoolName,
@@ -5095,7 +5097,7 @@ public void invokeJavaLangEnumValues(TypeBinding enumBinding, ArrayBinding array
char[] signature = "()".toCharArray(); //$NON-NLS-1$
signature = CharOperation.concat(signature, arrayBinding.constantPoolName());
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
0, // receiverAndArgsSize
1, // return type size
enumBinding.constantPoolName(),
@@ -5107,7 +5109,7 @@ public void invokeJavaLangEnumValues(TypeBinding enumBinding, ArrayBinding array
public void invokeJavaLangErrorConstructor() {
// invokespecial: java.lang.Error(Ljava.lang.String;)V
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangErrorConstantPoolName,
@@ -5119,7 +5121,7 @@ public void invokeJavaLangErrorConstructor() {
public void invokeJavaLangReflectConstructorNewInstance() {
// invokevirtual: java.lang.reflect.Constructor.newInstance([Ljava.lang.Object;)Ljava.lang.Object;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangReflectConstructorConstantPoolName,
@@ -5181,7 +5183,7 @@ protected void invokeJavaLangReflectFieldGetter(TypeBinding type) {
break;
}
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
2, // receiverAndArgsSize
returnTypeSize, // return type size
ConstantPool.JAVALANGREFLECTFIELD_CONSTANTPOOLNAME,
@@ -5244,7 +5246,7 @@ protected void invokeJavaLangReflectFieldSetter(TypeBinding type) {
break;
}
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
receiverAndArgsSize,
0, // return type size
ConstantPool.JAVALANGREFLECTFIELD_CONSTANTPOOLNAME,
@@ -5257,7 +5259,7 @@ protected void invokeJavaLangReflectFieldSetter(TypeBinding type) {
public void invokeJavaLangReflectMethodInvoke() {
// invokevirtual: java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
3, // receiverAndArgsSize
1, // return type size
ConstantPool.JAVALANGREFLECTMETHOD_CONSTANTPOOLNAME,
@@ -5269,7 +5271,7 @@ public void invokeJavaLangReflectMethodInvoke() {
public void invokeJavaUtilIteratorHasNext() {
// invokeinterface java.util.Iterator.hasNext()Z
invoke(
- Opcodes.OPC_invokeinterface,
+ ByteCodes.invokeinterface,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaUtilIteratorConstantPoolName,
@@ -5282,7 +5284,7 @@ public void invokeJavaUtilIteratorHasNext() {
public void invokeJavaUtilIteratorNext() {
// invokeinterface java.util.Iterator.next()java.lang.Object
invoke(
- Opcodes.OPC_invokeinterface,
+ ByteCodes.invokeinterface,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaUtilIteratorConstantPoolName,
@@ -5294,7 +5296,7 @@ public void invokeJavaUtilIteratorNext() {
public void invokeJavaUtilObjectsrequireNonNull() {
// invokestatic: java.util.Objects.requireNonNull(Ljava.lang.Object;)Ljava.lang.Object;
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaUtilObjectsConstantPoolName,
@@ -5306,7 +5308,7 @@ public void invokeJavaUtilObjectsrequireNonNull() {
public void invokeNoClassDefFoundErrorStringConstructor() {
// invokespecial: java.lang.NoClassDefFoundError.(Ljava.lang.String;)V
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangNoClassDefFoundErrorConstantPoolName,
@@ -5318,7 +5320,7 @@ public void invokeNoClassDefFoundErrorStringConstructor() {
public void invokeObjectGetClass() {
// invokevirtual: java.lang.Object.getClass()Ljava.lang.Class;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangObjectConstantPoolName,
@@ -5424,7 +5426,7 @@ public void invokeStringConcatenationAppendForType(int typeID) {
TypeBinding type = this.targetLevel >= ClassFileConstants.JDK14 ?
getPopularBinding(ConstantPool.JavaLangStringBuilderConstantPoolName) : null;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
receiverAndArgsSize,
1, // return type size
declaringClass,
@@ -5444,7 +5446,7 @@ public void invokeStringConcatenationDefaultConstructor() {
declaringClass = ConstantPool.JavaLangStringBuilderConstantPoolName;
}
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
1, // receiverAndArgsSize
0, // return type size
declaringClass,
@@ -5465,7 +5467,7 @@ public void invokeStringConcatenationStringConstructor() {
declaringClass = ConstantPool.JavaLangStringBuilderConstantPoolName;
}
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
2, // receiverAndArgsSize
0, // return type size
declaringClass,
@@ -5486,7 +5488,7 @@ public void invokeStringConcatenationToString() {
declaringClass = ConstantPool.JavaLangStringBuilderConstantPoolName;
}
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
declaringClass,
@@ -5497,7 +5499,7 @@ public void invokeStringConcatenationToString() {
public void invokeStringEquals() {
// invokevirtual: java.lang.String.equals()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangStringConstantPoolName,
@@ -5509,7 +5511,7 @@ public void invokeStringEquals() {
public void invokeObjectEquals() {
// invokevirtual: java.lang.Object.equals()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
2, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangObjectConstantPoolName,
@@ -5521,7 +5523,7 @@ public void invokeObjectEquals() {
public void invokeStringHashCode() {
// invokevirtual: java.lang.String.hashCode()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangStringConstantPoolName,
@@ -5533,7 +5535,7 @@ public void invokeStringHashCode() {
public void invokeStringIntern() {
// invokevirtual: java.lang.String.intern()
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangStringConstantPoolName,
@@ -5583,7 +5585,7 @@ public void invokeStringValueOf(int typeID) {
return; // should not occur
}
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
receiverAndArgsSize, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangStringConstantPoolName,
@@ -5596,7 +5598,7 @@ public void invokeStringValueOf(int typeID) {
public void invokeSystemArraycopy() {
// invokestatic #21
invoke(
- Opcodes.OPC_invokestatic,
+ ByteCodes.invokestatic,
5, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangSystemConstantPoolName,
@@ -5608,7 +5610,7 @@ public void invokeSystemArraycopy() {
public void invokeThrowableGetMessage() {
// invokevirtual: java.lang.Throwable.getMessage()Ljava.lang.String;
invoke(
- Opcodes.OPC_invokevirtual,
+ ByteCodes.invokevirtual,
1, // receiverAndArgsSize
1, // return type size
ConstantPool.JavaLangThrowableConstantPoolName,
@@ -5625,7 +5627,7 @@ public void ior() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ior;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ior;
}
public void irem() {
@@ -5636,7 +5638,7 @@ public void irem() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_irem;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.imod;
}
public void ireturn() {
@@ -5648,7 +5650,7 @@ public void ireturn() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ireturn;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ireturn;
this.lastAbruptCompletion = this.position;
}
@@ -5683,7 +5685,7 @@ public void ishl() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ishl;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ishl;
}
public void ishr() {
@@ -5694,7 +5696,7 @@ public void ishr() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ishr;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ishr;
}
public void istore(int iArg) {
@@ -5709,15 +5711,15 @@ public void istore(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_istore;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.istore;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_istore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.istore;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -5733,7 +5735,7 @@ public void istore_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_istore_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.istore_0;
}
public void istore_1() {
@@ -5747,7 +5749,7 @@ public void istore_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_istore_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.istore_1;
}
public void istore_2() {
@@ -5761,7 +5763,7 @@ public void istore_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_istore_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.istore_2;
}
public void istore_3() {
@@ -5775,7 +5777,7 @@ public void istore_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_istore_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.istore_3;
}
public void isub() {
@@ -5786,7 +5788,7 @@ public void isub() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_isub;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.isub;
}
public void iushr() {
@@ -5797,7 +5799,7 @@ public void iushr() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_iushr;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.iushr;
}
public void ixor() {
@@ -5808,7 +5810,7 @@ public void ixor() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ixor;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ixor;
}
final public void jsr(BranchLabel lbl) {
@@ -5821,7 +5823,7 @@ final public void jsr(BranchLabel lbl) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_jsr;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.jsr;
lbl.branch();
}
@@ -5831,7 +5833,7 @@ final public void jsr_w(BranchLabel lbl) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_jsr_w;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.jsr_w;
lbl.branchWide();
}
@@ -5841,7 +5843,7 @@ public void l2d() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_l2d;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.l2d;
pushTypeBinding(1, TypeBinding.DOUBLE);
}
@@ -5853,7 +5855,7 @@ public void l2f() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_l2f;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.l2f;
}
public void l2i() {
@@ -5864,7 +5866,7 @@ public void l2i() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_l2i;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.l2i;
}
public void ladd() {
@@ -5875,7 +5877,7 @@ public void ladd() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ladd;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ladd;
}
public void laload() {
@@ -5884,7 +5886,7 @@ public void laload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_laload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.laload;
pushTypeBindingArray();
}
@@ -5896,7 +5898,7 @@ public void land() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_land;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.land;
}
public void lastore() {
@@ -5907,7 +5909,7 @@ public void lastore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lastore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lastore;
}
public void lcmp() {
@@ -5918,7 +5920,7 @@ public void lcmp() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lcmp;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.lcmp;
}
public void lconst_0() {
@@ -5931,7 +5933,7 @@ public void lconst_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lconst_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lconst_0;
}
public void lconst_1() {
@@ -5944,7 +5946,7 @@ public void lconst_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lconst_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lconst_1;
}
public void ldc(float constant) {
@@ -5960,7 +5962,7 @@ public void ldc(float constant) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc_w;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc2;
writeUnsignedShort(index);
} else {
// Generate a ldc
@@ -5968,7 +5970,7 @@ public void ldc(float constant) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc1;
this.bCodeStream[this.classFileOffset++] = (byte) index;
}
}
@@ -5986,7 +5988,7 @@ public void ldc(int constant) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc_w;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc2;
writeUnsignedShort(index);
} else {
// Generate a ldc
@@ -5994,7 +5996,7 @@ public void ldc(int constant) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc1;
this.bCodeStream[this.classFileOffset++] = (byte) index;
}
}
@@ -6111,7 +6113,7 @@ public void ldc(TypeBinding typeBinding) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc_w;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc2;
writeUnsignedShort(index);
} else {
// Generate a ldc
@@ -6119,7 +6121,7 @@ public void ldc(TypeBinding typeBinding) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc1;
this.bCodeStream[this.classFileOffset++] = (byte) index;
}
}
@@ -6136,7 +6138,7 @@ public void ldc2_w(double constant) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc2_w;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc2w;
writeUnsignedShort(index);
}
@@ -6152,7 +6154,7 @@ public void ldc2_w(long constant) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc2_w;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc2w;
writeUnsignedShort(index);
}
@@ -6168,7 +6170,7 @@ public void ldcForIndex(int index) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc_w;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc2;
writeUnsignedShort(index);
} else {
// Generate a ldc
@@ -6176,7 +6178,7 @@ public void ldcForIndex(int index) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldc;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldc1;
this.bCodeStream[this.classFileOffset++] = (byte) index;
}
}
@@ -6189,7 +6191,7 @@ public void ldiv() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ldiv;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.ldiv;
}
public void lload(int iArg) {
@@ -6206,15 +6208,15 @@ public void lload(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lload;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lload;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lload;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -6232,7 +6234,7 @@ public void lload_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lload_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lload_0;
}
public void lload_1() {
@@ -6248,7 +6250,7 @@ public void lload_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lload_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lload_1;
}
public void lload_2() {
@@ -6264,7 +6266,7 @@ public void lload_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lload_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lload_2;
}
public void lload_3() {
@@ -6280,7 +6282,7 @@ public void lload_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lload_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lload_3;
}
public void lmul() {
@@ -6291,7 +6293,7 @@ public void lmul() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lmul;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lmul;
}
public void lneg() {
@@ -6300,7 +6302,7 @@ public void lneg() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lneg;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lneg;
pushTypeBinding(1, TypeBinding.LONG);
}
@@ -6425,7 +6427,7 @@ public void lookupswitch(CaseLabel defaultLabel, int[] keys, int[] sortedIndexes
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lookupswitch;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.lookupswitch;
for (int i = (3 - (pos & 3)); i > 0; i--) { // faster than % 4
if (this.classFileOffset >= this.bCodeStream.length) {
resizeByteArray();
@@ -6449,7 +6451,7 @@ public void lor() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lor;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.lor;
}
public void lrem() {
@@ -6460,7 +6462,7 @@ public void lrem() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lrem;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lmod;
}
public void lreturn() {
@@ -6472,7 +6474,7 @@ public void lreturn() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lreturn;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.lreturn;
this.lastAbruptCompletion = this.position;
}
@@ -6484,7 +6486,7 @@ public void lshl() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lshl;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lshl;
}
public void lshr() {
@@ -6495,7 +6497,7 @@ public void lshr() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lshr;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lshr;
}
public void lstore(int iArg) {
@@ -6510,15 +6512,15 @@ public void lstore(int iArg) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lstore;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lstore;
writeUnsignedShort(iArg);
} else {
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lstore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lstore;
this.bCodeStream[this.classFileOffset++] = (byte) iArg;
}
}
@@ -6534,7 +6536,7 @@ public void lstore_0() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lstore_0;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lstore_0;
}
public void lstore_1() {
@@ -6548,7 +6550,7 @@ public void lstore_1() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lstore_1;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lstore_1;
}
public void lstore_2() {
@@ -6562,7 +6564,7 @@ public void lstore_2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lstore_2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lstore_2;
}
public void lstore_3() {
@@ -6576,7 +6578,7 @@ public void lstore_3() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lstore_3;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lstore_3;
}
public void lsub() {
@@ -6587,7 +6589,7 @@ public void lsub() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lsub;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lsub;
}
public void lushr() {
@@ -6598,7 +6600,7 @@ public void lushr() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lushr;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.lushr;
}
public void lxor() {
@@ -6609,7 +6611,7 @@ public void lxor() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_lxor;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.lxor;
}
public void monitorenter() {
@@ -6620,7 +6622,7 @@ public void monitorenter() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_monitorenter;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.monitorenter;
}
public void monitorexit() {
@@ -6631,7 +6633,7 @@ public void monitorexit() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_monitorexit;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.monitorexit;
}
public void multianewarray(
@@ -6646,7 +6648,7 @@ public void multianewarray(
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_multianewarray;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.multianewarray;
writeUnsignedShort(this.constantPool.literalIndexForType(typeBinding));
this.bCodeStream[this.classFileOffset++] = (byte) dimensions;
}
@@ -6667,7 +6669,7 @@ public void new_(TypeReference typeReference, TypeBinding typeBinding) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
writeUnsignedShort(this.constantPool.literalIndexForType(typeBinding));
}
@@ -6677,7 +6679,7 @@ public void newarray(int array_Type) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_newarray;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.newarray;
this.bCodeStream[this.classFileOffset++] = (byte) array_Type;
pushTypeBinding(1, TypeBinding.wellKnownBaseType(array_Type));
}
@@ -6729,7 +6731,7 @@ public void newJavaLangAssertionError() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangAssertionErrorConstantPoolName));
}
@@ -6744,7 +6746,7 @@ public void newJavaLangError() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangErrorConstantPoolName));
}
public void newJavaLangIncompatibleClassChangeError() {
@@ -6758,7 +6760,7 @@ public void newJavaLangIncompatibleClassChangeError() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangIncompatibleClassChangeErrorConstantPoolName));
}
public void newJavaLangMatchException() {
@@ -6772,13 +6774,13 @@ public void newJavaLangMatchException() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangMatchExceptionConstantPoolName));
}
public void invokeJavaLangMatchExceptionConstructor() {
// invokespecial: java.lang.MatchException.(Ljava/lang/String;Ljava/lang/Throwable;)V
invoke(
- Opcodes.OPC_invokespecial,
+ ByteCodes.invokespecial,
3, // receiverAndArgsSize
0, // return type size
ConstantPool.JavaLangMatchExceptionConstantPoolName,
@@ -6797,7 +6799,7 @@ public void newNoClassDefFoundError() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangNoClassDefFoundErrorConstantPoolName));
}
@@ -6814,7 +6816,7 @@ public void newStringContatenation() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
if (this.targetLevel >= ClassFileConstants.JDK1_5) {
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangStringBuilderConstantPoolName));
} else {
@@ -6831,7 +6833,7 @@ public void newWrapperFor(int typeID) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_new;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.new_;
switch (typeID) {
case TypeIds.T_int : // new: java.lang.Integer
writeUnsignedShort(this.constantPool.literalIndexForType(ConstantPool.JavaLangIntegerConstantPoolName));
@@ -6877,7 +6879,7 @@ public void nop() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_nop;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.nop;
}
public void optimizeBranch(int oldPosition, BranchLabel lbl) {
@@ -6911,7 +6913,7 @@ public void pop() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_pop;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.pop;
}
private void adjustTypeBindingStackForPop2() {
@@ -6935,7 +6937,7 @@ public void pop2() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_pop2;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.pop2;
}
public void pushExceptionOnStack(TypeBinding binding) {
@@ -7267,15 +7269,15 @@ final public void ret(int index) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_wide;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ret;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.wide;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ret;
writeUnsignedShort(index);
} else { // Don't Widen
if (this.classFileOffset + 1 >= this.bCodeStream.length) {
resizeByteArray();
}
this.position += 2;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_ret;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.ret;
this.bCodeStream[this.classFileOffset++] = (byte) index;
}
}
@@ -7287,7 +7289,7 @@ public void return_() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_return;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.return_;
this.lastAbruptCompletion = this.position;
}
@@ -7299,7 +7301,7 @@ public void saload() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_saload;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.saload;
}
public void sastore() {
@@ -7310,7 +7312,7 @@ public void sastore() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_sastore;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.sastore;
}
/**
@@ -7445,7 +7447,7 @@ public void sipush(int s) {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_sipush;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.sipush;
writeSignedShort(s);
}
@@ -7569,7 +7571,7 @@ public void swap() {
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_swap;
+ this.bCodeStream[this.classFileOffset++] = ByteCodes.swap;
}
public void tableswitch(CaseLabel defaultLabel, int low, int high, int[] keys,
@@ -7586,7 +7588,7 @@ public void tableswitch(CaseLabel defaultLabel, int low, int high, int[] keys,
resizeByteArray();
}
this.position++;
- this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_tableswitch;
+ this.bCodeStream[this.classFileOffset++] = (byte)ByteCodes.tableswitch;
// padding
for (int i = (3 - (pos & 3)); i > 0; i--) {
if (this.classFileOffset >= this.bCodeStream.length) {
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
deleted file mode 100644
index e509d670a05..00000000000
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- * Jesper S Moller - Contributions for
- * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
- *******************************************************************************/
-package org.eclipse.jdt.internal.compiler.codegen;
-
-public interface Opcodes {
-
- public static final byte OPC_nop = 0;
- public static final byte OPC_aconst_null = 1;
- public static final byte OPC_iconst_m1 = 2;
- public static final byte OPC_iconst_0 = 3;
- public static final byte OPC_iconst_1 = 4;
- public static final byte OPC_iconst_2 = 5;
- public static final byte OPC_iconst_3 = 6;
- public static final byte OPC_iconst_4 = 7;
- public static final byte OPC_iconst_5 = 8;
- public static final byte OPC_lconst_0 = 9;
- public static final byte OPC_lconst_1 = 10;
- public static final byte OPC_fconst_0 = 11;
- public static final byte OPC_fconst_1 = 12;
- public static final byte OPC_fconst_2 = 13;
- public static final byte OPC_dconst_0 = 14;
- public static final byte OPC_dconst_1 = 15;
- public static final byte OPC_bipush = 16;
- public static final byte OPC_sipush = 17;
- public static final byte OPC_ldc = 18;
- public static final byte OPC_ldc_w = 19;
- public static final byte OPC_ldc2_w = 20;
- public static final byte OPC_iload = 21;
- public static final byte OPC_lload = 22;
- public static final byte OPC_fload = 23;
- public static final byte OPC_dload = 24;
- public static final byte OPC_aload = 25;
- public static final byte OPC_iload_0 = 26;
- public static final byte OPC_iload_1 = 27;
- public static final byte OPC_iload_2 = 28;
- public static final byte OPC_iload_3 = 29;
- public static final byte OPC_lload_0 = 30;
- public static final byte OPC_lload_1 = 31;
- public static final byte OPC_lload_2 = 32;
- public static final byte OPC_lload_3 = 33;
- public static final byte OPC_fload_0 = 34;
- public static final byte OPC_fload_1 = 35;
- public static final byte OPC_fload_2 = 36;
- public static final byte OPC_fload_3 = 37;
- public static final byte OPC_dload_0 = 38;
- public static final byte OPC_dload_1 = 39;
- public static final byte OPC_dload_2 = 40;
- public static final byte OPC_dload_3 = 41;
- public static final byte OPC_aload_0 = 42;
- public static final byte OPC_aload_1 = 43;
- public static final byte OPC_aload_2 = 44;
- public static final byte OPC_aload_3 = 45;
- public static final byte OPC_iaload = 46;
- public static final byte OPC_laload = 47;
- public static final byte OPC_faload = 48;
- public static final byte OPC_daload = 49;
- public static final byte OPC_aaload = 50;
- public static final byte OPC_baload = 51;
- public static final byte OPC_caload = 52;
- public static final byte OPC_saload = 53;
- public static final byte OPC_istore = 54;
- public static final byte OPC_lstore = 55;
- public static final byte OPC_fstore = 56;
- public static final byte OPC_dstore = 57;
- public static final byte OPC_astore = 58;
- public static final byte OPC_istore_0 = 59;
- public static final byte OPC_istore_1 = 60;
- public static final byte OPC_istore_2 = 61;
- public static final byte OPC_istore_3 = 62;
- public static final byte OPC_lstore_0 = 63;
- public static final byte OPC_lstore_1 = 64;
- public static final byte OPC_lstore_2 = 65;
- public static final byte OPC_lstore_3 = 66;
- public static final byte OPC_fstore_0 = 67;
- public static final byte OPC_fstore_1 = 68;
- public static final byte OPC_fstore_2 = 69;
- public static final byte OPC_fstore_3 = 70;
- public static final byte OPC_dstore_0 = 71;
- public static final byte OPC_dstore_1 = 72;
- public static final byte OPC_dstore_2 = 73;
- public static final byte OPC_dstore_3 = 74;
- public static final byte OPC_astore_0 = 75;
- public static final byte OPC_astore_1 = 76;
- public static final byte OPC_astore_2 = 77;
- public static final byte OPC_astore_3 = 78;
- public static final byte OPC_iastore = 79;
- public static final byte OPC_lastore = 80;
- public static final byte OPC_fastore = 81;
- public static final byte OPC_dastore = 82;
- public static final byte OPC_aastore = 83;
- public static final byte OPC_bastore = 84;
- public static final byte OPC_castore = 85;
- public static final byte OPC_sastore = 86;
- public static final byte OPC_pop = 87;
- public static final byte OPC_pop2 = 88;
- public static final byte OPC_dup = 89;
- public static final byte OPC_dup_x1 = 90;
- public static final byte OPC_dup_x2 = 91;
- public static final byte OPC_dup2 = 92;
- public static final byte OPC_dup2_x1 = 93;
- public static final byte OPC_dup2_x2 = 94;
- public static final byte OPC_swap = 95;
- public static final byte OPC_iadd = 96;
- public static final byte OPC_ladd = 97;
- public static final byte OPC_fadd = 98;
- public static final byte OPC_dadd = 99;
- public static final byte OPC_isub = 100;
- public static final byte OPC_lsub = 101;
- public static final byte OPC_fsub = 102;
- public static final byte OPC_dsub = 103;
- public static final byte OPC_imul = 104;
- public static final byte OPC_lmul = 105;
- public static final byte OPC_fmul = 106;
- public static final byte OPC_dmul = 107;
- public static final byte OPC_idiv = 108;
- public static final byte OPC_ldiv = 109;
- public static final byte OPC_fdiv = 110;
- public static final byte OPC_ddiv = 111;
- public static final byte OPC_irem = 112;
- public static final byte OPC_lrem = 113;
- public static final byte OPC_frem = 114;
- public static final byte OPC_drem = 115;
- public static final byte OPC_ineg = 116;
- public static final byte OPC_lneg = 117;
- public static final byte OPC_fneg = 118;
- public static final byte OPC_dneg = 119;
- public static final byte OPC_ishl = 120;
- public static final byte OPC_lshl = 121;
- public static final byte OPC_ishr = 122;
- public static final byte OPC_lshr = 123;
- public static final byte OPC_iushr = 124;
- public static final byte OPC_lushr = 125;
- public static final byte OPC_iand = 126;
- public static final byte OPC_land = 127;
- public static final byte OPC_ior = (byte) 128;
- public static final byte OPC_lor = (byte) 129;
- public static final byte OPC_ixor = (byte) 130;
- public static final byte OPC_lxor = (byte) 131;
- public static final byte OPC_iinc = (byte) 132;
- public static final byte OPC_i2l = (byte) 133;
- public static final byte OPC_i2f = (byte) 134;
- public static final byte OPC_i2d = (byte) 135;
- public static final byte OPC_l2i = (byte) 136;
- public static final byte OPC_l2f = (byte) 137;
- public static final byte OPC_l2d = (byte) 138;
- public static final byte OPC_f2i = (byte) 139;
- public static final byte OPC_f2l = (byte) 140;
- public static final byte OPC_f2d = (byte) 141;
- public static final byte OPC_d2i = (byte) 142;
- public static final byte OPC_d2l = (byte) 143;
- public static final byte OPC_d2f = (byte) 144;
- public static final byte OPC_i2b = (byte) 145;
- public static final byte OPC_i2c = (byte) 146;
- public static final byte OPC_i2s = (byte) 147;
- public static final byte OPC_lcmp = (byte) 148;
- public static final byte OPC_fcmpl = (byte) 149;
- public static final byte OPC_fcmpg = (byte) 150;
- public static final byte OPC_dcmpl = (byte) 151;
- public static final byte OPC_dcmpg = (byte) 152;
- public static final byte OPC_ifeq = (byte) 153;
- public static final byte OPC_ifne = (byte) 154;
- public static final byte OPC_iflt = (byte) 155;
- public static final byte OPC_ifge = (byte) 156;
- public static final byte OPC_ifgt = (byte) 157;
- public static final byte OPC_ifle = (byte) 158;
- public static final byte OPC_if_icmpeq = (byte) 159;
- public static final byte OPC_if_icmpne = (byte) 160;
- public static final byte OPC_if_icmplt = (byte) 161;
- public static final byte OPC_if_icmpge = (byte) 162;
- public static final byte OPC_if_icmpgt = (byte) 163;
- public static final byte OPC_if_icmple = (byte) 164;
- public static final byte OPC_if_acmpeq = (byte) 165;
- public static final byte OPC_if_acmpne = (byte) 166;
- public static final byte OPC_goto = (byte) 167;
- public static final byte OPC_jsr = (byte) 168;
- public static final byte OPC_ret = (byte) 169;
- public static final byte OPC_tableswitch = (byte) 170;
- public static final byte OPC_lookupswitch = (byte) 171;
- public static final byte OPC_ireturn = (byte) 172;
- public static final byte OPC_lreturn = (byte) 173;
- public static final byte OPC_freturn = (byte) 174;
- public static final byte OPC_dreturn = (byte) 175;
- public static final byte OPC_areturn = (byte) 176;
- public static final byte OPC_return = (byte) 177;
- public static final byte OPC_getstatic = (byte) 178;
- public static final byte OPC_putstatic = (byte) 179;
- public static final byte OPC_getfield = (byte) 180;
- public static final byte OPC_putfield = (byte) 181;
- public static final byte OPC_invokevirtual = (byte) 182;
- public static final byte OPC_invokespecial = (byte) 183;
- public static final byte OPC_invokestatic = (byte) 184;
- public static final byte OPC_invokeinterface = (byte) 185;
- public static final byte OPC_invokedynamic = (byte) 186;
- public static final byte OPC_new = (byte) 187;
- public static final byte OPC_newarray = (byte) 188;
- public static final byte OPC_anewarray = (byte) 189;
- public static final byte OPC_arraylength = (byte) 190;
- public static final byte OPC_athrow = (byte) 191;
- public static final byte OPC_checkcast = (byte) 192;
- public static final byte OPC_instanceof = (byte) 193;
- public static final byte OPC_monitorenter = (byte) 194;
- public static final byte OPC_monitorexit = (byte) 195;
- public static final byte OPC_wide = (byte) 196;
- public static final byte OPC_multianewarray = (byte) 197;
- public static final byte OPC_ifnull = (byte) 198;
- public static final byte OPC_ifnonnull = (byte) 199;
- public static final byte OPC_goto_w = (byte) 200;
- public static final byte OPC_jsr_w = (byte) 201;
-}
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java
index 0a4337b7f7b..37b001a0344 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java
@@ -33,6 +33,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
+import com.sun.tools.javac.jvm.ByteCodes;
+
@SuppressWarnings({ "rawtypes", "unchecked" })
public class StackMapFrameCodeStream extends CodeStream {
public static class ExceptionMarker implements Comparable {
@@ -204,7 +206,7 @@ public void generateClassLiteralAccessForType(Scope scope, TypeBinding accessedT
// use in CLDC mode
BranchLabel endLabel = new BranchLabel(this);
if (syntheticFieldBinding != null) { // non interface case
- fieldAccess(Opcodes.OPC_getstatic, syntheticFieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.getstatic, syntheticFieldBinding, null /* default declaringClass */);
dup();
ifnonnull(endLabel);
pop();
@@ -247,7 +249,7 @@ public void generateClassLiteralAccessForType(Scope scope, TypeBinding accessedT
if (syntheticFieldBinding != null) { // non interface case
dup();
- fieldAccess(Opcodes.OPC_putstatic, syntheticFieldBinding, null /* default declaringClass */);
+ fieldAccess(ByteCodes.putstatic, syntheticFieldBinding, null /* default declaringClass */);
}
goto_(endLabel);
int savedStackDepth = this.stackDepth;
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
index 30722b013b5..76061ab3b9a 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
@@ -117,7 +117,7 @@ reality this should not matter. In its intended use form such as (I & Serializab
}
@Override
- public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) {
+ public void invoke(int opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) {
if (typeArguments != null) {
int targetType = methodBinding.isConstructor()
? AnnotationTargetTypeConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index 7a48a2cb146..7eff445d340 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -89,7 +89,6 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.classfmt.ExternalAnnotationProvider;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
@@ -97,6 +96,8 @@
import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
import org.eclipse.jdt.internal.compiler.util.Util;
+import com.sun.tools.javac.jvm.ByteCodes;
+
@SuppressWarnings({ "rawtypes", "unchecked" })
public class SourceTypeBinding extends ReferenceBinding {
public ReferenceBinding superclass; // MUST NOT be modified directly, use setter !
@@ -1972,8 +1973,8 @@ public void generateSyntheticFinalFieldInitialization(CodeStream codeStream) {
MethodBinding[] accessors = (MethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(new String(field.name));
if (accessors == null || accessors[0] == null) // not a field for switch enum
continue;
- codeStream.invoke(Opcodes.OPC_invokestatic, accessors[0], null /* default declaringClass */);
- codeStream.fieldAccess(Opcodes.OPC_putstatic, field, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessors[0], null /* default declaringClass */);
+ codeStream.fieldAccess(ByteCodes.putstatic, field, null /* default declaringClass */);
}
}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/pom.xml b/org.eclipse.jdt.core.tests.compiler/pom.xml
index 77a446cccde..8393a094625 100644
--- a/org.eclipse.jdt.core.tests.compiler/pom.xml
+++ b/org.eclipse.jdt.core.tests.compiler/pom.xml
@@ -83,7 +83,7 @@
- --add-modules ALL-SYSTEM -Dcompliance=1.4,1.7,1.8,15,18
+ --add-modules ALL-SYSTEM --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED-Dcompliance=1.4,1.7,1.8,15,18
@@ -104,7 +104,7 @@
- --add-modules ALL-SYSTEM -Dcompliance=1.4,1.7,1.8,17,19
+ --add-modules ALL-SYSTEM --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED-Dcompliance=1.4,1.7,1.8,17,19
@@ -125,7 +125,7 @@
- --add-modules ALL-SYSTEM -Dcompliance=1.4,1.7,1.8,17,20
+ --add-modules ALL-SYSTEM --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED-Dcompliance=1.4,1.7,1.8,17,20
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/codegen/Label.java b/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/codegen/Label.java
index 8c29bcef2b7..ca410695a08 100644
--- a/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/codegen/Label.java
+++ b/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/codegen/Label.java
@@ -151,7 +151,7 @@ public void place() { // Currently lacking wide support.
boolean isOptimizedBranch = false;
// TURNED OFF since fail on 1F4IRD9
if (forwardReferenceCount != 0) {
- isOptimizedBranch = (forwardReferences[forwardReferenceCount - 1] + 2 == position) && (codeStream.bCodeStream[codeStream.classFileOffset - 3] == Opcodes.OPC_goto);
+ isOptimizedBranch = (forwardReferences[forwardReferenceCount - 1] + 2 == position) && (codeStream.bCodeStream[codeStream.classFileOffset - 3] == ByteCodes.goto_);
if (isOptimizedBranch) {
codeStream.position = (position -= 3);
codeStream.classFileOffset -= 3;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
index 131e0a1ece8..51afa75c3de 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
@@ -24,7 +24,6 @@
import java.util.List;
import java.util.Map;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
@@ -347,23 +346,14 @@ public static CompilationUnit convert(
ast.setOriginalModificationCount(ast.modificationCount());
return compilationUnit;
}
-
- /**
- * @return absolute path in local file system, may return {@code null}
- */
private static String getProjectPath(IJavaProject project) {
- if(project == null) {
- return null;
+ String pPath = null;
+ if (project != null && project.getProject() != null
+ && project.getProject().getWorkspace() != null) {
+ pPath = project.getProject().getWorkspace().getRoot().getLocation().toString()
+ + project.getPath().toString();
}
- IProject rp = project.getProject();
- if (rp == null) {
- return null;
- }
- IPath location = rp.getLocation();
- if(location == null) {
- return null;
- }
- return location.toOSString();
+ return pPath;
}
private static ArrayList getSourceClassPaths(IJavaProject project) {
ArrayList srcClassPath = new ArrayList<>();
@@ -377,8 +367,6 @@ private static ArrayList getSourceClassPaths(IJavaProject project) {
} catch (JavaModelException e) {
//do nothing
}
- if(resolvedClasspath == null)
- return srcClassPath;
for (IClasspathEntry entry : resolvedClasspath) {
if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
index 5c2de268a9a..ca194ed5a15 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
@@ -32,7 +32,6 @@
import org.eclipse.jdt.internal.compiler.ast.Wildcard;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.lookup.Binding;
@@ -46,6 +45,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class CodeSnippetAllocationExpression extends AllocationExpression implements ProblemReasons, EvaluationConstants {
EvaluationContext evaluationContext;
FieldBinding delegateThis;
@@ -91,7 +92,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolea
this);
}
// invoke constructor
- codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
} else {
// private emulation using reflect
codeStream.generateEmulationForConstructor(currentScope, codegenBinding);
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java
index 850d1811f8f..924778790b7 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java
@@ -16,7 +16,8 @@
import java.util.Map;
import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.compiler.*;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.ClassFile;
import org.eclipse.jdt.internal.compiler.Compiler;
import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java
index 6b0757be5a7..575e9cb3533 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java
@@ -22,7 +22,6 @@
import org.eclipse.jdt.internal.compiler.ast.FieldReference;
import org.eclipse.jdt.internal.compiler.ast.IntLiteral;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
@@ -32,6 +31,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class CodeSnippetFieldReference extends FieldReference implements ProblemReasons, EvaluationConstants {
EvaluationContext evaluationContext;
@@ -103,9 +104,9 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
if (codegenBinding.canBeSeenBy(this.actualReceiverType, this, currentScope)) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
if (isStatic) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic , codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic , codegenBinding, constantPoolDeclaringClass);
} else {
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenBinding, constantPoolDeclaringClass);
}
} else {
if (isStatic) {
@@ -141,10 +142,10 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
this.receiver.generateCode(currentScope, codeStream, !(isStatic = codegenBinding.isStatic()));
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
if (isStatic) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenBinding, constantPoolDeclaringClass);
} else {
codeStream.dup();
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenBinding, constantPoolDeclaringClass);
}
int operationTypeID;
switch(operationTypeID = (this.implicitConversion & IMPLICIT_CONVERSION_MASK) >> 4) {
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java
index 83430e382d2..33893d71786 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java
@@ -30,7 +30,6 @@
import org.eclipse.jdt.internal.compiler.ast.NameReference;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.lookup.Binding;
@@ -45,6 +44,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class CodeSnippetMessageSend extends MessageSend {
EvaluationContext evaluationContext;
FieldBinding delegateThis;
@@ -91,14 +92,14 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
// actual message invocation
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
if (isStatic) {
- codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokestatic, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
} else if( (this.receiver.isSuper()) || codegenBinding.isPrivate()){
- codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokespecial, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
} else {
if (constantPoolDeclaringClass.isInterface()) { // interface or annotation type
- codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokeinterface, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
} else {
- codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+ codeStream.invoke(ByteCodes.invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
}
}
} else {
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
index e4837404a7d..6413618652a 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
@@ -16,7 +16,27 @@
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.internal.compiler.CompilationResult;
-import org.eclipse.jdt.internal.compiler.ast.*;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
+import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.AllocationExpression;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
+import org.eclipse.jdt.internal.compiler.ast.Assignment;
+import org.eclipse.jdt.internal.compiler.ast.Block;
+import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.Expression;
+import org.eclipse.jdt.internal.compiler.ast.FieldReference;
+import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.MessageSend;
+import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.NameReference;
+import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression;
+import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
+import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Statement;
+import org.eclipse.jdt.internal.compiler.ast.TryStatement;
+import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
import org.eclipse.jdt.internal.compiler.lookup.Binding;
import org.eclipse.jdt.internal.compiler.parser.Parser;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
index 5fb709653d2..0306fb4b80b 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
@@ -24,7 +24,6 @@
import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.lookup.Binding;
@@ -41,6 +40,8 @@
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
public class CodeSnippetQualifiedNameReference extends QualifiedNameReference implements EvaluationConstants, ProblemReasons {
EvaluationContext evaluationContext;
@@ -389,12 +390,12 @@ public FieldBinding generateReadSequence(BlockScope currentScope, CodeStream cod
if (accessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, lastReceiverType, i == 0 && this.indexOfFirstFieldBinding == 1);
if (lastFieldBinding.isStatic()) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.fieldAccess(Opcodes.OPC_getfield, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, lastFieldBinding, constantPoolDeclaringClass);
}
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
} else {
codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
@@ -415,9 +416,9 @@ public FieldBinding generateReadSequence(BlockScope currentScope, CodeStream cod
MethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[i];
if (accessor == null) {
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, lastReceiverType, i == 0 && this.indexOfFirstFieldBinding == 1);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, lastFieldBinding, constantPoolDeclaringClass);
} else {
- codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokestatic, accessor, null /* default declaringClass */);
}
} else {
codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
@@ -454,7 +455,7 @@ public FieldBinding generateReadSequence(BlockScope currentScope, CodeStream cod
public void generateReceiver(CodeStream codeStream) {
codeStream.aload_0();
if (this.delegateThis != null) {
- codeStream.fieldAccess(Opcodes.OPC_getfield, this.delegateThis, null /* default declaringClass */); // delegated field access
+ codeStream.fieldAccess(ByteCodes.getfield, this.delegateThis, null /* default declaringClass */); // delegated field access
}
}
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetReturnStatement.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetReturnStatement.java
index 920630b2c9d..5f1d481ec34 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetReturnStatement.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetReturnStatement.java
@@ -19,7 +19,6 @@
import org.eclipse.jdt.internal.compiler.ast.ReturnStatement;
import org.eclipse.jdt.internal.compiler.ast.TryStatement;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowContext;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
@@ -31,6 +30,8 @@
import org.eclipse.jdt.internal.compiler.lookup.Scope;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
/**
* A return statement inside a code snippet. During the code gen,
* it uses a macro to set the result of the code snippet instead
@@ -94,7 +95,7 @@ public void generateStoreSaveValueIfNecessary(Scope scope, CodeStream codeStream
}
// generate the invoke virtual to "setResult(Object,Class)"
- codeStream.invoke(Opcodes.OPC_invokevirtual, this.setResultMethod, null /* default declaringClass */);
+ codeStream.invoke(ByteCodes.invokevirtual, this.setResultMethod, null /* default declaringClass */);
}
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
index a7f7454bb2b..1adfec619e5 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
@@ -23,7 +23,6 @@
import org.eclipse.jdt.internal.compiler.ast.IntLiteral;
import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.lookup.Binding;
@@ -44,6 +43,8 @@
import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
+import com.sun.tools.javac.jvm.ByteCodes;
+
/**
* A single name reference inside a code snippet can denote a field of a remote
* receiver object (that is, the receiver of the context in the stack frame).
@@ -217,7 +218,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
TypeBinding someReceiverType = this.delegateThis != null ? this.delegateThis.type : this.actualReceiverType;
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, someReceiverType, true /* implicit this */);
if (codegenField.isStatic()) {
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenField, constantPoolDeclaringClass);
} else {
if ((this.bits & DepthMASK) != 0) {
ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((this.bits & DepthMASK) >> DepthSHIFT);
@@ -226,7 +227,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
} else {
generateReceiver(codeStream);
}
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenField, constantPoolDeclaringClass);
}
} else {
// managing private access
@@ -290,7 +291,7 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
if (codegenField.canBeSeenBy(getReceiverType(currentScope), this, currentScope)) {
TypeBinding someReceiverType = this.delegateThis != null ? this.delegateThis.type : this.actualReceiverType;
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, someReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getstatic, codegenField, constantPoolDeclaringClass);
} else {
// used to store the value
codeStream.generateEmulationForField(codegenField);
@@ -312,7 +313,7 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
codeStream.dup();
TypeBinding someReceiverType = this.delegateThis != null ? this.delegateThis.type : this.actualReceiverType;
TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, someReceiverType, true /* implicit this */);
- codeStream.fieldAccess(Opcodes.OPC_getfield, codegenField, constantPoolDeclaringClass);
+ codeStream.fieldAccess(ByteCodes.getfield, codegenField, constantPoolDeclaringClass);
} else {
if ((this.bits & DepthMASK) != 0) {
// internal error, per construction we should have found it
@@ -535,7 +536,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
public void generateReceiver(CodeStream codeStream) {
codeStream.aload_0();
if (this.delegateThis != null) {
- codeStream.fieldAccess(Opcodes.OPC_getfield, this.delegateThis, null /* default declaringClass */); // delegate field access
+ codeStream.fieldAccess(ByteCodes.getfield, this.delegateThis, null /* default declaringClass */); // delegate field access
}
}
/**
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java
index 45d19d31aa1..370ff3e5e41 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java
@@ -30,8 +30,8 @@
import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
import org.eclipse.jdt.internal.compiler.env.IRecordComponent;
import org.eclipse.jdt.internal.compiler.env.ITypeAnnotationWalker;
-import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
import org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.ExternalAnnotationStatus;
+import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
import org.eclipse.jdt.internal.core.util.Util;
/**
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java
index 469ece42a7d..8424ba249d1 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java
@@ -19,7 +19,6 @@
import org.eclipse.jdt.internal.compiler.ast.ThisReference;
import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
-import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
import org.eclipse.jdt.internal.compiler.impl.Constant;
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
@@ -30,6 +29,8 @@
import org.eclipse.jdt.internal.compiler.lookup.Scope;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import com.sun.tools.javac.jvm.ByteCodes;
+
/**
* A this reference inside a code snippet denotes a remote
* receiver object (that is, the receiver of the context in the stack frame)
@@ -74,7 +75,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
int pc = codeStream.position;
if (valueRequired) {
codeStream.aload_0();
- codeStream.fieldAccess(Opcodes.OPC_getfield, this.delegateThis, null /* default declaringClass */); // delegate field access
+ codeStream.fieldAccess(ByteCodes.getfield, this.delegateThis, null /* default declaringClass */); // delegate field access
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java
index 20a9a05b83e..8a84048e845 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java
@@ -18,7 +18,9 @@
import org.eclipse.jdt.core.CompletionRequestor;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.compiler.*;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.internal.codeassist.ISelectionRequestor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java
index cbd41a8ac1b..b46f9051256 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java
@@ -21,7 +21,9 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jdt.core.compiler.*;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.internal.codeassist.CompletionEngine;
import org.eclipse.jdt.internal.codeassist.ISelectionRequestor;
import org.eclipse.jdt.internal.codeassist.SelectionEngine;
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/Evaluator.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/Evaluator.java
index 14b19a4e3c6..b5976e04364 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/Evaluator.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/Evaluator.java
@@ -18,7 +18,8 @@
import java.util.Iterator;
import java.util.Map;
-import org.eclipse.jdt.core.compiler.*;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.ClassFile;
import org.eclipse.jdt.internal.compiler.CompilationResult;
import org.eclipse.jdt.internal.compiler.Compiler;
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/VariablesEvaluator.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/VariablesEvaluator.java
index 59979871429..c3aa0771915 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/VariablesEvaluator.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/VariablesEvaluator.java
@@ -15,7 +15,8 @@
import java.util.Map;
-import org.eclipse.jdt.core.compiler.*;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.ClassFile;
import org.eclipse.jdt.internal.compiler.Compiler;
import org.eclipse.jdt.internal.compiler.ICompilerRequestor;