OpenJDK / valhalla / valhalla
changeset 52850:b8e99028b698 lworld
Summary: Verifier changes needed for LW2
Reviewed-by: fparain
line wrap: on
line diff
--- a/src/hotspot/share/classfile/stackMapTable.cpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/classfile/stackMapTable.cpp Tue Nov 27 09:25:51 2018 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -187,7 +187,17 @@ _stream->stackmap_format_error("bad class index", THREAD); return VerificationType::bogus_type(); } - return VerificationType::reference_type(_cp->klass_name_at(class_index)); + Symbol* klass_name = _cp->klass_name_at(class_index); + if (klass_name->is_Q_signature()) { + Symbol* fund_name = klass_name->fundamental_name(THREAD); + if (fund_name == NULL) { + _stream->stackmap_format_error("TBD something bad happened", THREAD); + return VerificationType::bogus_type(); + } + return VerificationType::valuetype_type(fund_name); + } else { + return VerificationType::reference_type(klass_name); + } } if (tag == ITEM_UninitializedThis) { if (flags != NULL) {
--- a/src/hotspot/share/classfile/verificationType.cpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/classfile/verificationType.cpp Tue Nov 27 09:25:51 2018 -0500 @@ -110,6 +110,31 @@ } else if (is_array() && from.is_array()) { VerificationType comp_this = get_component(context, CHECK_false); VerificationType comp_from = from.get_component(context, CHECK_false); + + if (comp_from.is_valuetype() && !comp_this.is_null() && comp_this.is_reference()) { + // An array of value types is not assignable to an array of java.lang.Objects. + if (comp_this.name() == vmSymbols::java_lang_Object()) { + return false; + } + + // Need to load 'comp_this' to see if it is an interface. + InstanceKlass* klass = context->current_class(); + { + HandleMark hm(THREAD); + Klass* comp_this_class = SystemDictionary::resolve_or_fail( + comp_this.name(), Handle(THREAD, klass->class_loader()), + Handle(THREAD, klass->protection_domain()), true, CHECK_false); + klass->class_loader_data()->record_dependency(comp_this_class); + if (log_is_enabled(Debug, class, resolve)) { + Verifier::trace_class_resolution(comp_this_class, klass); + } + // An array of value types is not assignable to an array of interface types. + if (comp_this_class->is_interface()) { + return false; + } + } + } + if (!comp_this.is_bogus() && !comp_from.is_bogus()) { return comp_this.is_component_assignable_from(comp_from, context, from_field_is_protected, CHECK_false); @@ -118,6 +143,36 @@ return false; } +bool VerificationType::is_valuetype_assignable_from(const VerificationType& from) const { + // Check that 'from' is not null, is a value type, and is the same value type. + assert(is_valuetype(), "called with a non-valuetype type"); + assert(!is_null(), "valuetype is not null"); + assert(name() != vmSymbols::java_lang_Object(), "java.lang.Object is a value type?"); + return (!from.is_null() && from.is_valuetype() && name() == from.name()); +} + +bool VerificationType::is_ref_assignable_from_value_type(const VerificationType& from, ClassVerifier* context, TRAPS) const { + assert(!from.is_null(), "Value type should not be null"); + if (!is_null() && (name()->is_same_fundamental_type(from.name()) || + name() == vmSymbols::java_lang_Object())) { + return true; + } + + // Need to load 'this' to see if it is an interface. + InstanceKlass* klass = context->current_class(); + { + HandleMark hm(THREAD); + Klass* this_class = SystemDictionary::resolve_or_fail( + name(), Handle(THREAD, klass->class_loader()), + Handle(THREAD, klass->protection_domain()), true, CHECK_false); + klass->class_loader_data()->record_dependency(this_class); + if (log_is_enabled(Debug, class, resolve)) { + Verifier::trace_class_resolution(this_class, klass); + } + return (this_class->is_interface()); + } +} + VerificationType VerificationType::get_component(ClassVerifier *context, TRAPS) const { assert(is_array() && name()->utf8_length() >= 2, "Must be a valid array"); Symbol* component; @@ -135,12 +190,16 @@ name(), 1, name()->utf8_length(), CHECK_(VerificationType::bogus_type())); return VerificationType::reference_type(component); - case 'Q': // fall through case 'L': component = context->create_temporary_symbol( name(), 2, name()->utf8_length() - 1, CHECK_(VerificationType::bogus_type())); return VerificationType::reference_type(component); + case 'Q': + component = context->create_temporary_symbol( + name(), 2, name()->utf8_length() - 1, + CHECK_(VerificationType::bogus_type())); + return VerificationType::valuetype_type(component); default: // Met an invalid type signature, e.g. [X return VerificationType::bogus_type(); @@ -165,6 +224,8 @@ case Double_2nd: st->print("double_2nd"); break; case Null: st->print("null"); break; case ReferenceQuery: st->print("reference type"); break; + case ValueTypeQuery: st->print("value type"); break; + case NonScalarQuery: st->print("reference or value type"); break; case Category1Query: st->print("category1 type"); break; case Category2Query: st->print("category2 type"); break; case Category2_2ndQuery: st->print("category2_2nd type"); break; @@ -173,6 +234,8 @@ st->print("uninitializedThis"); } else if (is_uninitialized()) { st->print("uninitialized %d", bci()); + } else if (is_valuetype()) { + name()->print_Qvalue_on(st); } else { name()->print_value_on(st); }
--- a/src/hotspot/share/classfile/verificationType.hpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/classfile/verificationType.hpp Tue Nov 27 09:25:51 2018 -0500 @@ -74,7 +74,7 @@ TypeMask = 0x00000007, // Topmost types encoding - Reference = 0x0, // _sym contains the name of an object + Reference = 0x0, // _sym contains the name of an object Primitive = 0x1, // see below for primitive list Uninitialized = 0x2, // 0x00ffff00 contains bci TypeQuery = 0x3, // Meta-types used for category testing @@ -86,6 +86,7 @@ Category2Flag = 0x02, // First word of a two-word value Category2_2ndFlag = 0x04, // Second word of a two-word value ValueTypeFlag = 0x08, // For value type query types + NonScalarFlag = 0x10, // For either value type or reference queries // special reference values Null = 0x00000000, // A reference with a 0 sym is null @@ -118,7 +119,8 @@ Category1Query = (Category1Flag << 1 * BitsPerByte) | TypeQuery, Category2Query = (Category2Flag << 1 * BitsPerByte) | TypeQuery, Category2_2ndQuery = (Category2_2ndFlag << 1 * BitsPerByte) | TypeQuery, - ValueTypeQuery = (ValueTypeFlag << 1 * BitsPerByte) | TypeQuery + ValueTypeQuery = (ValueTypeFlag << 1 * BitsPerByte) | TypeQuery, + NonScalarQuery = (NonScalarFlag << 1 * BitsPerByte) | TypeQuery }; VerificationType(uintptr_t raw_data) { @@ -159,6 +161,8 @@ { return VerificationType(Category2Query); } static VerificationType category2_2nd_check() { return VerificationType(Category2_2ndQuery); } + static VerificationType nonscalar_check() + { return VerificationType(NonScalarQuery); } // For reference types, store the actual Symbol static VerificationType reference_type(Symbol* sh) { @@ -167,7 +171,7 @@ // then this type encoding system will have to change to have a tag value // to descriminate between oops and primitives. return VerificationType((uintptr_t)sh); - } + } static VerificationType uninitialized_type(u2 bci) { return VerificationType(bci << 1 * BitsPerByte | Uninitialized); } static VerificationType uninitialized_this_type() @@ -219,6 +223,7 @@ } bool is_reference_check() const { return _u._data == ReferenceQuery; } bool is_valuetype_check() const { return _u._data == ValueTypeQuery; } + bool is_nonscalar_check() const { return _u._data == NonScalarQuery; } bool is_category1_check() const { return _u._data == Category1Query; } bool is_category2_check() const { return _u._data == Category2Query; } bool is_category2_2nd_check() const { return _u._data == Category2_2ndQuery; } @@ -240,6 +245,8 @@ bool is_array_array() const { return is_x_array('['); } bool is_reference_array() const { return is_object_array() || is_array_array(); } + bool is_nonscalar_array() const + { return is_object_array() || is_array_array() || is_value_array(); } bool is_object() const { return (is_reference() && !is_null() && name()->utf8_length() >= 1 && name()->byte_at(0) != '['); } @@ -256,6 +263,12 @@ return VerificationType(is_long() ? Long_2nd : Double_2nd); } + static VerificationType change_ref_to_valuetype(VerificationType ref) { + assert(ref.is_reference(), "Bad arg"); + assert(!ref.is_null(), "Unexpected NULL"); + return valuetype_type(ref.name()); + } + u2 bci() const { assert(is_uninitialized(), "Must be uninitialized type"); return ((_u._data & BciMask) >> 1 * BitsPerByte); @@ -268,8 +281,10 @@ bool equals(const VerificationType& t) const { return (_u._data == t._u._data || - (((is_reference() && t.is_reference()) || (is_valuetype() && t.is_valuetype())) && - !is_null() && !t.is_null() && name() == t.name())); + (((is_reference() && t.is_reference()) || + (is_valuetype() && t.is_valuetype())) && + !is_null() && !t.is_null() && name() == t.name())); + } bool operator ==(const VerificationType& t) const { @@ -298,6 +313,9 @@ return from.is_category2_2nd(); case ReferenceQuery: return from.is_reference() || from.is_uninitialized(); + case NonScalarQuery: + return from.is_reference() || from.is_uninitialized() || + from.is_valuetype(); case ValueTypeQuery: return from.is_valuetype(); case Boolean: @@ -307,12 +325,14 @@ // An int can be assigned to boolean, byte, char or short values. return from.is_integer(); default: - if (is_reference() && from.is_reference()) { + if (is_valuetype()) { + return is_valuetype_assignable_from(from); + } else if (is_reference() && from.is_valuetype()) { + return is_ref_assignable_from_value_type(from, context, THREAD); + } else if (is_reference() && from.is_reference()) { return is_reference_assignable_from(from, context, from_field_is_protected, THREAD); - } else if (is_valuetype() && from.is_valuetype()) { - return is_valuetype_assignable_from(from, context, THREAD); } else { return false; } @@ -357,13 +377,10 @@ const VerificationType&, ClassVerifier*, bool from_field_is_protected, TRAPS) const; - bool is_valuetype_assignable_from(const VerificationType& from, ClassVerifier* context, TRAPS) const { - // 1. Check names - two value types are assignable if they have the same name - // 2. Check java/lang/__Value - from may be trying to be assigned to a __Value parameter - assert(is_valuetype() && from.is_valuetype(), "Is value type assignable called with a non-value type"); - return (name() == from.name() || - name() == vmSymbols::java_lang_Object()); - } + bool is_valuetype_assignable_from(const VerificationType& from) const; + + bool is_ref_assignable_from_value_type(const VerificationType& from, ClassVerifier* context, TRAPS) const; + public: static bool resolve_and_check_assignability(InstanceKlass* klass, Symbol* name,
--- a/src/hotspot/share/classfile/verifier.cpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/classfile/verifier.cpp Tue Nov 27 09:25:51 2018 -0500 @@ -58,7 +58,7 @@ #define NOFAILOVER_MAJOR_VERSION 51 #define NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION 51 #define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52 -#define VALUETYPE_MAJOR_VERSION 55 +#define VALUETYPE_MAJOR_VERSION 56 #define MAX_ARRAY_DIMENSIONS 255 // Access to external entry for VerifyClassCodes - old byte code verifier @@ -575,10 +575,18 @@ // Methods in ClassVerifier +VerificationType reference_or_valuetype(InstanceKlass* klass) { + if (klass->is_value()) { + return VerificationType::valuetype_type(klass->name()); + } else { + return VerificationType::reference_type(klass->name()); + } +} + ClassVerifier::ClassVerifier( InstanceKlass* klass, TRAPS) : _thread(THREAD), _exception_type(NULL), _message(NULL), _klass(klass) { - _this_type = VerificationType::reference_type(klass->name()); + _this_type = reference_or_valuetype(klass); // Create list to hold symbols in reference area. _symbols = new GrowableArray<Symbol*>(100, 0, NULL); } @@ -968,7 +976,7 @@ VerificationType::integer_type(), CHECK_VERIFY(this)); atype = current_frame.pop_stack( VerificationType::reference_check(), CHECK_VERIFY(this)); - if (!atype.is_reference_array()) { + if (!atype.is_nonscalar_array()) { verify_error(ErrorContext::bad_type(bci, current_frame.stack_top_ctx(), TypeOrigin::implicit(VerificationType::reference_check())), @@ -1142,7 +1150,7 @@ atype = current_frame.pop_stack( VerificationType::reference_check(), CHECK_VERIFY(this)); // more type-checking is done at runtime - if (!atype.is_reference_array()) { + if (!atype.is_nonscalar_array()) { verify_error(ErrorContext::bad_type(bci, current_frame.stack_top_ctx(), TypeOrigin::implicit(VerificationType::reference_check())), @@ -1542,12 +1550,12 @@ case Bytecodes::_if_acmpeq : case Bytecodes::_if_acmpne : current_frame.pop_stack( - VerificationType::reference_check(), CHECK_VERIFY(this)); + VerificationType::nonscalar_check(), CHECK_VERIFY(this)); // fall through case Bytecodes::_ifnull : case Bytecodes::_ifnonnull : current_frame.pop_stack( - VerificationType::reference_check(), CHECK_VERIFY(this)); + VerificationType::nonscalar_check(), CHECK_VERIFY(this)); target = bcs.dest(); stackmap_table.check_jump_target (¤t_frame, target, CHECK_VERIFY(this)); @@ -1598,7 +1606,7 @@ no_control_flow = true; break; case Bytecodes::_areturn : type = current_frame.pop_stack( - VerificationType::reference_check(), CHECK_VERIFY(this)); + VerificationType::nonscalar_check(), CHECK_VERIFY(this)); verify_return_value(return_type, type, bci, ¤t_frame, CHECK_VERIFY(this)); no_control_flow = true; break; @@ -1680,14 +1688,16 @@ } index = bcs.get_index_u2(); verify_cp_class_type(bci, index, cp, CHECK_VERIFY(this)); - VerificationType vtype = cp_index_to_type(index, cp, CHECK_VERIFY(this)); - if (!vtype.is_object()) { + VerificationType ref_type = cp_index_to_type(index, cp, CHECK_VERIFY(this)); + if (!ref_type.is_object()) { verify_error(ErrorContext::bad_type(bci, - TypeOrigin::cp(index, vtype)), + TypeOrigin::cp(index, ref_type)), "Illegal defaultvalue instruction"); return; } - current_frame.push_stack(vtype, CHECK_VERIFY(this)); + VerificationType value_type = + VerificationType::change_ref_to_valuetype(ref_type); + current_frame.push_stack(value_type, CHECK_VERIFY(this)); no_control_flow = false; break; } case Bytecodes::_newarray : @@ -1733,12 +1743,6 @@ case Bytecodes::_monitorexit : { VerificationType ref = current_frame.pop_stack( VerificationType::reference_check(), CHECK_VERIFY(this)); - if (!ref.is_null() && !ref.is_uninitialized() && - ref.name()->is_Q_signature()) { - verify_error(ErrorContext::bad_code(bci), - "Illegal use of value type as operand for monitorenter or monitorexit instruction"); - return; - } no_control_flow = false; break; } case Bytecodes::_multianewarray : @@ -2337,17 +2341,19 @@ for (int i = n - 1; i >= 0; i--) { current_frame->pop_stack(field_type[i], CHECK_VERIFY(this)); } - stack_object_type = current_frame->pop_stack(CHECK_VERIFY(this)); - // stack_object_type and target_class_type must be identical references. - if (!stack_object_type.is_reference() || - !stack_object_type.equals(target_class_type)) { + // stack_object_type and target_class_type must be the same value type. + stack_object_type = + current_frame->pop_stack(VerificationType::valuetype_check(), CHECK_VERIFY(this)); + VerificationType target_value_type = + VerificationType::change_ref_to_valuetype(target_class_type); + if (!stack_object_type.equals(target_value_type)) { verify_error(ErrorContext::bad_value_type(bci, current_frame->stack_top_ctx(), TypeOrigin::cp(index, target_class_type)), - "Bad value type on operand stack in withfield instruction"); + "Invalid type on operand stack in withfield instruction"); return; } - current_frame->push_stack(target_class_type, CHECK_VERIFY(this)); + current_frame->push_stack(target_value_type, CHECK_VERIFY(this)); break; } case Bytecodes::_getfield: { @@ -2885,22 +2891,22 @@ } else if (opcode == Bytecodes::_invokespecial && !is_same_or_direct_interface(current_class(), current_type(), ref_class_type) && !ref_class_type.equals(VerificationType::reference_type( - current_class()->super()->name()))) { + current_class()->super()->name()))) { // super() can never be a value_type. bool subtype = false; bool have_imr_indirect = cp->tag_at(index).value() == JVM_CONSTANT_InterfaceMethodref; if (!current_class()->is_unsafe_anonymous()) { subtype = ref_class_type.is_assignable_from( current_type(), this, false, CHECK_VERIFY(this)); } else { - VerificationType unsafe_anonymous_host_type = - VerificationType::reference_type(current_class()->unsafe_anonymous_host()->name()); + InstanceKlass* unsafe_host = current_class()->unsafe_anonymous_host(); + VerificationType unsafe_anonymous_host_type = reference_or_valuetype(unsafe_host); subtype = ref_class_type.is_assignable_from(unsafe_anonymous_host_type, this, false, CHECK_VERIFY(this)); // If invokespecial of IMR, need to recheck for same or // direct interface relative to the host class have_imr_indirect = (have_imr_indirect && !is_same_or_direct_interface( - current_class()->unsafe_anonymous_host(), + unsafe_host, unsafe_anonymous_host_type, ref_class_type)); } if (!subtype) { @@ -2938,9 +2944,10 @@ // objectref is a subtype of the unsafe_anonymous_host of the current class // to allow an anonymous class to reference methods in the unsafe_anonymous_host VerificationType top = current_frame->pop_stack(CHECK_VERIFY(this)); - VerificationType hosttype = - VerificationType::reference_type(current_class()->unsafe_anonymous_host()->name()); - bool subtype = hosttype.is_assignable_from(top, this, false, CHECK_VERIFY(this)); + + InstanceKlass* unsafe_host = current_class()->unsafe_anonymous_host(); + VerificationType host_type = reference_or_valuetype(unsafe_host); + bool subtype = host_type.is_assignable_from(top, this, false, CHECK_VERIFY(this)); if (!subtype) { verify_error( ErrorContext::bad_type(current_frame->offset(), current_frame->stack_top_ctx(), @@ -3053,11 +3060,12 @@ strncpy(&arr_sig_str[1], component_name, length - 1); } else { // it's an object or interface const char* component_name = component_type.name()->as_utf8(); - // add one dimension to component with 'L' prepended and ';' appended. + char Q_or_L = component_type.is_valuetype() ? 'Q' : 'L'; + // add one dimension to component with 'L' or 'Q' prepended and ';' appended. length = (int)strlen(component_name) + 3; arr_sig_str = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, length); arr_sig_str[0] = '['; - arr_sig_str[1] = 'L'; + arr_sig_str[1] = Q_or_L; strncpy(&arr_sig_str[2], component_name, length - 2); arr_sig_str[length - 1] = ';'; } @@ -3101,7 +3109,7 @@ void ClassVerifier::verify_aload(u2 index, StackMapFrame* current_frame, TRAPS) { VerificationType type = current_frame->get_local( - index, VerificationType::reference_check(), CHECK_VERIFY(this)); + index, VerificationType::nonscalar_check(), CHECK_VERIFY(this)); current_frame->push_stack(type, CHECK_VERIFY(this)); } @@ -3138,7 +3146,7 @@ void ClassVerifier::verify_astore(u2 index, StackMapFrame* current_frame, TRAPS) { VerificationType type = current_frame->pop_stack( - VerificationType::reference_check(), CHECK_VERIFY(this)); + VerificationType::nonscalar_check(), CHECK_VERIFY(this)); current_frame->set_local(index, type, CHECK_VERIFY(this)); }
--- a/src/hotspot/share/classfile/verifier.hpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/classfile/verifier.hpp Tue Nov 27 09:25:51 2018 -0500 @@ -412,7 +412,14 @@ SignatureStream* sig_type, VerificationType* inference_type, TRAPS); VerificationType cp_index_to_type(int index, const constantPoolHandle& cp, TRAPS) { - return VerificationType::reference_type(cp->klass_name_at(index)); + Symbol* name = cp->klass_name_at(index); + if (name->is_Q_signature()) { + // Remove the Q and ; + // TBD need error msg if fundamental_name() returns NULL? + Symbol* fund_name = name->fundamental_name(CHECK_(VerificationType::bogus_type())); + return VerificationType::valuetype_type(fund_name); + } + return VerificationType::reference_type(name); } // Keep a list of temporary symbols created during verification because @@ -448,6 +455,15 @@ *inference_type = VerificationType::reference_type(name_copy); return 1; } + case T_VALUETYPE: + { + Symbol* vname = sig_type->as_symbol(CHECK_0); + // Create another symbol to save as signature stream unreferences this symbol. + Symbol* vname_copy = create_temporary_symbol(vname); + assert(vname_copy == vname, "symbols don't match"); + *inference_type = VerificationType::valuetype_type(vname_copy); + return 1; + } case T_LONG: *inference_type = VerificationType::long_type(); *++inference_type = VerificationType::long2_type();
--- a/src/hotspot/share/oops/symbol.cpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/oops/symbol.cpp Tue Nov 27 09:25:51 2018 -0500 @@ -101,6 +101,35 @@ } } +bool Symbol::is_same_fundamental_type(Symbol* s) const { + if (this == s) return true; + if (utf8_length() < 3) return false; + int offset1, offset2, len; + if (byte_at(utf8_length() - 1) == ';') { + if (byte_at(0) != 'Q' && byte_at(0) != 'L') return false; + offset1 = 1; + len = utf8_length() - 2; + } else { + offset1 = 0; + len = utf8_length(); + } + if (s->byte_at(s->utf8_length() - 1) == ';') { + if (s->byte_at(0) != 'Q' && s->byte_at(0) != 'L') return false; + offset2 = 1; + } else { + offset2 = 0; + } + if ((offset2 + len) > s->utf8_length()) return false; + if ((utf8_length() - offset1 * 2) != (s->utf8_length() - offset2 * 2)) + return false; + int l = len; + while (l-- > 0) { + if (byte_at(offset1 + l) != s->byte_at(offset2 + l)) + return false; + } + return true; +} + // ------------------------------------------------------------------ // Symbol::index_of // @@ -331,5 +360,17 @@ } } +void Symbol::print_Qvalue_on(outputStream* st) const { + if (this == NULL) { + st->print("NULL"); + } else { + st->print("'Q"); + for (int i = 0; i < utf8_length(); i++) { + st->print("%c", byte_at(i)); + } + st->print(";'"); + } +} + // SymbolTable prints this in its statistics NOT_PRODUCT(size_t Symbol::_total_count = 0;)
--- a/src/hotspot/share/oops/symbol.hpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/oops/symbol.hpp Tue Nov 27 09:25:51 2018 -0500 @@ -205,6 +205,7 @@ } bool is_Q_signature() const; Symbol* fundamental_name(TRAPS); + bool is_same_fundamental_type(Symbol*) const; // Tests if the symbol starts with the given prefix. int index_of_at(int i, const char* str, int len) const; @@ -248,6 +249,7 @@ void print_utf8_on(outputStream* st) const; void print_on(outputStream* st) const; // First level print void print_value_on(outputStream* st) const; // Second level print. + void print_Qvalue_on(outputStream* st) const; // Second level print for Q-types. // printing on default output stream void print() { print_on(tty); }
--- a/src/hotspot/share/runtime/globals.hpp Tue Nov 27 17:47:06 2018 +0530 +++ b/src/hotspot/share/runtime/globals.hpp Tue Nov 27 09:25:51 2018 -0500 @@ -536,7 +536,7 @@ "Number of ring buffer event logs") \ range(1, NOT_LP64(1*K) LP64_ONLY(1*M)) \ \ - product(bool, BytecodeVerificationRemote, false, \ + product(bool, BytecodeVerificationRemote, true, \ "Enable the Java bytecode verifier for remote classes") \ \ product(bool, BytecodeVerificationLocal, false, \
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/WithFieldNoAccessTest.jcod Tue Nov 27 17:47:06 2018 +0530 +++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/WithFieldNoAccessTest.jcod Tue Nov 27 09:25:51 2018 -0500 @@ -90,7 +90,6 @@ // } // - class WithFieldNoAccessTest$V { 0xCAFEBABE; 0; // minor version @@ -121,7 +120,7 @@ Utf8 "V"; // #22 at 0x7F Utf8 "InnerClasses"; // #23 at 0x83 Utf8 "ValueTypes"; // #24 at 0x92 - Utf8 "(CJI)LWithFieldNoAccessTest$V;"; // #25 at 0x9F + Utf8 "(CJI)QWithFieldNoAccessTest$V;"; // #25 at 0x9F Utf8 "hashCode"; // #26 at 0xC0 Utf8 "()I"; // #27 at 0xCB Utf8 "equals"; // #28 at 0xD1 @@ -131,7 +130,7 @@ Utf8 "longHashCode"; // #32 at 0x0114 Utf8 "()J"; // #33 at 0x0123 Utf8 "$makeValue$"; // #34 at 0x0129 - Utf8 "()LWithFieldNoAccessTest$V;"; // #35 at 0x0137 + Utf8 "()QWithFieldNoAccessTest$V;"; // #35 at 0x0137 Utf8 "SourceFile"; // #36 at 0x0155 Utf8 "WithFieldNoAccessTest.java"; // #37 at 0x0162 Utf8 "NestHost"; // #38 at 0x017F @@ -216,7 +215,7 @@ [1] { // Attributes Attr(#20, 6) { // LineNumberTable at 0x03F1 [1] { // LineNumberTable - 0 7; // at 0x03FD + 0 15; // at 0x03FD } } // end LineNumberTable } // Attributes @@ -244,11 +243,11 @@ [1] { // Attributes Attr(#20, 22) { // LineNumberTable at 0x043B [5] { // LineNumberTable - 0 14; // at 0x0447 - 5 15; // at 0x044B - 14 16; // at 0x044F - 24 17; // at 0x0453 - 33 18; // at 0x0457 + 0 22; // at 0x0447 + 5 23; // at 0x044B + 14 24; // at 0x044F + 24 25; // at 0x0453 + 33 26; // at 0x0457 } } // end LineNumberTable } // Attributes @@ -272,7 +271,7 @@ [1] { // Attributes Attr(#20, 6) { // LineNumberTable at 0x0478 [1] { // LineNumberTable - 0 3; // at 0x0484 + 0 11; // at 0x0484 } } // end LineNumberTable } // Attributes @@ -296,7 +295,7 @@ [1] { // Attributes Attr(#20, 6) { // LineNumberTable at 0x04A6 [1] { // LineNumberTable - 0 3; // at 0x04B2 + 0 11; // at 0x04B2 } } // end LineNumberTable } // Attributes @@ -320,7 +319,7 @@ [1] { // Attributes Attr(#20, 6) { // LineNumberTable at 0x04D3 [1] { // LineNumberTable - 0 3; // at 0x04DF + 0 11; // at 0x04DF } } // end LineNumberTable } // Attributes @@ -344,7 +343,7 @@ [1] { // Attributes Attr(#20, 6) { // LineNumberTable at 0x0500 [1] { // LineNumberTable - 0 3; // at 0x050C + 0 11; // at 0x050C } } // end LineNumberTable } // Attributes @@ -371,11 +370,11 @@ [1] { // Attributes Attr(#20, 22) { // LineNumberTable at 0x0543 [5] { // LineNumberTable - 0 7; // at 0x054F - 4 8; // at 0x0553 - 12 9; // at 0x0557 - 20 10; // at 0x055B - 27 11; // at 0x055F + 0 15; // at 0x054F + 4 16; // at 0x0553 + 12 17; // at 0x0557 + 20 18; // at 0x055B + 27 19; // at 0x055F } } // end LineNumberTable } // Attributes @@ -384,7 +383,7 @@ } // Member } // methods - [4] { // Attributes + [3] { // Attributes Attr(#36, 2) { // SourceFile at 0x0561 #37; } // end SourceFile @@ -405,10 +404,6 @@ } // bootstrap_method } } // end BootstrapMethods - ; - Attr(#24, 4) { // ValueTypes at 0x0595 - 0x00010002; - } // end ValueTypes } // Attributes } // end class WithFieldNoAccessTest$V @@ -482,7 +477,7 @@ Utf8 "WithFieldNoAccessTest$V"; // #63 at 0x038F Utf8 "java/lang/Throwable"; // #64 at 0x03A9 Utf8 "make"; // #65 at 0x03BF - Utf8 "(CJI)LWithFieldNoAccessTest$V;"; // #66 at 0x03C6 + Utf8 "(CJI)QWithFieldNoAccessTest$V;"; // #66 at 0x03C6 Utf8 "c"; // #67 at 0x03E7 Utf8 "C"; // #68 at 0x03EB Utf8 "(Ljava/lang/String;)V"; // #69 at 0x03EF @@ -537,7 +532,7 @@ [1] { // Attributes Attr(#31, 6) { // LineNumberTable at 0x062D [1] { // LineNumberTable - 0 1; // at 0x0639 + 0 9; // at 0x0639 } } // end LineNumberTable } // Attributes @@ -585,22 +580,22 @@ [2] { // Attributes Attr(#31, 66) { // LineNumberTable at 0x0719 [16] { // LineNumberTable - 0 24; // at 0x0725 - 17 25; // at 0x0729 - 27 26; // at 0x072D - 28 27; // at 0x0731 - 40 28; // at 0x0735 - 57 33; // at 0x0739 - 76 34; // at 0x073D - 86 35; // at 0x0741 - 87 36; // at 0x0745 - 99 37; // at 0x0749 - 116 42; // at 0x074D - 133 43; // at 0x0751 - 143 44; // at 0x0755 - 144 45; // at 0x0759 - 156 46; // at 0x075D - 173 49; // at 0x0761 + 0 32; // at 0x0725 + 17 33; // at 0x0729 + 27 34; // at 0x072D + 28 35; // at 0x0731 + 40 36; // at 0x0735 + 57 41; // at 0x0739 + 76 42; // at 0x073D + 86 43; // at 0x0741 + 87 44; // at 0x0745 + 99 45; // at 0x0749 + 116 50; // at 0x074D + 133 51; // at 0x0751 + 143 52; // at 0x0755 + 144 53; // at 0x0759 + 156 54; // at 0x075D + 173 57; // at 0x0761 } } // end LineNumberTable ; @@ -626,7 +621,7 @@ } // Member } // methods - [4] { // Attributes + [3] { // Attributes Attr(#37, 2) { // SourceFile at 0x0784 #38; } // end SourceFile @@ -648,9 +643,5 @@ } // bootstrap_method } } // end BootstrapMethods - ; - Attr(#27, 4) { // ValueTypes at 0x07BC - 0x00010018; - } // end ValueTypes } // Attributes } // end class WithFieldNoAccessTest
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/cfpTests.jcod Tue Nov 27 17:47:06 2018 +0530 +++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/cfpTests.jcod Tue Nov 27 09:25:51 2018 -0500 @@ -48,7 +48,7 @@ class ValueAbstract { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A @@ -204,7 +204,7 @@ class ValueEnum { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A @@ -360,7 +360,7 @@ class ValueFieldNotFinal { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A @@ -516,7 +516,7 @@ class ValueFlatArray { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [32] { // Constant Pool ; // first element is empty Method #8 #26; // #1 at 0x0A @@ -685,7 +685,7 @@ class ValueInitMethod { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A @@ -841,7 +841,7 @@ class ValueInterface { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [27] { // Constant Pool ; // first element is empty Method #7 #21; // #1 at 0x0A @@ -940,7 +940,7 @@ class ValueMethodSynch { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [29] { // Constant Pool ; // first element is empty Method #7 #24; // #1 at 0x0A @@ -1121,7 +1121,7 @@ class ValueSuperClass { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [30] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A @@ -1282,7 +1282,7 @@ // final value class Circ { // static final Circ VT = makeCirc(0x01234567); // final int int_v; -// __Flattenable final Circ2 v2; +// final Circ2 v2; // Circ() { // int_v = 1; // v2 = Circ2.default; @@ -1297,7 +1297,7 @@ // final value class Circ2 { // static final Circ2 VT = makeCirc2('\u0123'); // final char char_v; -// __Flattenable final Circ vv; +// final Circ vv; // Circ2() { // char_v = 'z'; // vv = Circ.default; @@ -1312,100 +1312,130 @@ class Circ { 0xCAFEBABE; 0; // minor version - 55; // version - [34] { // Constant Pool + 56; // version + [69] { // Constant Pool ; // first element is empty - Method #9 #28; // #1 at 0x0A - Field #5 #29; // #2 at 0x0F - class #17; // #3 at 0x14 - Field #5 #30; // #4 at 0x17 - class #11; // #5 at 0x1C - int 0x01234567; // #6 at 0x1F - Method #5 #31; // #7 at 0x24 - Field #5 #32; // #8 at 0x29 - class #33; // #9 at 0x2E - Utf8 "VT"; // #10 at 0x31 - Utf8 "Circ"; // #11 at 0x36 - Utf8 "ValueTypes"; // #12 at 0x3D - Utf8 "LCirc;"; // #13 at 0x4A - Utf8 "int_v"; // #14 at 0x53 - Utf8 "I"; // #15 at 0x5B - Utf8 "v2"; // #16 at 0x5F - Utf8 "Circ2"; // #17 at 0x64 - Utf8 "LCirc2;"; // #18 at 0x6C - Utf8 "<init>"; // #19 at 0x76 - Utf8 "()V"; // #20 at 0x7F - Utf8 "Code"; // #21 at 0x85 - Utf8 "LineNumberTable"; // #22 at 0x8C - Utf8 "makeCirc"; // #23 at 0x9E - Utf8 "(I)LCirc;"; // #24 at 0xA9 - Utf8 "<clinit>"; // #25 at 0xB5 - Utf8 "SourceFile"; // #26 at 0xC0 - Utf8 "Circ.java"; // #27 at 0xCD - NameAndType #19 #20; // #28 at 0xD9 - NameAndType #14 #15; // #29 at 0xDE - NameAndType #16 #18; // #30 at 0xE3 - NameAndType #23 #24; // #31 at 0xE8 - NameAndType #10 #13; // #32 at 0xED - Utf8 "java/lang/Object"; // #33 at 0xF2 + Method #13 #39; // #1 at 0x0A + class #40; // #2 at 0x0F + Field #2 #41; // #3 at 0x12 + InvokeDynamic 0s #44; // #4 at 0x17 + InvokeDynamic 0s #45; // #5 at 0x1C + InvokeDynamic 0s #46; // #6 at 0x21 + InvokeDynamic 0s #47; // #7 at 0x26 + int 0x01234567; // #8 at 0x2B + Method #2 #48; // #9 at 0x30 + Field #2 #49; // #10 at 0x35 + class #50; // #11 at 0x3A + Field #2 #51; // #12 at 0x3D + class #52; // #13 at 0x42 + Utf8 "VT"; // #14 at 0x45 + Utf8 "QCirc;"; // #15 at 0x4A + Utf8 "int_v"; // #16 at 0x53 + Utf8 "I"; // #17 at 0x5B + Utf8 "v2"; // #18 at 0x5F + Utf8 "QCirc2;"; // #19 at 0x64 + Utf8 "<init>"; // #20 at 0x6E + Utf8 "()V"; // #21 at 0x77 + Utf8 "Code"; // #22 at 0x7D + Utf8 "LineNumberTable"; // #23 at 0x84 + Utf8 "makeCirc"; // #24 at 0x96 + Utf8 "(I)QCirc;"; // #25 at 0xA1 + Utf8 "hashCode"; // #26 at 0xAD + Utf8 "()I"; // #27 at 0xB8 + Utf8 "equals"; // #28 at 0xBE + Utf8 "(Ljava/lang/Object;)Z"; // #29 at 0xC7 + Utf8 "toString"; // #30 at 0xDF + Utf8 "()Ljava/lang/String;"; // #31 at 0xEA + Utf8 "longHashCode"; // #32 at 0x0101 + Utf8 "()J"; // #33 at 0x0110 + Utf8 "<clinit>"; // #34 at 0x0116 + Utf8 "$makeValue$"; // #35 at 0x0121 + Utf8 "()QCirc;"; // #36 at 0x012F + Utf8 "SourceFile"; // #37 at 0x013A + Utf8 "Circ.java"; // #38 at 0x0147 + NameAndType #20 #21; // #39 at 0x0153 + Utf8 "Circ"; // #40 at 0x0158 + NameAndType #16 #17; // #41 at 0x015F + Utf8 "BootstrapMethods"; // #42 at 0x0164 + MethodHandle 6b #53; // #43 at 0x0177 + NameAndType #26 #54; // #44 at 0x017B + NameAndType #28 #55; // #45 at 0x0180 + NameAndType #30 #56; // #46 at 0x0185 + NameAndType #32 #57; // #47 at 0x018A + NameAndType #24 #25; // #48 at 0x018F + NameAndType #14 #15; // #49 at 0x0194 + Utf8 "Circ2"; // #50 at 0x0199 + NameAndType #18 #19; // #51 at 0x01A1 + Utf8 "java/lang/Object"; // #52 at 0x01A6 + Method #58 #59; // #53 at 0x01B9 + Utf8 "(Ljava/lang/Object;)I"; // #54 at 0x01BE + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #55 at 0x01D6 + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #56 at 0x0200 + Utf8 "(Ljava/lang/Object;)J"; // #57 at 0x0229 + class #60; // #58 at 0x0241 + NameAndType #61 #65; // #59 at 0x0244 + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #60 at 0x0249 + Utf8 "makeBootstrapMethod"; // #61 at 0x0272 + class #67; // #62 at 0x0288 + Utf8 "Lookup"; // #63 at 0x028B + Utf8 "InnerClasses"; // #64 at 0x0294 + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #65 at 0x02A3 + class #68; // #66 at 0x0319 + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #67 at 0x031C + Utf8 "java/lang/invoke/MethodHandles"; // #68 at 0x0344 } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] - #5;// this_cpx - #9;// super_cpx + #2;// this_cpx + #13;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields - { // Member at 0x010F - 0x0118; // access - #10; // name_cpx - #13; // sig_cpx - [0] { // Attributes - } // Attributes - } // Member - ; - { // Member at 0x0117 - 0x0010; // access + { // Member at 0x036F + 0x0018; // access #14; // name_cpx #15; // sig_cpx [0] { // Attributes } // Attributes } // Member ; - { // Member at 0x011F - 0x0110; // access + { // Member at 0x0377 + 0x0010; // access #16; // name_cpx - #18; // sig_cpx + #17; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x037F + 0x0010; // access + #18; // name_cpx + #19; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields - [3] { // methods - { // Member at 0x0129 + [8] { // methods + { // Member at 0x0389 0x0000; // access - #19; // name_cpx - #20; // sig_cpx + #20; // name_cpx + #21; // sig_cpx [1] { // Attributes - Attr(#21, 53) { // Code at 0x0131 - 2; // max_stack + Attr(#22, 29) { // Code at 0x0391 + 1; // max_stack 1; // max_locals - Bytes[17]{ - 0x2AB700012A04B500; - 0x022ACB0003B50004; - 0xB1; + Bytes[5]{ + 0x2AB70001B1; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 18) { // LineNumberTable at 0x0154 - [4] { // LineNumberTable - 0 5; // at 0x0160 - 4 6; // at 0x0164 - 9 7; // at 0x0168 - 16 8; // at 0x016C + Attr(#23, 6) { // LineNumberTable at 0x03A8 + [1] { // LineNumberTable + 0 6; // at 0x03B4 } } // end LineNumberTable } // Attributes @@ -1413,26 +1443,26 @@ } // Attributes } // Member ; - { // Member at 0x016C + { // Member at 0x03B4 0x0008; // access - #23; // name_cpx - #24; // sig_cpx + #24; // name_cpx + #25; // sig_cpx [1] { // Attributes - Attr(#21, 44) { // Code at 0x0174 + Attr(#22, 45) { // Code at 0x03BC 2; // max_stack 2; // max_locals - Bytes[12]{ - 0xCB00054C2B1ACC00; - 0x024C2BB0; + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 14) { // LineNumberTable at 0x0192 + Attr(#23, 14) { // LineNumberTable at 0x03DB [3] { // LineNumberTable - 0 10; // at 0x019E - 4 11; // at 0x01A2 - 10 12; // at 0x01A6 + 0 12; // at 0x03E7 + 4 13; // at 0x03EB + 11 14; // at 0x03EF } } // end LineNumberTable } // Attributes @@ -1440,24 +1470,149 @@ } // Attributes } // Member ; - { // Member at 0x01A6 + { // Member at 0x03EF + 0x0011; // access + #26; // name_cpx + #27; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x03F7 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0410 + [1] { // LineNumberTable + 0 1; // at 0x041C + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x041C + 0x0011; // access + #28; // name_cpx + #29; // sig_cpx + [1] { // Attributes + Attr(#22, 32) { // Code at 0x0424 + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x043E + [1] { // LineNumberTable + 0 1; // at 0x044A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x044A + 0x0011; // access + #30; // name_cpx + #31; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x0452 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x046B + [1] { // LineNumberTable + 0 1; // at 0x0477 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0477 + 0x0011; // access + #32; // name_cpx + #33; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x047F + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0498 + [1] { // LineNumberTable + 0 1; // at 0x04A4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04A4 0x0008; // access - #25; // name_cpx - #20; // sig_cpx + #34; // name_cpx + #21; // sig_cpx [1] { // Attributes - Attr(#21, 33) { // Code at 0x01AE + Attr(#22, 33) { // Code at 0x04AC 1; // max_stack 0; // max_locals Bytes[9]{ - 0x1206B80007B30008; + 0x1208B80009B3000A; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 6) { // LineNumberTable at 0x01C9 + Attr(#23, 6) { // LineNumberTable at 0x04C7 [1] { // LineNumberTable - 0 2; // at 0x01D5 + 0 2; // at 0x04D3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04D3 + 0x1008; // access + #35; // name_cpx + #36; // sig_cpx + [1] { // Attributes + Attr(#22, 58) { // Code at 0x04DB + 2; // max_stack + 1; // max_locals + Bytes[22]{ + 0xCB00024B042A5FCC; + 0x00034BCB000B2A5F; + 0xCC000C4B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 18) { // LineNumberTable at 0x0503 + [4] { // LineNumberTable + 0 6; // at 0x050F + 4 7; // at 0x0513 + 11 8; // at 0x0517 + 20 9; // at 0x051B } } // end LineNumberTable } // Attributes @@ -1466,113 +1621,155 @@ } // Member } // methods - [2] { // Attributes - Attr(#26, 2) { // SourceFile at 0x01D7 - #27; + [3] { // Attributes + Attr(#37, 2) { // SourceFile at 0x051D + #38; } // end SourceFile ; - Attr(#12, 6) { // ValueTypes at 0x01DF - 0x000200050003; - } // end ValueTypes + Attr(#64, 10) { // InnerClasses at 0x0525 + [1] { // InnerClasses + #62 #66 #63 25; // at 0x0535 + } + } // end InnerClasses + ; + Attr(#42, 6) { // BootstrapMethods at 0x0535 + [1] { // bootstrap_methods + { // bootstrap_method + #43; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods } // Attributes } // end class Circ class Circ2 { 0xCAFEBABE; 0; // minor version - 55; // version - [33] { // Constant Pool + 56; // version + [68] { // Constant Pool ; // first element is empty - Method #8 #27; // #1 at 0x0A - Field #5 #28; // #2 at 0x0F - class #16; // #3 at 0x14 - Field #5 #29; // #4 at 0x17 - class #10; // #5 at 0x1C - Method #5 #30; // #6 at 0x1F - Field #5 #31; // #7 at 0x24 - class #32; // #8 at 0x29 - Utf8 "VT"; // #9 at 0x2C - Utf8 "Circ2"; // #10 at 0x31 - Utf8 "ValueTypes"; // #11 at 0x39 - Utf8 "LCirc2;"; // #12 at 0x46 - Utf8 "char_v"; // #13 at 0x50 - Utf8 "C"; // #14 at 0x59 - Utf8 "vv"; // #15 at 0x5D - Utf8 "Circ"; // #16 at 0x62 - Utf8 "LCirc;"; // #17 at 0x69 - Utf8 "<init>"; // #18 at 0x72 - Utf8 "()V"; // #19 at 0x7B - Utf8 "Code"; // #20 at 0x81 - Utf8 "LineNumberTable"; // #21 at 0x88 - Utf8 "makeCirc2"; // #22 at 0x9A - Utf8 "(C)LCirc2;"; // #23 at 0xA6 - Utf8 "<clinit>"; // #24 at 0xB3 - Utf8 "SourceFile"; // #25 at 0xBE - Utf8 "Circ2.java"; // #26 at 0xCB - NameAndType #18 #19; // #27 at 0xD8 - NameAndType #13 #14; // #28 at 0xDD - NameAndType #15 #17; // #29 at 0xE2 - NameAndType #22 #23; // #30 at 0xE7 - NameAndType #9 #12; // #31 at 0xEC - Utf8 "java/lang/Object"; // #32 at 0xF1 + Method #12 #38; // #1 at 0x0A + class #39; // #2 at 0x0F + Field #2 #40; // #3 at 0x12 + InvokeDynamic 0s #43; // #4 at 0x17 + InvokeDynamic 0s #44; // #5 at 0x1C + InvokeDynamic 0s #45; // #6 at 0x21 + InvokeDynamic 0s #46; // #7 at 0x26 + Method #2 #47; // #8 at 0x2B + Field #2 #48; // #9 at 0x30 + class #49; // #10 at 0x35 + Field #2 #50; // #11 at 0x38 + class #51; // #12 at 0x3D + Utf8 "VT"; // #13 at 0x40 + Utf8 "QCirc2;"; // #14 at 0x45 + Utf8 "char_v"; // #15 at 0x4F + Utf8 "C"; // #16 at 0x58 + Utf8 "vv"; // #17 at 0x5C + Utf8 "QCirc;"; // #18 at 0x61 + Utf8 "<init>"; // #19 at 0x6A + Utf8 "()V"; // #20 at 0x73 + Utf8 "Code"; // #21 at 0x79 + Utf8 "LineNumberTable"; // #22 at 0x80 + Utf8 "makeCirc2"; // #23 at 0x92 + Utf8 "(C)QCirc2;"; // #24 at 0x9E + Utf8 "hashCode"; // #25 at 0xAB + Utf8 "()I"; // #26 at 0xB6 + Utf8 "equals"; // #27 at 0xBC + Utf8 "(Ljava/lang/Object;)Z"; // #28 at 0xC5 + Utf8 "toString"; // #29 at 0xDD + Utf8 "()Ljava/lang/String;"; // #30 at 0xE8 + Utf8 "longHashCode"; // #31 at 0xFF + Utf8 "()J"; // #32 at 0x010E + Utf8 "<clinit>"; // #33 at 0x0114 + Utf8 "$makeValue$"; // #34 at 0x011F + Utf8 "()QCirc2;"; // #35 at 0x012D + Utf8 "SourceFile"; // #36 at 0x0139 + Utf8 "Circ2.java"; // #37 at 0x0146 + NameAndType #19 #20; // #38 at 0x0153 + Utf8 "Circ2"; // #39 at 0x0158 + NameAndType #15 #16; // #40 at 0x0160 + Utf8 "BootstrapMethods"; // #41 at 0x0165 + MethodHandle 6b #52; // #42 at 0x0178 + NameAndType #25 #53; // #43 at 0x017C + NameAndType #27 #54; // #44 at 0x0181 + NameAndType #29 #55; // #45 at 0x0186 + NameAndType #31 #56; // #46 at 0x018B + NameAndType #23 #24; // #47 at 0x0190 + NameAndType #13 #14; // #48 at 0x0195 + Utf8 "Circ"; // #49 at 0x019A + NameAndType #17 #18; // #50 at 0x01A1 + Utf8 "java/lang/Object"; // #51 at 0x01A6 + Method #57 #58; // #52 at 0x01B9 + Utf8 "(Ljava/lang/Object;)I"; // #53 at 0x01BE + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #54 at 0x01D6 + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #55 at 0x0200 + Utf8 "(Ljava/lang/Object;)J"; // #56 at 0x0229 + class #59; // #57 at 0x0241 + NameAndType #60 #64; // #58 at 0x0244 + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #59 at 0x0249 + Utf8 "makeBootstrapMethod"; // #60 at 0x0272 + class #66; // #61 at 0x0288 + Utf8 "Lookup"; // #62 at 0x028B + Utf8 "InnerClasses"; // #63 at 0x0294 + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #64 at 0x02A3 + class #67; // #65 at 0x0319 + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #66 at 0x031C + Utf8 "java/lang/invoke/MethodHandles"; // #67 at 0x0344 } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] - #5;// this_cpx - #8;// super_cpx + #2;// this_cpx + #12;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields - { // Member at 0x010E - 0x0118; // access - #9; // name_cpx - #12; // sig_cpx - [0] { // Attributes - } // Attributes - } // Member - ; - { // Member at 0x0116 - 0x0010; // access + { // Member at 0x036F + 0x0018; // access #13; // name_cpx #14; // sig_cpx [0] { // Attributes } // Attributes } // Member ; - { // Member at 0x011E - 0x0110; // access + { // Member at 0x0377 + 0x0010; // access #15; // name_cpx - #17; // sig_cpx + #16; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x037F + 0x0010; // access + #17; // name_cpx + #18; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields - [3] { // methods - { // Member at 0x0128 + [8] { // methods + { // Member at 0x0389 0x0000; // access - #18; // name_cpx - #19; // sig_cpx + #19; // name_cpx + #20; // sig_cpx [1] { // Attributes - Attr(#20, 54) { // Code at 0x0130 - 2; // max_stack + Attr(#21, 29) { // Code at 0x0391 + 1; // max_stack 1; // max_locals - Bytes[18]{ - 0x2AB700012A107AB5; - 0x00022ACB0003B500; - 0x04B1; + Bytes[5]{ + 0x2AB70001B1; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#21, 18) { // LineNumberTable at 0x0154 - [4] { // LineNumberTable - 0 5; // at 0x0160 - 4 6; // at 0x0164 - 10 7; // at 0x0168 - 17 8; // at 0x016C + Attr(#22, 6) { // LineNumberTable at 0x03A8 + [1] { // LineNumberTable + 0 6; // at 0x03B4 } } // end LineNumberTable } // Attributes @@ -1580,26 +1777,26 @@ } // Attributes } // Member ; - { // Member at 0x016C + { // Member at 0x03B4 0x0008; // access - #22; // name_cpx - #23; // sig_cpx + #23; // name_cpx + #24; // sig_cpx [1] { // Attributes - Attr(#20, 44) { // Code at 0x0174 + Attr(#21, 45) { // Code at 0x03BC 2; // max_stack 2; // max_locals - Bytes[12]{ - 0xCB00054C2B1ACC00; - 0x024C2BB0; + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#21, 14) { // LineNumberTable at 0x0192 + Attr(#22, 14) { // LineNumberTable at 0x03DB [3] { // LineNumberTable - 0 10; // at 0x019E - 4 11; // at 0x01A2 - 10 12; // at 0x01A6 + 0 12; // at 0x03E7 + 4 13; // at 0x03EB + 11 14; // at 0x03EF } } // end LineNumberTable } // Attributes @@ -1607,24 +1804,149 @@ } // Attributes } // Member ; - { // Member at 0x01A6 - 0x0008; // access - #24; // name_cpx - #19; // sig_cpx + { // Member at 0x03EF + 0x0011; // access + #25; // name_cpx + #26; // sig_cpx [1] { // Attributes - Attr(#20, 34) { // Code at 0x01AE + Attr(#21, 31) { // Code at 0x03F7 1; // max_stack - 0; // max_locals - Bytes[10]{ - 0x110123B80006B300; - 0x07B1; + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#21, 6) { // LineNumberTable at 0x01CA + Attr(#22, 6) { // LineNumberTable at 0x0410 [1] { // LineNumberTable - 0 2; // at 0x01D6 + 0 1; // at 0x041C + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x041C + 0x0011; // access + #27; // name_cpx + #28; // sig_cpx + [1] { // Attributes + Attr(#21, 32) { // Code at 0x0424 + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x043E + [1] { // LineNumberTable + 0 1; // at 0x044A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x044A + 0x0011; // access + #29; // name_cpx + #30; // sig_cpx + [1] { // Attributes + Attr(#21, 31) { // Code at 0x0452 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x046B + [1] { // LineNumberTable + 0 1; // at 0x0477 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0477 + 0x0011; // access + #31; // name_cpx + #32; // sig_cpx + [1] { // Attributes + Attr(#21, 31) { // Code at 0x047F + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x0498 + [1] { // LineNumberTable + 0 1; // at 0x04A4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04A4 + 0x0008; // access + #33; // name_cpx + #20; // sig_cpx + [1] { // Attributes + Attr(#21, 34) { // Code at 0x04AC + 1; // max_stack + 0; // max_locals + Bytes[10]{ + 0x110123B80008B300; + 0x09B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x04C8 + [1] { // LineNumberTable + 0 2; // at 0x04D4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04D4 + 0x1008; // access + #34; // name_cpx + #35; // sig_cpx + [1] { // Attributes + Attr(#21, 59) { // Code at 0x04DC + 2; // max_stack + 1; // max_locals + Bytes[23]{ + 0xCB00024B107A2A5F; + 0xCC00034BCB000A2A; + 0x5FCC000B4B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 18) { // LineNumberTable at 0x0505 + [4] { // LineNumberTable + 0 6; // at 0x0511 + 4 7; // at 0x0515 + 12 8; // at 0x0519 + 21 9; // at 0x051D } } // end LineNumberTable } // Attributes @@ -1633,17 +1955,30 @@ } // Member } // methods - [2] { // Attributes - Attr(#25, 2) { // SourceFile at 0x01D8 - #26; + [3] { // Attributes + Attr(#36, 2) { // SourceFile at 0x051F + #37; } // end SourceFile ; - Attr(#11, 6) { // ValueTypes at 0x01E0 - 0x000200030005; - } // end ValueTypes + Attr(#63, 10) { // InnerClasses at 0x0527 + [1] { // InnerClasses + #61 #65 #62 25; // at 0x0537 + } + } // end InnerClasses + ; + Attr(#41, 6) { // BootstrapMethods at 0x0537 + [1] { // bootstrap_methods + { // bootstrap_method + #42; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods } // Attributes } // end class Circ2 + ////////////////////////////////////////////////////////////////////// // Value types CircStaticA and CircStaticB have static fields of each other's @@ -1655,7 +1990,7 @@ // final value class CircStaticA { // static final CircStaticA VT = makeCircStaticA(0x01234567); // final int int_v; -// __Flattenable static final CircStaticB v2 = CircStaticB.default; +// static final CircStaticB v2 = CircStaticB.default; // CircStaticA() { // int_v = 1; // } @@ -1669,7 +2004,7 @@ // final value class CircStaticB { // static final CircStaticB VT = makeCircStaticB(0x01234567); // final int int_v; -// __Flattenable static final CircStaticA v2 = CircStaticA.default; +// static final CircStaticA v2 = CircStaticA.default; // CircStaticB() { // int_v = 1; // } @@ -1683,98 +2018,130 @@ class CircStaticA { 0xCAFEBABE; 0; // minor version - 55; // version - [34] { // Constant Pool + 56; // version + [69] { // Constant Pool ; // first element is empty - Method #9 #28; // #1 at 0x0A - Field #3 #29; // #2 at 0x0F - class #11; // #3 at 0x14 - int 0x01234567; // #4 at 0x17 - Method #3 #30; // #5 at 0x1C - Field #3 #31; // #6 at 0x21 - class #17; // #7 at 0x26 - Field #3 #32; // #8 at 0x29 - class #33; // #9 at 0x2E - Utf8 "VT"; // #10 at 0x31 - Utf8 "CircStaticA"; // #11 at 0x36 - Utf8 "ValueTypes"; // #12 at 0x44 - Utf8 "LCircStaticA;"; // #13 at 0x51 - Utf8 "int_v"; // #14 at 0x61 - Utf8 "I"; // #15 at 0x69 - Utf8 "v2"; // #16 at 0x6D - Utf8 "CircStaticB"; // #17 at 0x72 - Utf8 "LCircStaticB;"; // #18 at 0x80 - Utf8 "<init>"; // #19 at 0x90 - Utf8 "()V"; // #20 at 0x99 - Utf8 "Code"; // #21 at 0x9F - Utf8 "LineNumberTable"; // #22 at 0xA6 - Utf8 "makeCircStaticA"; // #23 at 0xB8 - Utf8 "(I)LCircStaticA;"; // #24 at 0xCA - Utf8 "<clinit>"; // #25 at 0xDD - Utf8 "SourceFile"; // #26 at 0xE8 - Utf8 "CircStaticA.java"; // #27 at 0xF5 - NameAndType #19 #20; // #28 at 0x0108 - NameAndType #14 #15; // #29 at 0x010D - NameAndType #23 #24; // #30 at 0x0112 - NameAndType #10 #13; // #31 at 0x0117 - NameAndType #16 #18; // #32 at 0x011C - Utf8 "java/lang/Object"; // #33 at 0x0121 + Method #13 #39; // #1 at 0x0A + class #40; // #2 at 0x0F + Field #2 #41; // #3 at 0x12 + InvokeDynamic 0s #44; // #4 at 0x17 + InvokeDynamic 0s #45; // #5 at 0x1C + InvokeDynamic 0s #46; // #6 at 0x21 + InvokeDynamic 0s #47; // #7 at 0x26 + int 0x01234567; // #8 at 0x2B + Method #2 #48; // #9 at 0x30 + Field #2 #49; // #10 at 0x35 + class #50; // #11 at 0x3A + Field #2 #51; // #12 at 0x3D + class #52; // #13 at 0x42 + Utf8 "VT"; // #14 at 0x45 + Utf8 "QCircStaticA;"; // #15 at 0x4A + Utf8 "int_v"; // #16 at 0x5A + Utf8 "I"; // #17 at 0x62 + Utf8 "v2"; // #18 at 0x66 + Utf8 "QCircStaticB;"; // #19 at 0x6B + Utf8 "<init>"; // #20 at 0x7B + Utf8 "()V"; // #21 at 0x84 + Utf8 "Code"; // #22 at 0x8A + Utf8 "LineNumberTable"; // #23 at 0x91 + Utf8 "makeCircStaticA"; // #24 at 0xA3 + Utf8 "(I)QCircStaticA;"; // #25 at 0xB5 + Utf8 "hashCode"; // #26 at 0xC8 + Utf8 "()I"; // #27 at 0xD3 + Utf8 "equals"; // #28 at 0xD9 + Utf8 "(Ljava/lang/Object;)Z"; // #29 at 0xE2 + Utf8 "toString"; // #30 at 0xFA + Utf8 "()Ljava/lang/String;"; // #31 at 0x0105 + Utf8 "longHashCode"; // #32 at 0x011C + Utf8 "()J"; // #33 at 0x012B + Utf8 "<clinit>"; // #34 at 0x0131 + Utf8 "$makeValue$"; // #35 at 0x013C + Utf8 "()QCircStaticA;"; // #36 at 0x014A + Utf8 "SourceFile"; // #37 at 0x015C + Utf8 "CircStaticA.java"; // #38 at 0x0169 + NameAndType #20 #21; // #39 at 0x017C + Utf8 "CircStaticA"; // #40 at 0x0181 + NameAndType #16 #17; // #41 at 0x018F + Utf8 "BootstrapMethods"; // #42 at 0x0194 + MethodHandle 6b #53; // #43 at 0x01A7 + NameAndType #26 #54; // #44 at 0x01AB + NameAndType #28 #55; // #45 at 0x01B0 + NameAndType #30 #56; // #46 at 0x01B5 + NameAndType #32 #57; // #47 at 0x01BA + NameAndType #24 #25; // #48 at 0x01BF + NameAndType #14 #15; // #49 at 0x01C4 + Utf8 "CircStaticB"; // #50 at 0x01C9 + NameAndType #18 #19; // #51 at 0x01D7 + Utf8 "java/lang/Object"; // #52 at 0x01DC + Method #58 #59; // #53 at 0x01EF + Utf8 "(Ljava/lang/Object;)I"; // #54 at 0x01F4 + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #55 at 0x020C + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #56 at 0x0236 + Utf8 "(Ljava/lang/Object;)J"; // #57 at 0x025F + class #60; // #58 at 0x0277 + NameAndType #61 #65; // #59 at 0x027A + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #60 at 0x027F + Utf8 "makeBootstrapMethod"; // #61 at 0x02A8 + class #67; // #62 at 0x02BE + Utf8 "Lookup"; // #63 at 0x02C1 + Utf8 "InnerClasses"; // #64 at 0x02CA + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #65 at 0x02D9 + class #68; // #66 at 0x034F + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #67 at 0x0352 + Utf8 "java/lang/invoke/MethodHandles"; // #68 at 0x037A } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] - #3;// this_cpx - #9;// super_cpx + #2;// this_cpx + #13;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields - { // Member at 0x013E - 0x0118; // access - #10; // name_cpx - #13; // sig_cpx - [0] { // Attributes - } // Attributes - } // Member - ; - { // Member at 0x0146 - 0x0010; // access + { // Member at 0x03A5 + 0x0018; // access #14; // name_cpx #15; // sig_cpx [0] { // Attributes } // Attributes } // Member ; - { // Member at 0x014E - 0x0118; // access + { // Member at 0x03AD + 0x0010; // access #16; // name_cpx - #18; // sig_cpx + #17; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x03B5 + 0x0018; // access + #18; // name_cpx + #19; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields - [3] { // methods - { // Member at 0x0158 + [8] { // methods + { // Member at 0x03BF 0x0000; // access - #19; // name_cpx - #20; // sig_cpx + #20; // name_cpx + #21; // sig_cpx [1] { // Attributes - Attr(#21, 42) { // Code at 0x0160 - 2; // max_stack + Attr(#22, 29) { // Code at 0x03C7 + 1; // max_stack 1; // max_locals - Bytes[10]{ - 0x2AB700012A04B500; - 0x02B1; + Bytes[5]{ + 0x2AB70001B1; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 14) { // LineNumberTable at 0x017C - [3] { // LineNumberTable - 0 5; // at 0x0188 - 4 6; // at 0x018C - 9 7; // at 0x0190 + Attr(#23, 6) { // LineNumberTable at 0x03DE + [1] { // LineNumberTable + 0 6; // at 0x03EA } } // end LineNumberTable } // Attributes @@ -1782,26 +2149,26 @@ } // Attributes } // Member ; - { // Member at 0x0190 + { // Member at 0x03EA 0x0008; // access - #23; // name_cpx - #24; // sig_cpx + #24; // name_cpx + #25; // sig_cpx [1] { // Attributes - Attr(#21, 44) { // Code at 0x0198 + Attr(#22, 45) { // Code at 0x03F2 2; // max_stack 2; // max_locals - Bytes[12]{ - 0xCB00034C2B1ACC00; - 0x024C2BB0; + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 14) { // LineNumberTable at 0x01B6 + Attr(#23, 14) { // LineNumberTable at 0x0411 [3] { // LineNumberTable - 0 9; // at 0x01C2 - 4 10; // at 0x01C6 - 10 11; // at 0x01CA + 0 11; // at 0x041D + 4 12; // at 0x0421 + 11 13; // at 0x0425 } } // end LineNumberTable } // Attributes @@ -1809,25 +2176,148 @@ } // Attributes } // Member ; - { // Member at 0x01CA - 0x0008; // access - #25; // name_cpx - #20; // sig_cpx + { // Member at 0x0425 + 0x0011; // access + #26; // name_cpx + #27; // sig_cpx [1] { // Attributes - Attr(#21, 43) { // Code at 0x01D2 + Attr(#22, 31) { // Code at 0x042D 1; // max_stack - 0; // max_locals - Bytes[15]{ - 0x1204B80005B30006; - 0xCB0007B30008B1; + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 10) { // LineNumberTable at 0x01F3 + Attr(#23, 6) { // LineNumberTable at 0x0446 + [1] { // LineNumberTable + 0 1; // at 0x0452 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0452 + 0x0011; // access + #28; // name_cpx + #29; // sig_cpx + [1] { // Attributes + Attr(#22, 32) { // Code at 0x045A + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0474 + [1] { // LineNumberTable + 0 1; // at 0x0480 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0480 + 0x0011; // access + #30; // name_cpx + #31; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x0488 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04A1 + [1] { // LineNumberTable + 0 1; // at 0x04AD + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04AD + 0x0011; // access + #32; // name_cpx + #33; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x04B5 + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04CE + [1] { // LineNumberTable + 0 1; // at 0x04DA + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04DA + 0x0008; // access + #34; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 43) { // Code at 0x04E2 + 1; // max_stack + 0; // max_locals + Bytes[15]{ + 0x1208B80009B3000A; + 0xCB000BB3000CB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 10) { // LineNumberTable at 0x0503 [2] { // LineNumberTable - 0 2; // at 0x01FF - 8 4; // at 0x0203 + 0 2; // at 0x050F + 8 4; // at 0x0513 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0513 + 0x1008; // access + #35; // name_cpx + #36; // sig_cpx + [1] { // Attributes + Attr(#22, 45) { // Code at 0x051B + 2; // max_stack + 1; // max_locals + Bytes[13]{ + 0xCB00024B042A5FCC; + 0x00034B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 14) { // LineNumberTable at 0x053A + [3] { // LineNumberTable + 0 6; // at 0x0546 + 4 7; // at 0x054A + 11 8; // at 0x054E } } // end LineNumberTable } // Attributes @@ -1836,112 +2326,157 @@ } // Member } // methods - [2] { // Attributes - Attr(#26, 2) { // SourceFile at 0x0205 - #27; + [3] { // Attributes + Attr(#37, 2) { // SourceFile at 0x0550 + #38; } // end SourceFile ; - Attr(#12, 6) { // ValueTypes at 0x020D - 0x000200030007; - } // end ValueTypes + Attr(#64, 10) { // InnerClasses at 0x0558 + [1] { // InnerClasses + #62 #66 #63 25; // at 0x0568 + } + } // end InnerClasses + ; + Attr(#42, 6) { // BootstrapMethods at 0x0568 + [1] { // bootstrap_methods + { // bootstrap_method + #43; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods } // Attributes } // end class CircStaticA + class CircStaticB { 0xCAFEBABE; 0; // minor version - 55; // version - [34] { // Constant Pool + 56; // version + [69] { // Constant Pool ; // first element is empty - Method #9 #28; // #1 at 0x0A - Field #3 #29; // #2 at 0x0F - class #11; // #3 at 0x14 - int 0x01234567; // #4 at 0x17 - Method #3 #30; // #5 at 0x1C - Field #3 #31; // #6 at 0x21 - class #17; // #7 at 0x26 - Field #3 #32; // #8 at 0x29 - class #33; // #9 at 0x2E - Utf8 "VT"; // #10 at 0x31 - Utf8 "CircStaticB"; // #11 at 0x36 - Utf8 "ValueTypes"; // #12 at 0x44 - Utf8 "LCircStaticB;"; // #13 at 0x51 - Utf8 "int_v"; // #14 at 0x61 - Utf8 "I"; // #15 at 0x69 - Utf8 "v2"; // #16 at 0x6D - Utf8 "CircStaticA"; // #17 at 0x72 - Utf8 "LCircStaticA;"; // #18 at 0x80 - Utf8 "<init>"; // #19 at 0x90 - Utf8 "()V"; // #20 at 0x99 - Utf8 "Code"; // #21 at 0x9F - Utf8 "LineNumberTable"; // #22 at 0xA6 - Utf8 "makeCircStaticB"; // #23 at 0xB8 - Utf8 "(I)LCircStaticB;"; // #24 at 0xCA - Utf8 "<clinit>"; // #25 at 0xDD - Utf8 "SourceFile"; // #26 at 0xE8 - Utf8 "CircStaticB.java"; // #27 at 0xF5 - NameAndType #19 #20; // #28 at 0x0108 - NameAndType #14 #15; // #29 at 0x010D - NameAndType #23 #24; // #30 at 0x0112 - NameAndType #10 #13; // #31 at 0x0117 - NameAndType #16 #18; // #32 at 0x011C - Utf8 "java/lang/Object"; // #33 at 0x0121 + Method #13 #39; // #1 at 0x0A + class #40; // #2 at 0x0F + Field #2 #41; // #3 at 0x12 + InvokeDynamic 0s #44; // #4 at 0x17 + InvokeDynamic 0s #45; // #5 at 0x1C + InvokeDynamic 0s #46; // #6 at 0x21 + InvokeDynamic 0s #47; // #7 at 0x26 + int 0x01234567; // #8 at 0x2B + Method #2 #48; // #9 at 0x30 + Field #2 #49; // #10 at 0x35 + class #50; // #11 at 0x3A + Field #2 #51; // #12 at 0x3D + class #52; // #13 at 0x42 + Utf8 "VT"; // #14 at 0x45 + Utf8 "QCircStaticB;"; // #15 at 0x4A + Utf8 "int_v"; // #16 at 0x5A + Utf8 "I"; // #17 at 0x62 + Utf8 "v2"; // #18 at 0x66 + Utf8 "QCircStaticA;"; // #19 at 0x6B + Utf8 "<init>"; // #20 at 0x7B + Utf8 "()V"; // #21 at 0x84 + Utf8 "Code"; // #22 at 0x8A + Utf8 "LineNumberTable"; // #23 at 0x91 + Utf8 "makeCircStaticB"; // #24 at 0xA3 + Utf8 "(I)QCircStaticB;"; // #25 at 0xB5 + Utf8 "hashCode"; // #26 at 0xC8 + Utf8 "()I"; // #27 at 0xD3 + Utf8 "equals"; // #28 at 0xD9 + Utf8 "(Ljava/lang/Object;)Z"; // #29 at 0xE2 + Utf8 "toString"; // #30 at 0xFA + Utf8 "()Ljava/lang/String;"; // #31 at 0x0105 + Utf8 "longHashCode"; // #32 at 0x011C + Utf8 "()J"; // #33 at 0x012B + Utf8 "<clinit>"; // #34 at 0x0131 + Utf8 "$makeValue$"; // #35 at 0x013C + Utf8 "()QCircStaticB;"; // #36 at 0x014A + Utf8 "SourceFile"; // #37 at 0x015C + Utf8 "CircStaticB.java"; // #38 at 0x0169 + NameAndType #20 #21; // #39 at 0x017C + Utf8 "CircStaticB"; // #40 at 0x0181 + NameAndType #16 #17; // #41 at 0x018F + Utf8 "BootstrapMethods"; // #42 at 0x0194 + MethodHandle 6b #53; // #43 at 0x01A7 + NameAndType #26 #54; // #44 at 0x01AB + NameAndType #28 #55; // #45 at 0x01B0 + NameAndType #30 #56; // #46 at 0x01B5 + NameAndType #32 #57; // #47 at 0x01BA + NameAndType #24 #25; // #48 at 0x01BF + NameAndType #14 #15; // #49 at 0x01C4 + Utf8 "CircStaticA"; // #50 at 0x01C9 + NameAndType #18 #19; // #51 at 0x01D7 + Utf8 "java/lang/Object"; // #52 at 0x01DC + Method #58 #59; // #53 at 0x01EF + Utf8 "(Ljava/lang/Object;)I"; // #54 at 0x01F4 + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #55 at 0x020C + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #56 at 0x0236 + Utf8 "(Ljava/lang/Object;)J"; // #57 at 0x025F + class #60; // #58 at 0x0277 + NameAndType #61 #65; // #59 at 0x027A + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #60 at 0x027F + Utf8 "makeBootstrapMethod"; // #61 at 0x02A8 + class #67; // #62 at 0x02BE + Utf8 "Lookup"; // #63 at 0x02C1 + Utf8 "InnerClasses"; // #64 at 0x02CA + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #65 at 0x02D9 + class #68; // #66 at 0x034F + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #67 at 0x0352 + Utf8 "java/lang/invoke/MethodHandles"; // #68 at 0x037A } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] - #3;// this_cpx - #9;// super_cpx + #2;// this_cpx + #13;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields - { // Member at 0x013E - 0x0118; // access - #10; // name_cpx - #13; // sig_cpx - [0] { // Attributes - } // Attributes - } // Member - ; - { // Member at 0x0146 - 0x0010; // access + { // Member at 0x03A5 + 0x0018; // access #14; // name_cpx #15; // sig_cpx [0] { // Attributes } // Attributes } // Member ; - { // Member at 0x014E - 0x0118; // access + { // Member at 0x03AD + 0x0010; // access #16; // name_cpx - #18; // sig_cpx + #17; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x03B5 + 0x0018; // access + #18; // name_cpx + #19; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields - [3] { // methods - { // Member at 0x0158 + [8] { // methods + { // Member at 0x03BF 0x0000; // access - #19; // name_cpx - #20; // sig_cpx + #20; // name_cpx + #21; // sig_cpx [1] { // Attributes - Attr(#21, 42) { // Code at 0x0160 - 2; // max_stack + Attr(#22, 29) { // Code at 0x03C7 + 1; // max_stack 1; // max_locals - Bytes[10]{ - 0x2AB700012A04B500; - 0x02B1; + Bytes[5]{ + 0x2AB70001B1; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 14) { // LineNumberTable at 0x017C - [3] { // LineNumberTable - 0 5; // at 0x0188 - 4 6; // at 0x018C - 9 7; // at 0x0190 + Attr(#23, 6) { // LineNumberTable at 0x03DE + [1] { // LineNumberTable + 0 6; // at 0x03EA } } // end LineNumberTable } // Attributes @@ -1949,26 +2484,26 @@ } // Attributes } // Member ; - { // Member at 0x0190 + { // Member at 0x03EA 0x0008; // access - #23; // name_cpx - #24; // sig_cpx + #24; // name_cpx + #25; // sig_cpx [1] { // Attributes - Attr(#21, 44) { // Code at 0x0198 + Attr(#22, 45) { // Code at 0x03F2 2; // max_stack 2; // max_locals - Bytes[12]{ - 0xCB00034C2B1ACC00; - 0x024C2BB0; + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 14) { // LineNumberTable at 0x01B6 + Attr(#23, 14) { // LineNumberTable at 0x0411 [3] { // LineNumberTable - 0 9; // at 0x01C2 - 4 10; // at 0x01C6 - 10 11; // at 0x01CA + 0 11; // at 0x041D + 4 12; // at 0x0421 + 11 13; // at 0x0425 } } // end LineNumberTable } // Attributes @@ -1976,25 +2511,148 @@ } // Attributes } // Member ; - { // Member at 0x01CA - 0x0008; // access - #25; // name_cpx - #20; // sig_cpx + { // Member at 0x0425 + 0x0011; // access + #26; // name_cpx + #27; // sig_cpx [1] { // Attributes - Attr(#21, 43) { // Code at 0x01D2 + Attr(#22, 31) { // Code at 0x042D 1; // max_stack - 0; // max_locals - Bytes[15]{ - 0x1204B80005B30006; - 0xCB0007B30008B1; + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; }; [0] { // Traps } // end Traps [1] { // Attributes - Attr(#22, 10) { // LineNumberTable at 0x01F3 + Attr(#23, 6) { // LineNumberTable at 0x0446 + [1] { // LineNumberTable + 0 1; // at 0x0452 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0452 + 0x0011; // access + #28; // name_cpx + #29; // sig_cpx + [1] { // Attributes + Attr(#22, 32) { // Code at 0x045A + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0474 + [1] { // LineNumberTable + 0 1; // at 0x0480 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0480 + 0x0011; // access + #30; // name_cpx + #31; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x0488 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04A1 + [1] { // LineNumberTable + 0 1; // at 0x04AD + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04AD + 0x0011; // access + #32; // name_cpx + #33; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x04B5 + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04CE + [1] { // LineNumberTable + 0 1; // at 0x04DA + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04DA + 0x0008; // access + #34; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 43) { // Code at 0x04E2 + 1; // max_stack + 0; // max_locals + Bytes[15]{ + 0x1208B80009B3000A; + 0xCB000BB3000CB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 10) { // LineNumberTable at 0x0503 [2] { // LineNumberTable - 0 2; // at 0x01FF - 8 4; // at 0x0203 + 0 2; // at 0x050F + 8 4; // at 0x0513 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0513 + 0x1008; // access + #35; // name_cpx + #36; // sig_cpx + [1] { // Attributes + Attr(#22, 45) { // Code at 0x051B + 2; // max_stack + 1; // max_locals + Bytes[13]{ + 0xCB00024B042A5FCC; + 0x00034B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 14) { // LineNumberTable at 0x053A + [3] { // LineNumberTable + 0 6; // at 0x0546 + 4 7; // at 0x054A + 11 8; // at 0x054E } } // end LineNumberTable } // Attributes @@ -2003,17 +2661,30 @@ } // Member } // methods - [2] { // Attributes - Attr(#26, 2) { // SourceFile at 0x0205 - #27; + [3] { // Attributes + Attr(#37, 2) { // SourceFile at 0x0550 + #38; } // end SourceFile ; - Attr(#12, 6) { // ValueTypes at 0x020D - 0x000200070003; - } // end ValueTypes + Attr(#64, 10) { // InnerClasses at 0x0558 + [1] { // InnerClasses + #62 #66 #63 25; // at 0x0568 + } + } // end InnerClasses + ; + Attr(#42, 6) { // BootstrapMethods at 0x0568 + [1] { // bootstrap_methods + { // bootstrap_method + #43; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods } // Attributes } // end class CircStaticB + ////////////////////////////////////////////////////////////////////// // Test that a value type cannot be Cloneable. @@ -2026,7 +2697,7 @@ class ValueCloneable { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [20] { // Constant Pool ; // first element is empty Method #4 #14; // #1 at 0x0A
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/verifier/VerifierValueTypes.java Tue Nov 27 17:47:06 2018 +0530 +++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/verifier/VerifierValueTypes.java Tue Nov 27 09:25:51 2018 -0500 @@ -72,8 +72,8 @@ // to withfield's field. runTestVerifyError("wthFldBadFldVal", "Bad type on operand stack"); - // Test that VerifyError is thrown if the second operand on the stack is not a reference. - runTestVerifyError("wthFldBadFldRef", "Bad value type on operand stack in withfield"); + // Test that VerifyError is thrown if the second operand on the stack is a primitive. + runTestVerifyError("wthFldBadFldRef", "Bad type on operand stack"); // Test that ClassFormatError is thrown for a class file, with major version 54, that // contains a withfield opcode. @@ -86,20 +86,14 @@ // entry is java.lang.Object and the reference on the stack is a value type. runTestVerifyError("wthFldObject", "must be identical value types"); - // Test VerifyError is thrown if a new's cp entry is a value type. - runTestVerifyError("newVT", "Illegal use of value type as operand for new instruction"); - // Test VerifyError is thrown if a monitorenter's cp entry is a value type. - runTestVerifyError("monEnterVT", "Illegal use of value type as operand for monitorenter"); + runTestVerifyError("monEnterVT", "Bad type on operand stack"); // Test VerifyError is thrown if a defaultvalue's cp entry is a value type. - runTestVerifyError("defValueObj", "Illegal use of an object as operand for defaultvalue"); + // TBD!!! + runTestVerifyError("defValueObj", "Invalid type on operand stack in withfield instruction"); // Test VerifyError is thrown if a withfield's class operand is not a value type. - runTestVerifyError("withfieldObj", "Bad value type on operand stack in withfield"); - - // Test VerifyError is thrown if a putfield's class operand is a value type in a - // method not named '<init>'. - runTestVerifyError("putfieldVT", "Field for putfield cannot be a member of a value type"); + runTestVerifyError("withfieldObj", "Bad type on operand stack"); } }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/verifier/verifierTests.jcod Tue Nov 27 17:47:06 2018 +0530 +++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/verifier/verifierTests.jcod Tue Nov 27 09:25:51 2018 -0500 @@ -60,7 +60,7 @@ class defValBadCP { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [27] { // Constant Pool ; // first element is empty Method #7 #21; // #1 at 0x0A @@ -262,7 +262,7 @@ class defValWrongCPType { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [27] { // Constant Pool ; // first element is empty Method #7 #21; // #1 at 0x0A @@ -363,7 +363,7 @@ class wthFldBadCP { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [20] { // Constant Pool ; // first element is empty Method #4 #17; // #1 at 0x0A @@ -481,7 +481,7 @@ class wthFldBadFldVal { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [20] { // Constant Pool ; // first element is empty Method #4 #17; // #1 at 0x0A @@ -598,7 +598,7 @@ class wthFldBadFldRef { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [20] { // Constant Pool ; // first element is empty Method #4 #17; // #1 at 0x0A @@ -817,7 +817,7 @@ class wthFldWrongCPType { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [20] { // Constant Pool ; // first element is empty Method #4 #17; // #1 at 0x0A @@ -936,7 +936,7 @@ class wthFldObject { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [22] { // Constant Pool ; // first element is empty Method #4 #17; // #1 at 0x0A @@ -1050,124 +1050,6 @@ /////////////////////////////////////////////////////////// -// The withfield opcode (0xCC) was change to a new (0xBB) opcode and its -// constant pool entry was changed to point to a class that is a value type. -// This should cause a VerifyError because the operand for opcode new cannot be -// a value type. -// -class newVT { - 0xCAFEBABE; - 0; // minor version - 55; // version - [20] { // Constant Pool - ; // first element is empty - Method #4 #17; // #1 at 0x0A - Field #3 #18; // #2 at 0x0F - class #12; // #3 at 0x14 - class #19; // #4 at 0x17 - Utf8 "int_v"; // #5 at 0x1A - Utf8 "I"; // #6 at 0x22 - Utf8 "<init>"; // #7 at 0x26 - Utf8 "()V"; // #8 at 0x2F - Utf8 "Code"; // #9 at 0x35 - Utf8 "LineNumberTable"; // #10 at 0x3C - Utf8 "makenewVT"; // #11 at 0x4E - Utf8 "newVT"; // #12 at 0x5A - Utf8 "ValueTypes"; // #13 at 0x62 - Utf8 "(I)LnewVT;"; // #14 at 0x6F - Utf8 "SourceFile"; // #15 at 0x7C - Utf8 "NewVT.java"; // #16 at 0x89 - NameAndType #7 #8; // #17 at 0x96 - NameAndType #5 #6; // #18 at 0x9B - Utf8 "java/lang/Object"; // #19 at 0xA0 - } // Constant Pool - - 0x0130; // access [ ACC_SUPER ACC_FINAL ] - #3;// this_cpx - #4;// super_cpx - - [0] { // Interfaces - } // Interfaces - - [1] { // fields - { // Member at 0xBD - 0x0010; // access - #5; // name_cpx - #6; // sig_cpx - [0] { // Attributes - } // Attributes - } // Member - } // fields - - [2] { // methods - { // Member at 0xC7 - 0x0000; // access - #7; // name_cpx - #8; // sig_cpx - [1] { // Attributes - Attr(#9, 42) { // Code at 0xCF - 2; // max_stack - 1; // max_locals - Bytes[10]{ - 0x2AB700012A04B500; - 0x02B1; - }; - [0] { // Traps - } // end Traps - [1] { // Attributes - Attr(#10, 14) { // LineNumberTable at 0xEB - [3] { // LineNumberTable - 0 3; // at 0xF7 - 4 4; // at 0xFB - 9 5; // at 0xFF - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - ; - { // Member at 0xFF - 0x0008; // access - #11; // name_cpx - #14; // sig_cpx - [1] { // Attributes - Attr(#9, 44) { // Code at 0x0107 - 2; // max_stack - 2; // max_locals - Bytes[12]{ - 0xCB00034C2B1ABB00; // Changed opcode withfield (0xCC) to new (0xBB) - 0x034C2BB0; // Changed constant pool entry to point to a value type class. - }; - [0] { // Traps - } // end Traps - [1] { // Attributes - Attr(#10, 14) { // LineNumberTable at 0x0125 - [3] { // LineNumberTable - 0 7; // at 0x0131 - 4 8; // at 0x0135 - 10 9; // at 0x0139 - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [2] { // Attributes - Attr(#15, 2) { // SourceFile at 0x013B - #16; - } // end SourceFile - ; - Attr(#13, 4) { // ValueTypes at 0x0143 - 0x00010003; - } // end ValueTypes - } // Attributes -} // end class newVT - -/////////////////////////////////////////////////////////// - // The astore_1 opcode (0x4C) was changed to a monitorenter (0xC2) opcode but // the operand on the stack is a value type. // This should cause a VerifyError because the operand for opcode monitorenter @@ -1176,7 +1058,7 @@ class monEnterVT { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [20] { // Constant Pool ; // first element is empty Method #4 #17; // #1 at 0x0A @@ -1294,7 +1176,7 @@ class defValueObj { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [20] { // Constant Pool ; // first element is empty Method #4 #17; // #1 at 0x0A @@ -1412,7 +1294,7 @@ class withfieldObj { 0xCAFEBABE; 0; // minor version - 55; // version + 56; // version [23] { // Constant Pool ; // first element is empty Method #5 #19; // #1 at 0x0A @@ -1530,121 +1412,3 @@ } // end ValueTypes } // Attributes } // end class withfieldObj - -/////////////////////////////////////////////////////////// - -// The withfield opcode was changed to a getfield opcode in a method that is not -// named '<init>'. -// This should cause a VerifyError because the reference operand for a getfield -// cannot be a value type unless it is in an '<init>' method. -// -class putfieldVT { - 0xCAFEBABE; - 0; // minor version - 55; // version - [20] { // Constant Pool - ; // first element is empty - Method #4 #17; // #1 at 0x0A - Field #3 #18; // #2 at 0x0F - class #12; // #3 at 0x14 - class #19; // #4 at 0x17 - Utf8 "int_v"; // #5 at 0x1A - Utf8 "I"; // #6 at 0x22 - Utf8 "<init>"; // #7 at 0x26 - Utf8 "()V"; // #8 at 0x2F - Utf8 "Code"; // #9 at 0x35 - Utf8 "LineNumberTable"; // #10 at 0x3C - Utf8 "makeputfieldVT"; // #11 at 0x4E - Utf8 "putfieldVT"; // #12 at 0x5F - Utf8 "ValueTypes"; // #13 at 0x6C - Utf8 "(I)LputfieldVT;"; // #14 at 0x79 - Utf8 "SourceFile"; // #15 at 0x8B - Utf8 "putfieldVT.java"; // #16 at 0x98 - NameAndType #7 #8; // #17 at 0xAA - NameAndType #5 #6; // #18 at 0xAF - Utf8 "java/lang/Object"; // #19 at 0xB4 - } // Constant Pool - - 0x0130; // access [ ACC_SUPER ACC_FINAL ] - #3;// this_cpx - #4;// super_cpx - - [0] { // Interfaces - } // Interfaces - - [1] { // fields - { // Member at 0xD1 - 0x0010; // access - #5; // name_cpx - #6; // sig_cpx - [0] { // Attributes - } // Attributes - } // Member - } // fields - - [2] { // methods - { // Member at 0xDB - 0x0000; // access - #7; // name_cpx - #8; // sig_cpx - [1] { // Attributes - Attr(#9, 42) { // Code at 0xE3 - 2; // max_stack - 1; // max_locals - Bytes[10]{ - 0x2AB700012A04B500; - 0x02B1; - }; - [0] { // Traps - } // end Traps - [1] { // Attributes - Attr(#10, 14) { // LineNumberTable at 0xFF - [3] { // LineNumberTable - 0 3; // at 0x010B - 4 4; // at 0x010F - 9 5; // at 0x0113 - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - ; - { // Member at 0x0113 - 0x0008; // access - #11; // name_cpx - #14; // sig_cpx - [1] { // Attributes - Attr(#9, 44) { // Code at 0x011B - 2; // max_stack - 2; // max_locals - Bytes[12]{ - 0xCB00034C2B1AB500; // Changed opcode withfield (0xCC) to putfield (0xB5) at byte 6. - 0x024C2BB0; - }; - [0] { // Traps - } // end Traps - [1] { // Attributes - Attr(#10, 14) { // LineNumberTable at 0x0139 - [3] { // LineNumberTable - 0 7; // at 0x0145 - 4 8; // at 0x0149 - 10 9; // at 0x014D - } - } // end LineNumberTable - } // Attributes - } // end Code - } // Attributes - } // Member - } // methods - - [2] { // Attributes - Attr(#15, 2) { // SourceFile at 0x014F - #16; - } // end SourceFile - ; - Attr(#13, 4) { // ValueTypes at 0x0157 - 0x00010003; - } // end ValueTypes - } // Attributes -} // end class putfieldVT