2128 if (top_type != MAKE_FULLINFO(ITEM_Integer, 0, 0))
2129 CCerror(context, "Expecting to find integer on stack");
2130 break;
2131
2132 case 'F':
2133 if (top_type != MAKE_FULLINFO(ITEM_Float, 0, 0))
2134 CCerror(context, "Expecting to find float on stack");
2135 break;
2136
2137 case 'A': /* object or array */
2138 if ( (GET_ITEM_TYPE(top_type) != ITEM_Object)
2139 && (GET_INDIRECTION(top_type) == 0)) {
2140 /* The thing isn't an object or an array. Let's see if it's
2141 * one of the special cases */
2142 if ( (WITH_ZERO_EXTRA_INFO(top_type) ==
2143 MAKE_FULLINFO(ITEM_ReturnAddress, 0, 0))
2144 && (opcode == JVM_OPC_astore))
2145 break;
2146 if ( (GET_ITEM_TYPE(top_type) == ITEM_NewObject
2147 || (GET_ITEM_TYPE(top_type) == ITEM_InitObject))
2148 && ((opcode == JVM_OPC_astore) || (opcode == JVM_OPC_aload)
2149 || (opcode == JVM_OPC_ifnull) || (opcode == JVM_OPC_ifnonnull)))
2150 break;
2151 /* The 2nd edition VM of the specification allows field
2152 * initializations before the superclass initializer,
2153 * if the field is defined within the current class.
2154 */
2155 if ( (GET_ITEM_TYPE(top_type) == ITEM_InitObject)
2156 && (opcode == JVM_OPC_putfield)) {
2157 int operand = this_idata->operand.i;
2158 int access_bits = JVM_GetCPFieldModifiers(context->env,
2159 context->class,
2160 operand,
2161 context->class);
2162 /* Note: This relies on the fact that
2163 * JVM_GetCPFieldModifiers retrieves only local fields,
2164 * and does not respect inheritance.
2165 */
2166 if (access_bits != -1) {
2167 if ( cp_index_to_class_fullinfo(context, operand, JVM_CONSTANT_Fieldref) ==
2168 context->currentclass_info ) {
2169 top_type = context->currentclass_info;
|
2128 if (top_type != MAKE_FULLINFO(ITEM_Integer, 0, 0))
2129 CCerror(context, "Expecting to find integer on stack");
2130 break;
2131
2132 case 'F':
2133 if (top_type != MAKE_FULLINFO(ITEM_Float, 0, 0))
2134 CCerror(context, "Expecting to find float on stack");
2135 break;
2136
2137 case 'A': /* object or array */
2138 if ( (GET_ITEM_TYPE(top_type) != ITEM_Object)
2139 && (GET_INDIRECTION(top_type) == 0)) {
2140 /* The thing isn't an object or an array. Let's see if it's
2141 * one of the special cases */
2142 if ( (WITH_ZERO_EXTRA_INFO(top_type) ==
2143 MAKE_FULLINFO(ITEM_ReturnAddress, 0, 0))
2144 && (opcode == JVM_OPC_astore))
2145 break;
2146 if ( (GET_ITEM_TYPE(top_type) == ITEM_NewObject
2147 || (GET_ITEM_TYPE(top_type) == ITEM_InitObject))
2148 && ((opcode == JVM_OPC_astore) || (opcode == JVM_OPC_aload)))
2149 break;
2150 /* The 2nd edition VM of the specification allows field
2151 * initializations before the superclass initializer,
2152 * if the field is defined within the current class.
2153 */
2154 if ( (GET_ITEM_TYPE(top_type) == ITEM_InitObject)
2155 && (opcode == JVM_OPC_putfield)) {
2156 int operand = this_idata->operand.i;
2157 int access_bits = JVM_GetCPFieldModifiers(context->env,
2158 context->class,
2159 operand,
2160 context->class);
2161 /* Note: This relies on the fact that
2162 * JVM_GetCPFieldModifiers retrieves only local fields,
2163 * and does not respect inheritance.
2164 */
2165 if (access_bits != -1) {
2166 if ( cp_index_to_class_fullinfo(context, operand, JVM_CONSTANT_Fieldref) ==
2167 context->currentclass_info ) {
2168 top_type = context->currentclass_info;
|