[llvm-commits] CVS: llvm-java/include/llvm/Java/BytecodeParser.h Bytecode.h
Alkis Evlogimenos
alkis at cs.uiuc.edu
Mon Oct 11 14:51:35 PDT 2004
Changes in directory llvm-java/include/llvm/Java:
BytecodeParser.h updated: 1.9 -> 1.10
Bytecode.h updated: 1.11 -> 1.12
---
Log message:
* Make BytecodeParser a bit more primitive. Now less bytecodes are
groupped in the same calls. This allows for more information to be
passed to the callsites.
* Changes in compiler/bytecodemapper.
* Remove SetCC enum from Bytecode.h
---
Diffs of the changes: (+361 -169)
Index: llvm-java/include/llvm/Java/BytecodeParser.h
diff -u llvm-java/include/llvm/Java/BytecodeParser.h:1.9 llvm-java/include/llvm/Java/BytecodeParser.h:1.10
--- llvm-java/include/llvm/Java/BytecodeParser.h:1.9 Wed Sep 29 13:08:56 2004
+++ llvm-java/include/llvm/Java/BytecodeParser.h Mon Oct 11 16:51:24 2004
@@ -1,4 +1,4 @@
-//===-- BytecodeParser.h - Java bytecode parser ---------------*- C++ -*-===//
+//===-- BytecodeParser.h - Java bytecode parser -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -29,8 +29,6 @@
protected:
typedef std::vector<std::pair<int, unsigned> > SwitchCases;
- enum JSetCC { EQ, NE, LT, GE, GT, LE };
-
private:
SwitchCases switchCases_;
@@ -44,8 +42,6 @@
/// appropriately. When this function returns all code up to
/// \c size is parsed.
void parse(const uint8_t* code, unsigned size) {
- using namespace Opcode;
-
for (unsigned i = 0; i < size; ++i) {
unsigned curBC = i;
bool wide = code[i] == WIDE;
@@ -90,155 +86,145 @@
THIS->do_ldc(readUShort(code, i));
break;
case LDC2_W:
- THIS->do_ldc(readUShort(code, i));
+ THIS->do_ldc2(readUShort(code, i));
break;
case ILOAD:
- THIS->do_load(
- INT, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_iload(wide ? readUShort(code, i) : readUByte(code, i));
break;
case LLOAD:
- THIS->do_load(
- LONG, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_lload(wide ? readUShort(code, i) : readUByte(code, i));
break;
case FLOAD:
- THIS->do_load(
- FLOAT, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_fload(wide ? readUShort(code, i) : readUByte(code, i));
break;
case DLOAD:
- THIS->do_load(
- DOUBLE, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_dload(wide ? readUShort(code, i) : readUByte(code, i));
break;
case ALOAD:
- THIS->do_load(
- REFERENCE, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_aload(wide ? readUShort(code, i) : readUByte(code, i));
break;
case ILOAD_0:
case ILOAD_1:
case ILOAD_2:
case ILOAD_3:
- THIS->do_load(INT, code[i]-ILOAD_0);
+ THIS->do_iload(code[i]-ILOAD_0);
break;
case LLOAD_0:
case LLOAD_1:
case LLOAD_2:
case LLOAD_3:
- THIS->do_load(LONG, code[i]-LLOAD_0);
+ THIS->do_lload(code[i]-LLOAD_0);
break;
case FLOAD_0:
case FLOAD_1:
case FLOAD_2:
case FLOAD_3:
- THIS->do_load(FLOAT, code[i]-FLOAD_0);
+ THIS->do_fload(code[i]-FLOAD_0);
break;
case DLOAD_0:
case DLOAD_1:
case DLOAD_2:
case DLOAD_3:
- THIS->do_load(DOUBLE, code[i]-DLOAD_0);
+ THIS->do_dload(code[i]-DLOAD_0);
break;
case ALOAD_0:
case ALOAD_1:
case ALOAD_2:
case ALOAD_3:
- THIS->do_load(REFERENCE, code[i]-ALOAD_0);
+ THIS->do_aload(code[i]-ALOAD_0);
break;
case IALOAD:
- THIS->do_aload(INT);
+ THIS->do_iaload();
break;
case LALOAD:
- THIS->do_aload(LONG);
+ THIS->do_laload();
break;
case FALOAD:
- THIS->do_aload(FLOAT);
+ THIS->do_faload();
break;
case DALOAD:
- THIS->do_aload(DOUBLE);
+ THIS->do_daload();
break;
case AALOAD:
- THIS->do_aload(REFERENCE);
+ THIS->do_aaload();
break;
case BALOAD:
- THIS->do_aload(BYTE);
+ THIS->do_baload();
break;
case CALOAD:
- THIS->do_aload(CHAR);
+ THIS->do_caload();
break;
case SALOAD:
- THIS->do_aload(SHORT);
+ THIS->do_saload();
break;
case ISTORE:
- THIS->do_store(
- INT, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_istore(wide ? readUShort(code, i) : readUByte(code, i));
break;
case LSTORE:
- THIS->do_store(
- LONG, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_lstore(wide ? readUShort(code, i) : readUByte(code, i));
break;
case FSTORE:
- THIS->do_store(
- FLOAT, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_fstore(wide ? readUShort(code, i) : readUByte(code, i));
break;
case DSTORE:
- THIS->do_store(
- DOUBLE, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_dstore(wide ? readUShort(code, i) : readUByte(code, i));
break;
case ASTORE:
- THIS->do_store(
- REFERENCE, wide ? readUShort(code, i) : readUByte(code, i));
+ THIS->do_astore(wide ? readUShort(code, i) : readUByte(code, i));
break;
case ISTORE_0:
case ISTORE_1:
case ISTORE_2:
case ISTORE_3:
- THIS->do_store(INT, code[i]-ISTORE_0);
+ THIS->do_istore(code[i]-ISTORE_0);
break;
case LSTORE_0:
case LSTORE_1:
case LSTORE_2:
case LSTORE_3:
- THIS->do_store(LONG, code[i]-LSTORE_0);
+ THIS->do_lstore(code[i]-LSTORE_0);
break;
case FSTORE_0:
case FSTORE_1:
case FSTORE_2:
case FSTORE_3:
- THIS->do_store(FLOAT, code[i]-FSTORE_0);
+ THIS->do_fstore(code[i]-FSTORE_0);
break;
case DSTORE_0:
case DSTORE_1:
case DSTORE_2:
case DSTORE_3:
- THIS->do_store(DOUBLE, code[i]-DSTORE_0);
+ THIS->do_dstore(code[i]-DSTORE_0);
break;
case ASTORE_0:
case ASTORE_1:
case ASTORE_2:
case ASTORE_3:
- THIS->do_store(REFERENCE, code[i]-ASTORE_0);
+ THIS->do_astore(code[i]-ASTORE_0);
break;
case IASTORE:
- THIS->do_astore(INT);
+ THIS->do_iastore();
break;
case LASTORE:
- THIS->do_astore(LONG);
+ THIS->do_lastore();
break;
case FASTORE:
- THIS->do_astore(FLOAT);
+ THIS->do_fastore();
break;
case DASTORE:
- THIS->do_astore(DOUBLE);
+ THIS->do_dastore();
break;
case AASTORE:
- THIS->do_astore(REFERENCE);
+ THIS->do_aastore();
break;
case BASTORE:
- THIS->do_astore(BYTE);
+ THIS->do_bastore();
break;
case CASTORE:
- THIS->do_astore(CHAR);
+ THIS->do_castore();
break;
case SASTORE:
- THIS->do_astore(SHORT);
+ THIS->do_sastore();
break;
case POP:
THIS->do_pop();
@@ -268,196 +254,244 @@
THIS->do_swap();
break;
case IADD:
+ THIS->do_iadd();
+ break;
case LADD:
+ THIS->do_ladd();
+ break;
case FADD:
+ THIS->do_fadd();
+ break;
case DADD:
- THIS->do_add();
+ THIS->do_dadd();
break;
case ISUB:
+ THIS->do_isub();
+ break;
case LSUB:
+ THIS->do_lsub();
+ break;
case FSUB:
+ THIS->do_fsub();
+ break;
case DSUB:
- THIS->do_sub();
+ THIS->do_dsub();
break;
case IMUL:
+ THIS->do_imul();
+ break;
case LMUL:
+ THIS->do_lmul();
+ break;
case FMUL:
+ THIS->do_fmul();
+ break;
case DMUL:
- THIS->do_mul();
+ THIS->do_dmul();
break;
case IDIV:
+ THIS->do_idiv();
+ break;
case LDIV:
+ THIS->do_ldiv();
+ break;
case FDIV:
+ THIS->do_fdiv();
+ break;
case DDIV:
- THIS->do_div();
+ THIS->do_ddiv();
break;
case IREM:
+ THIS->do_irem();
+ break;
case LREM:
+ THIS->do_lrem();
+ break;
case FREM:
+ THIS->do_frem();
+ break;
case DREM:
- THIS->do_rem();
+ THIS->do_drem();
break;
case INEG:
+ THIS->do_ineg();
+ break;
case LNEG:
+ THIS->do_lneg();
+ break;
case FNEG:
+ THIS->do_fneg();
+ break;
case DNEG:
- THIS->do_neg();
+ THIS->do_dneg();
break;
case ISHL:
+ THIS->do_ishl();
+ break;
case LSHL:
- THIS->do_shl();
+ THIS->do_lshl();
break;
case ISHR:
+ THIS->do_ishr();
+ break;
case LSHR:
- THIS->do_shr();
+ THIS->do_lshr();
break;
case IUSHR:
+ THIS->do_iushr();
+ break;
case LUSHR:
- THIS->do_ushr();
+ THIS->do_lushr();
break;
case IAND:
+ THIS->do_iand();
+ break;
case LAND:
- THIS->do_and();
+ THIS->do_land();
break;
case IOR:
+ THIS->do_ior();
+ break;
case LOR:
- THIS->do_or();
+ THIS->do_lor();
break;
case IXOR:
+ THIS->do_ixor();
+ break;
case LXOR:
- THIS->do_xor();
+ THIS->do_lxor();
break;
case IINC:
THIS->do_iinc(readUByte(code, i), readSByte(code, i));
break;
case I2L:
- THIS->do_convert(LONG);
+ THIS->do_i2l();
break;
case I2F:
- THIS->do_convert(FLOAT);
+ THIS->do_i2f();
break;
case I2D:
- THIS->do_convert(DOUBLE);
+ THIS->do_i2d();
break;
case L2I:
- THIS->do_convert(INT);
+ THIS->do_l2i();
break;
case L2F:
- THIS->do_convert(FLOAT);
+ THIS->do_l2f();
break;
case L2D:
- THIS->do_convert(DOUBLE);
+ THIS->do_l2d();
break;
case F2I:
- THIS->do_convert(INT);
+ THIS->do_f2i();
break;
case F2L:
- THIS->do_convert(LONG);
+ THIS->do_f2l();
break;
case F2D:
- THIS->do_convert(DOUBLE);
+ THIS->do_f2d();
break;
case D2I:
- THIS->do_convert(INT);
+ THIS->do_d2i();
break;
case D2L:
- THIS->do_convert(LONG);
+ THIS->do_d2l();
break;
case D2F:
- THIS->do_convert(FLOAT);
+ THIS->do_d2f();
break;
case I2B:
- THIS->do_convert(BYTE);
+ THIS->do_i2b();
break;
case I2C:
- THIS->do_convert(CHAR);
+ THIS->do_i2c();
break;
case I2S:
- THIS->do_convert(SHORT);
+ THIS->do_i2s();
break;
case LCMP:
THIS->do_lcmp();
break;
case FCMPL:
- THIS->do_cmpl();
+ THIS->do_fcmpl();
break;
case FCMPG:
- THIS->do_cmpg();
+ THIS->do_fcmpg();
break;
case DCMPL:
- THIS->do_cmpl();
+ THIS->do_dcmpl();
break;
case DCMPG:
- THIS->do_cmpg();
+ THIS->do_dcmpg();
break;
case IFEQ: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_if(EQ, INT, t, i + 1);
+ THIS->do_ifeq(t, i + 1);
break;
}
case IFNE: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_if(NE, INT, t, i + 1);
+ THIS->do_ifne(t, i + 1);
break;
}
case IFLT: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_if(LT, INT, t, i + 1);
+ THIS->do_iflt(t, i + 1);
break;
}
case IFGE: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_if(GE, INT, t, i + 1);
+ THIS->do_ifge(t, i + 1);
break;
}
case IFGT: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_if(GT, INT, t, i + 1);
+ THIS->do_ifgt(t, i + 1);
break;
}
case IFLE: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_if(LE, INT, t, i + 1);
+ THIS->do_ifle(t, i + 1);
break;
}
case IF_ICMPEQ: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(EQ, t, i + 1);
+ THIS->do_if_icmpeq(t, i + 1);
break;
}
case IF_ICMPNE: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(NE, t, i + 1);
+ THIS->do_if_icmpne(t, i + 1);
break;
}
case IF_ICMPLT: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(LT, t, i + 1);
+ THIS->do_if_icmplt(t, i + 1);
break;
}
case IF_ICMPGE: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(GE, t, i + 1);
+ THIS->do_if_icmpge(t, i + 1);
break;
}
case IF_ICMPGT: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(GT, t, i + 1);
+ THIS->do_if_icmpgt(t, i + 1);
break;
}
case IF_ICMPLE: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(LE, t, i + 1);
+ THIS->do_if_icmple(t, i + 1);
break;
}
case IF_IACMPEQ: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(EQ, t, i + 1);
+ THIS->do_if_acmpeq(t, i + 1);
break;
}
case IF_IACMPNE: {
unsigned t = curBC + readSShort(code, i);
- THIS->do_ifcmp(NE, t, i + 1);
+ THIS->do_if_acmpne(t, i + 1);
break;
}
case GOTO:
@@ -497,14 +531,22 @@
break;
}
case IRETURN:
+ THIS->do_ireturn();
+ break;
case LRETURN:
+ THIS->do_lreturn();
+ break;
case FRETURN:
+ THIS->do_freturn();
+ break;
case DRETURN:
+ THIS->do_dreturn();
+ break;
case ARETURN:
THIS->do_return();
break;
case RETURN:
- THIS->do_return_void();
+ THIS->do_return();
break;
case GETSTATIC:
THIS->do_getstatic(readUShort(code, i));
@@ -571,12 +613,12 @@
break;
case IFNULL: {
unsigned t = curBC + readUShort(code, i);
- THIS->do_if(EQ, REFERENCE, t, i + 1);
+ THIS->do_ifnull(t, i + 1);
break;
}
case IFNONNULL: {
unsigned t = curBC + readUShort(code, i);
- THIS->do_if(NE, REFERENCE, t, i + 1);
+ THIS->do_ifnonnull(t, i + 1);
break;
}
case GOTO_W:
@@ -611,21 +653,62 @@
void do_fconst(float value) { }
/// @brief called on DCONST_<n>
void do_dconst(double value) { }
- /// @brief called on LDC, LDC_W and LDC2_W
+ /// @brief called on LDC and LDC_W
void do_ldc(unsigned index) { }
- /// @brief called on ILOAD, LLOAD, FLOAD, DLOAD, ALOAD,
- /// ILOAD_<n>, LLOAD_<n>, FLOAD_<n>, DLOAD_<n>, and ALOAD_<n>
- void do_load(JType type, unsigned index) { }
- /// @brief called on IALOAD, LALOAD, FALOAD, DALOAD, AALOAD,
- /// BALOAD, CALOAD, and SALOAD
- void do_aload(JType type) { }
- /// @brief called on ISTORE, LSTORE, FSTORE, DSTORE, ASTORE,
- /// ISTORE_<n>, LSTORE_<n>, FSTORE_<n>, DSTORE_<n>, and
- /// ASTORE_<n>
- void do_store(JType type, unsigned index) { }
- /// @brief called on IASTORE, LASTORE, FASTORE, DASTORE, AASTORE,
- /// BASTORE, CASTORE, and SASTORE
- void do_astore(JType type) { }
+ /// @brief called on LDC2_W
+ void do_ldc2(unsigned index) { }
+ /// @brief called on ILOAD and ILOAD_<n>
+ void do_iload(unsigned index) { }
+ /// @brief called on LLOAD and LLOAD_<n>
+ void do_lload(unsigned index) { }
+ /// @brief called on FLOAD and FLOAD_<n>
+ void do_fload(unsigned index) { }
+ /// @brief called on DLOAD and DLOAD_<n>
+ void do_dload(unsigned index) { }
+ /// @brief called on ALOAD and ALOAD_<n>
+ void do_aload(unsigned index) { }
+ /// @brief called on IALOAD
+ void do_iaload() { }
+ /// @brief called on LALOAD
+ void do_laload() { }
+ /// @brief called on FALOAD
+ void do_faload() { }
+ /// @brief called on DALOAD
+ void do_daload() { }
+ /// @brief called on AALOAD
+ void do_aaload() { }
+ /// @brief called on BALOAD
+ void do_baload() { }
+ /// @brief called on CALOAD
+ void do_caload() { }
+ /// @brief called on SALOAD
+ void do_saload() { }
+ /// @brief called on ISTORE and ISTORE_<n>
+ void do_istore(unsigned index) { }
+ /// @brief called on LSTORE and LSTORE_<n>
+ void do_lstore(unsigned index) { }
+ /// @brief called on FSTORE and FSTORE_<n>
+ void do_fstore(unsigned index) { }
+ /// @brief called on DSTORE and DSTORE_<n>
+ void do_dstore(unsigned index) { }
+ /// @brief called on ASTORE and ASTORE_<n>
+ void do_astore(unsigned index) { }
+ /// @brief called on IASTORE
+ void do_iastore() { }
+ /// @brief called on LASTORE
+ void do_lastore() { }
+ /// @brief called on FASTORE
+ void do_fastore() { }
+ /// @brief called on DASTORE
+ void do_dastore() { }
+ /// @brief called on AASTORE
+ void do_aastore() { }
+ /// @brief called on BASTORE
+ void do_bastore() { }
+ /// @brief called on CASTORE
+ void do_castore() { }
+ /// @brief called on SASTORE
+ void do_sastore() { }
/// @brief called on POP
void do_pop() { }
/// @brief called on POP2
@@ -644,45 +727,148 @@
void do_dup2_x2() { }
/// @brief called on SWAP
void do_swap() { }
- /// @brief called on IADD, LADD, FADD, and DADD
- void do_add() { }
- /// @brief called on ISUB, LSUB, FSUB, and DSUB
- void do_sub() { }
- /// @brief called on IMUL, LMUL, FMUL, and DMUL
- void do_mul() { }
- /// @brief called on IDIV, LDIV, FDIV, and DDIV
- void do_div() { }
- /// @brief called on IREM, LREM, FREM, and DREM
- void do_rem() { }
- /// @brief called on INEG, LNEG, FNEG, and DNEG
- void do_neg() { }
- /// @brief called on ISHL and LSHL
- void do_shl() { }
- /// @brief called on ISHR and LSHR
- void do_shr() { }
- /// @brief called on IUSHR and LUSHR
- void do_ushr() { }
- /// @brief called on IAND and LAND
- void do_and() { }
- /// @brief called on IOR or LOR
- void do_or() { }
- /// @brief called on IXOR and LXOR
- void do_xor() { }
+ /// @brief called on IADD
+ void do_iadd() { }
+ /// @brief called on LADD
+ void do_ladd() { }
+ /// @brief called on FADD
+ void do_fadd() { }
+ /// @brief called on DADD
+ void do_dadd() { }
+ /// @brief called on ISUB
+ void do_isub() { }
+ /// @brief called on LSUB
+ void do_lsub() { }
+ /// @brief called on FSUB
+ void do_fsub() { }
+ /// @brief called on DSUB
+ void do_dsub() { }
+ /// @brief called on IMUL
+ void do_imul() { }
+ /// @brief called on LMUL
+ void do_lmul() { }
+ /// @brief called on FMUL
+ void do_fmul() { }
+ /// @brief called on DMUL
+ void do_dmul() { }
+ /// @brief called on IDIV
+ void do_idiv() { }
+ /// @brief called on LDIV
+ void do_ldiv() { }
+ /// @brief called on FDIV
+ void do_fdiv() { }
+ /// @brief called on DDIV
+ void do_ddiv() { }
+ /// @brief called on IREM
+ void do_irem() { }
+ /// @brief called on LREM
+ void do_lrem() { }
+ /// @brief called on FREM
+ void do_frem() { }
+ /// @brief called on DREM
+ void do_drem() { }
+ /// @brief called on INEG
+ void do_ineg() { }
+ /// @brief called on LNEG
+ void do_lneg() { }
+ /// @brief called on FNEG
+ void do_fneg() { }
+ /// @brief called on DNEG
+ void do_dneg() { }
+ /// @brief called on ISHL
+ void do_ishl() { }
+ /// @brief called on LSHL
+ void do_lshl() { }
+ /// @brief called on ISHR
+ void do_ishr() { }
+ /// @brief called on LSHR
+ void do_lshr() { }
+ /// @brief called on IUSHR
+ void do_iushr() { }
+ /// @brief called on LUSHR
+ void do_lushr() { }
+ /// @brief called on IAND
+ void do_iand() { }
+ /// @brief called on LAND
+ void do_land() { }
+ /// @brief called on IOR
+ void do_ior() { }
+ /// @brief called on LOR
+ void do_lor() { }
+ /// @brief called on IXOR
+ void do_ixor() { }
+ /// @brief called on LXOR
+ void do_lxor() { }
/// @brief called on IINC
void do_iinc(unsigned index, int amount) { }
- /// @brief called on I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L,
- /// F2D, D2I, D2L, D2F, I2B, I2C, and I2S
- void do_convert(JType to) { }
+ /// @brief called on I2L
+ void do_i2l() { }
+ /// @brief called on I2F
+ void do_i2f() { }
+ /// @brief called on I2D
+ void do_i2d() { }
+ /// @brief called on L2I
+ void do_l2i() { }
+ /// @brief called on L2F
+ void do_l2f() { }
+ /// @brief called on L2D
+ void do_l2d() { }
+ /// @brief called on F2I
+ void do_f2i() { }
+ /// @brief called on F2L
+ void do_f2l() { }
+ /// @brief called on F2D
+ void do_f2d() { }
+ /// @brief called on D2I
+ void do_d2i() { }
+ /// @brief called on D2L
+ void do_d2l() { }
+ /// @brief called on D2F
+ void do_d2f() { }
+ /// @brief called on I2B
+ void do_i2b() { }
+ /// @brief called on I2C
+ void do_i2c() { }
+ /// @brief called on I2S
+ void do_i2s() { }
/// @brief called on LCMP
void do_lcmp() { }
- /// @brief called on FCMPL and DCMPL
- void do_cmpl() { }
- /// @brief called on FCMPG and DCMPG
- void do_cmpg() { }
- /// @brief called on IF<op>, IFNULL, and IFNONNULL
- void do_if(JSetCC cc, JType type, unsigned t, unsigned f) { }
- /// @brief called on IFCMP<op> and IFACMP<op>
- void do_ifcmp(JSetCC cc, unsigned t, unsigned f) { }
+ /// @brief called on FCMPL
+ void do_fcmpl() { }
+ /// @brief called on DCMPL
+ void do_dcmpl() { }
+ /// @brief called on FCMPG
+ void do_fcmpg() { }
+ /// @brief called on DCMPG
+ void do_dcmpg() { }
+ /// @brief called on IFEQ
+ void do_ifeq(unsigned t, unsigned f) { }
+ /// @brief called on IFNE
+ void do_ifne(unsigned t, unsigned f) { }
+ /// @brief called on IFLT
+ void do_iflt(unsigned t, unsigned f) { }
+ /// @brief called on IFGE
+ void do_ifge(unsigned t, unsigned f) { }
+ /// @brief called on IFGT
+ void do_ifgt(unsigned t, unsigned f) { }
+ /// @brief called on IFLE
+ void do_ifle(unsigned t, unsigned f) { }
+ /// @brief called on IF_ICMPEQ
+ void do_if_icmpeq(unsigned t, unsigned f) { }
+ /// @brief called on IF_ICMPNE
+ void do_if_icmpne(unsigned t, unsigned f) { }
+ /// @brief called on IF_ICMPLT
+ void do_if_icmplt(unsigned t, unsigned f) { }
+ /// @brief called on IF_ICMPGE
+ void do_if_icmpge(unsigned t, unsigned f) { }
+ /// @brief called on IF_ICMPGT
+ void do_if_icmpgt(unsigned t, unsigned f) { }
+ /// @brief called on IF_ICMPLE
+ void do_if_icmple(unsigned t, unsigned f) { }
+ /// @brief called on IF_ACMPEQ
+ void do_if_acmpeq(unsigned t, unsigned f) { }
+ /// @brief called on IF_ACMPNE
+ void do_if_acmpne(unsigned t, unsigned f) { }
/// @brief called on GOTO and GOTO_W
void do_goto(unsigned target) { }
/// @brief called on JSR and JSR_W
@@ -691,11 +877,18 @@
void do_ret(unsigned index) { }
/// @brief called on TABLESWITCH and LOOKUPSWITCH
void do_switch(unsigned defTarget, const SwitchCases& sw) { }
- /// @brief called on IRETURN, LRETURN, FRETURN, DRETURN and
- /// ARETURN
- void do_return() { }
+ /// @brief called on IRETURN
+ void do_ireturn() { }
+ /// @brief called on LRETURN
+ void do_lreturn() { }
+ /// @brief called on FRETURN
+ void do_freturn() { }
+ /// @brief called on DRETURN
+ void do_dreturn() { }
+ /// @brief called on ARETURN
+ void do_areturn() { }
/// @brief called on RETURN
- void do_return_void() { }
+ void do_return() { }
/// @brief called on GETSTATIC
void do_getstatic(unsigned index) { }
/// @brief called on PUTSTATIC
@@ -732,6 +925,10 @@
void do_monitorexit() { }
/// @brief called on MULTIANEWARRAY
void do_multianewarray(unsigned index, unsigned dims) { }
+ /// @brief called on IFNULL
+ void do_ifnull(unsigned t, unsigned f) { }
+ /// @brief called on IFNONNULL
+ void do_ifnonnull(unsigned t, unsigned f) { }
};
} } // namespace llvm::Java
Index: llvm-java/include/llvm/Java/Bytecode.h
diff -u llvm-java/include/llvm/Java/Bytecode.h:1.11 llvm-java/include/llvm/Java/Bytecode.h:1.12
--- llvm-java/include/llvm/Java/Bytecode.h:1.11 Wed Sep 29 13:08:56 2004
+++ llvm-java/include/llvm/Java/Bytecode.h Mon Oct 11 16:51:24 2004
@@ -21,21 +21,18 @@
namespace llvm { namespace Java {
- enum JType {
- REFERENCE = 0, // this is not defined in the java spec
- BOOLEAN = 4,
- CHAR = 5,
- FLOAT = 6,
- DOUBLE = 7,
- BYTE = 8,
- SHORT = 9,
- INT = 10,
- LONG = 11,
- };
-
- namespace Opcode {
+ enum JType {
+ BOOLEAN = 4,
+ CHAR = 5,
+ FLOAT = 6,
+ DOUBLE = 7,
+ BYTE = 8,
+ SHORT = 9,
+ INT = 10,
+ LONG = 11,
+ };
- enum {
+ enum Opcode {
NOP = 0x00,
ACONST_NULL = 0x01,
ICONST_M1 = 0x02,
@@ -243,8 +240,6 @@
IMPDEP2 = 0xFF,
};
- } // namespace Opcode
-
inline int readSByte(const uint8_t* code, unsigned& i) {
return ((int8_t*)code)[++i];
}
More information about the llvm-commits
mailing list