Skip to content

Commit

Permalink
Merge pull request #19812 from theresa-m/fix_18316_2
Browse files Browse the repository at this point in the history
Remove remaining aconst_init, withfield, vnew refs
  • Loading branch information
hangshao0 authored Jul 8, 2024
2 parents 9f340d0 + c00260e commit 677181c
Show file tree
Hide file tree
Showing 26 changed files with 58 additions and 527 deletions.
1 change: 0 additions & 1 deletion debugtools/DDR_VM/data/superset-constants.dat
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,6 @@ C|CFR_BC_vload
C|CFR_BC_vreturn
C|CFR_BC_vstore
C|CFR_BC_vunbox
C|CFR_BC_vwithfield
C|CFR_BC_wide
S|J9ClassInitFlags|J9ClassInitFlagsPointer|
C|J9ClassInitFailed
Expand Down
6 changes: 0 additions & 6 deletions debugtools/DDR_VM/src/com/ibm/j9ddr/vm29/j9/BCNames.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ public class BCNames {
public static final int JBifnonnull = 199;
public static final int JBgotow = 200;
public static final int JBbreakpoint = 202;
public static final int JBaconst_init;
public static final int JBwithfield;
public static final int JBiincw;
public static final int JBaload0getfield;
public static final int JBnewdup;
Expand Down Expand Up @@ -270,8 +268,6 @@ public class BCNames {
static {
switch (AlgorithmVersion.getVersionOf(AlgorithmVersion.BYTECODE_VERSION).getAlgorithmVersion()) {
case 0:
JBaconst_init = 224;
JBwithfield = 226;
JBiloadw = 203;
JBlloadw = 204;
JBfloadw = 205;
Expand Down Expand Up @@ -306,8 +302,6 @@ public class BCNames {
JBreturnFromJ2I = 251;
break;
case 1:
JBaconst_init = 203;
JBwithfield = 204;
JBiincw = 213;
JBaload0getfield = 215;
JBnewdup = 216;
Expand Down
12 changes: 6 additions & 6 deletions debugtools/DDR_VM/src/com/ibm/j9ddr/vm29/j9/PCStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ public class PCStack
0x25 /* JBgotow = 200 */,
0x00 /* JBunimplemented = 201 */,
0x71 /* JBbreakpoint = 202 */,
0x03 /* JBaconst_init = 203 */,
0x03 /* JBwithfield = 204 */,
0x00 /* JBunimplemented = 203 */,
0x00 /* JBunimplemented = 204 */,
0x00 /* JBunimplemented = 205 */,
0x00 /* JBunimplemented = 206 */,
0x00 /* JBunimplemented = 207 */,
Expand Down Expand Up @@ -1017,8 +1017,8 @@ public class PCStack
0x00 /* JBgotow = 200 -- pops: 0 pushes: 0*/ ,
0x00 /* JBunimplemented = 201 -- pops: 0 pushes: 0*/ ,
0x00 /* JBbreakpoint = 202 -- pops: 0 pushes: 0*/ ,
0x50 /* JBaconst_init = 203 -- pops: 0 pushes: 1*/ ,
0x80 /* JBwithfield = 204 -- pops: 2 pushes: 1*/ ,
0x00 /* JBunimplemented = 203 -- pops: 0 pushes: 0*/ ,
0x00 /* JBunimplemented = 204 -- pops: 0 pushes: 0*/ ,
0x00 /* JBunimplemented = 205 -- pops: 0 pushes: 0*/ ,
0x00 /* JBunimplemented = 206 -- pops: 0 pushes: 0*/ ,
0x00 /* JBunimplemented = 207 -- pops: 0 pushes: 0*/ ,
Expand Down Expand Up @@ -1537,8 +1537,8 @@ public class PCStack
0x0 /* JBgotow (16rC8) */,
0x0 /* JBunimplemented (16rC9) */,
0x0 /* JBbreakpoint (16rCA) */,
0x0 /* JBaconst_init (16rCB) */ ,
0x0 /* JBwithfield (16rCC) */ ,
0x0 /* JBunimplemented (16rCB) */ ,
0x0 /* JBunimplemented (16rCC) */ ,
0x0 /* JBunimplemented (16rCD) */,
0x0 /* JBunimplemented (16rCE) */,
0x0 /* JBunimplemented (16rCF) */,
Expand Down
4 changes: 2 additions & 2 deletions debugtools/DDR_VM/src/com/ibm/j9ddr/vm29/j9/VrfyTbl.java
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ public class VrfyTbl
0x0E81 /* JBgotow - 200 */,
0x1700 /* JBunimplemented - 201 */,
0x1700 /* JBbreakpoint - 202 */,
0x1200 /* JBaconst_init = 203 */,
0x1000 /* JBwithfield = 204 */,
0x1700 /* JBunimplemented = 203 */,
0x1700 /* JBunimplemented = 204 */,
0x1700 /* JBunimplemented - 205 */,
0x1700 /* JBunimplemented - 206 */,
0x1700 /* JBunimplemented - 207 */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import static com.ibm.j9ddr.vm29.j9.BCNames.JBldcw;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBmultianewarray;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBputfield;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBwithfield;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBputstatic;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBswap;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBtableswitch;
Expand Down Expand Up @@ -524,7 +523,7 @@ private int mapStack(U16 totalStack, byte[] map,
PUSH(INT);
}
}
} else if ((bc == JBputfield) || (bc == JBwithfield)) {
} else if (bc == JBputfield) {
POP();
index = PARAM_16(bcIndex, 1).intValue();
utf8Signature = J9ROMFieldRefPointer.cast(pool.add(index)).nameAndSignature().signature();
Expand All @@ -533,9 +532,6 @@ private int mapStack(U16 totalStack, byte[] map,
if ((signature == 'D') || (signature == 'J')) {
POP();
}
if (bc == JBwithfield) {
PUSH(OBJ);
}
} else if (bc == JBputstatic) {
index = PARAM_16(bcIndex, 1).intValue();
utf8Signature = J9ROMFieldRefPointer.cast(pool.add(index)).nameAndSignature().signature();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ private void allSlotsInBytecodesDo(J9ROMMethodPointer method) throws CorruptData
|| (bc == JBputstatic)
|| (bc == JBgetfield)
|| (bc == JBputfield)
|| (bc == JBwithfield)
|| (bc == JBinvokevirtual)
|| (bc == JBinvokespecial)
|| (bc == JBinvokestatic)
Expand All @@ -500,7 +499,6 @@ private void allSlotsInBytecodesDo(J9ROMMethodPointer method) throws CorruptData
|| (bc == JBinvokedynamic)
|| (bc == JBinvokeinterface)
|| (bc == JBnew)
|| (bc == JBaconst_init)
|| (bc == JBnewdup)
|| (bc == JBanewarray)
|| (bc == JBcheckcast)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import static com.ibm.j9ddr.vm29.j9.BCNames.JBfloadw;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBfstore;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBfstorew;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBwithfield;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBgetfield;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBgetstatic;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBgoto;
Expand Down Expand Up @@ -84,7 +83,6 @@
import static com.ibm.j9ddr.vm29.j9.BCNames.JBlstore;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBlstorew;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBmultianewarray;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBaconst_init;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBnew;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBnewdup;
import static com.ibm.j9ddr.vm29.j9.BCNames.JBnewarray;
Expand Down Expand Up @@ -398,7 +396,6 @@ private static IDATA j9bcutil_dumpBytecodes(PrintStream out, J9ROMClassPointer r
} else if ((bcIntVal == JBgetstatic)
|| (bcIntVal == JBputstatic)
|| (bcIntVal == JBgetfield)
|| (bcIntVal == JBwithfield)
|| (bcIntVal == JBputfield)
) {
index = new UDATA(_GETNEXT_U16());
Expand Down Expand Up @@ -481,7 +478,6 @@ private static IDATA j9bcutil_dumpBytecodes(PrintStream out, J9ROMClassPointer r
pc = pc.add(2);
} else if ((bcIntVal == JBnew)
|| (bcIntVal == JBnewdup)
|| (bcIntVal == JBaconst_init)
|| (bcIntVal == JBanewarray)
|| (bcIntVal == JBcheckcast)
|| (bcIntVal == JBinstanceof)
Expand Down
6 changes: 1 addition & 5 deletions runtime/codert_vm/decomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,10 @@ getPendingStackHeight(J9VMThread *currentThread, U_8 *interpreterPC, J9Method *r
case JBmultianewarray: /* Dimensions stacked (number of dimensions is 3 bytes from the multianewarray) */
pendingStackHeight -= interpreterPC[3];
break;
case JBwithfield:
/* it will always be two slots since we only ever need to allocate qtype */
pendingStackHeight -= 2;
break;
case JBgetfield:
pendingStackHeight -= 1;
break;
default: /* JBnew/JBaconst_init - no stacked parameters*/
default: /* JBnew - no stacked parameters*/
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/compile/J9Compilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ J9::Compilation::canAllocateInline(TR::Node* node, TR_OpaqueClassBlock* &classIn
if (clazz == NULL)
return -1;

// Arrays of primitive value type classes must have all their elements initialized with the
// default value of the component type. For now, prevent inline allocation of them.
// Arrays of null-restricted (a.k.a, primitive value type) classes must have all their elements initialized
// with the default value of the component type. For now, prevent inline allocation of them.
//
if (areValueTypesEnabled && TR::Compiler->cls.isPrimitiveValueTypeClass(reinterpret_cast<TR_OpaqueClassBlock*>(clazz)))
{
Expand Down
15 changes: 9 additions & 6 deletions runtime/compiler/env/J9ObjectModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,23 @@ class ObjectModel : public OMR::ObjectModelConnector
bool mayRequireSpineChecks();

/**
* @brief Whether or not value object is enabled
*/
* @brief Whether or not value object is enabled
*/
bool areValueTypesEnabled();

/**
* @brief Whether or not flattenable value object (aka null restricted) type is enabled
*/
* @brief Whether or not flattenable value object (aka null restricted) type is enabled
*/
bool areFlattenableValueTypesEnabled();

/**
* @brief Whether the check is enabled on monitor object being value based class type
*/
bool areValueBasedMonitorChecksEnabled();

/**
* @brief Whether the array flattening is enabled for value types
*/
* @brief Whether the array flattening is enabled for value types
*/
bool isValueTypeArrayFlatteningEnabled();

int32_t sizeofReferenceField();
Expand Down
2 changes: 0 additions & 2 deletions runtime/compiler/ilgen/J9ByteCode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ enum TR_J9ByteCode
J9BCmonitorenter, J9BCmonitorexit,
J9BCwide,
J9BCasyncCheck,
J9BCaconst_init,
J9BCwithfield,
J9BCbreakpoint,
J9BCunknown
};
Expand Down
6 changes: 0 additions & 6 deletions runtime/compiler/ilgen/J9ByteCodeIlGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,6 @@ class TR_J9ByteCodeIlGenerator : public TR_IlGenerator, public TR_J9ByteCodeIter
void genMonitorEnter();
void genMonitorExit(bool);
TR_OpaqueClassBlock *loadValueClass(int32_t classCpIndex);
void genAconst_init(int32_t classCpIndex);
void genAconst_init(TR_OpaqueClassBlock *valueTypeClass, int32_t cpIndex);
void genWithField(int32_t fieldCpIndex);
void genWithField(TR::SymbolReference *, TR_OpaqueClassBlock *);
void genFlattenableWithField(int32_t, TR_OpaqueClassBlock *);
void genFlattenableWithFieldWithHelper(int32_t fieldCpIndex);
void genFlush(int32_t nargs);
void genFullFence(TR::Node *node);
void handlePendingPushSaveSideEffects(TR::Node *, int32_t stackSize = -1);
Expand Down
9 changes: 2 additions & 7 deletions runtime/compiler/ilgen/J9ByteCodeIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ TR_J9ByteCodeIterator::printByteCode()
case J9BCgetstatic: case J9BCgetfield: case J9BCputstatic: case J9BCputfield:
case J9BCcheckcast: case J9BCinstanceof:
case J9BCnew: case J9BCanewarray:
case J9BCaconst_init: case J9BCwithfield:
printCPIndex(next2Bytes());
break;

Expand Down Expand Up @@ -372,8 +371,8 @@ const TR_J9ByteCode TR_J9ByteCodeIterator::_opCodeToByteCodeEnum[] =
/* 198 */ J9BCifnull, J9BCifnonnull,
/* 200 */ J9BCgotow, J9BCunknown,
/* 202 */ J9BCbreakpoint,
/* 203 */ J9BCaconst_init,
/* 204 */ J9BCwithfield,
/* 203 */ J9BCunknown,
/* 204 */ J9BCunknown,
/* 205 */ J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown,
/* 209 */ J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown,
/* 213 */ J9BCiincw, J9BCunknown,
Expand Down Expand Up @@ -611,8 +610,6 @@ const uint8_t TR_J9ByteCodeIterator::_byteCodeFlags[] =
0x01, // J9BCmonitorexit
0x00, // J9BCwide
0x01, // J9BCasyncCheck --- TODO: Is this the right size?
0x03, // J9BCaconst_init
0x03, // J9BCwithfield
0x01, // J9BCbreakpoint --- TODO: Is this the right size?
0x01, // BCunknown
};
Expand Down Expand Up @@ -835,8 +832,6 @@ const uint8_t TR_J9ByteCodeIterator::_estimatedCodeSize[] =
25, // J9BCmonitorexit
0, // J9BCwide
0, // J9BCasyncCheck
1, // J9BCaconst_init
1, // J9BCwithfield
0, // J9BCunknown
};

Expand Down
Loading

0 comments on commit 677181c

Please sign in to comment.