diff --git a/src/share/vm/c1/c1_GraphBuilder.cpp b/src/share/vm/c1/c1_GraphBuilder.cpp index 8050fbc3f6ff5c2228e67568d826f47f7ad12cdc..737d39f38501637e0dcc85fb206a22f353a667d6 100644 --- a/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/src/share/vm/c1/c1_GraphBuilder.cpp @@ -1569,31 +1569,33 @@ void GraphBuilder::access_field(Bytecodes::Code code) { ObjectType* obj_type = obj->type()->as_ObjectType(); if (obj_type->is_constant() && !PatchALot) { ciObject* const_oop = obj_type->constant_value(); - if (field->is_constant()) { - ciConstant field_val = field->constant_value_of(const_oop); - BasicType field_type = field_val.basic_type(); - switch (field_type) { - case T_ARRAY: - case T_OBJECT: - if (field_val.as_object()->should_be_constant()) { + if (!const_oop->is_null_object()) { + if (field->is_constant()) { + ciConstant field_val = field->constant_value_of(const_oop); + BasicType field_type = field_val.basic_type(); + switch (field_type) { + case T_ARRAY: + case T_OBJECT: + if (field_val.as_object()->should_be_constant()) { + constant = new Constant(as_ValueType(field_val)); + } + break; + default: constant = new Constant(as_ValueType(field_val)); } - break; - default: - constant = new Constant(as_ValueType(field_val)); - } - } else { - // For constant CallSites treat the target field as a compile time constant. - if (const_oop->is_call_site()) { - ciCallSite* call_site = const_oop->as_call_site(); - if (field->is_call_site_target()) { - ciMethodHandle* target = call_site->get_target(); - if (target != NULL) { // just in case - ciConstant field_val(T_OBJECT, target); - constant = new Constant(as_ValueType(field_val)); - // Add a dependence for invalidation of the optimization. - if (!call_site->is_constant_call_site()) { - dependency_recorder()->assert_call_site_target_value(call_site, target); + } else { + // For CallSite objects treat the target field as a compile time constant. + if (const_oop->is_call_site()) { + ciCallSite* call_site = const_oop->as_call_site(); + if (field->is_call_site_target()) { + ciMethodHandle* target = call_site->get_target(); + if (target != NULL) { // just in case + ciConstant field_val(T_OBJECT, target); + constant = new Constant(as_ValueType(field_val)); + // Add a dependence for invalidation of the optimization. + if (!call_site->is_constant_call_site()) { + dependency_recorder()->assert_call_site_target_value(call_site, target); + } } } } diff --git a/src/share/vm/classfile/javaClasses.cpp b/src/share/vm/classfile/javaClasses.cpp index 86b71fec14f08f45c142ea564b1764204d88a317..0958092c627e869be41c778c3fe6293442356e9b 100644 --- a/src/share/vm/classfile/javaClasses.cpp +++ b/src/share/vm/classfile/javaClasses.cpp @@ -1462,7 +1462,7 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, methodHandle met nmethod* nm = NULL; bool skip_fillInStackTrace_check = false; bool skip_throwableInit_check = false; - bool skip_hidden = false; + bool skip_hidden = !ShowHiddenFrames; for (frame fr = thread->last_frame(); max_depth != total_count;) { methodOop method = NULL; @@ -1544,9 +1544,6 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, methodHandle met } if (method->is_hidden()) { if (skip_hidden) continue; - } else { - // start skipping hidden frames after first non-hidden frame - skip_hidden = !ShowHiddenFrames; } bt.push(method, bci, CHECK); total_count++; diff --git a/src/share/vm/oops/methodOop.cpp b/src/share/vm/oops/methodOop.cpp index 1204048734dcc20f4a7b00846c42d9d9717e2a5e..963daa13cd3a45e96a43e634b2cd48c5610fddbe 100644 --- a/src/share/vm/oops/methodOop.cpp +++ b/src/share/vm/oops/methodOop.cpp @@ -582,7 +582,8 @@ void methodOopDesc::set_native_function(address function, bool post_event_flag) bool methodOopDesc::has_native_function() const { - assert(!is_method_handle_intrinsic(), ""); + if (is_method_handle_intrinsic()) + return false; // special-cased in SharedRuntime::generate_native_wrapper address func = native_function(); return (func != NULL && func != SharedRuntime::native_method_throw_unsatisfied_link_error_entry()); } @@ -612,6 +613,9 @@ bool methodOopDesc::is_not_compilable(int comp_level) const { if (number_of_breakpoints() > 0) { return true; } + if (is_method_handle_intrinsic()) { + return !is_synthetic(); // the generated adapters must be compiled + } if (comp_level == CompLevel_any) { return is_not_c1_compilable() || is_not_c2_compilable(); } diff --git a/src/share/vm/opto/doCall.cpp b/src/share/vm/opto/doCall.cpp index 43f67c7b7096382b87f8db52c91231ff79de36e5..ac668e5aac602abe2171073889e131a837d04c4f 100644 --- a/src/share/vm/opto/doCall.cpp +++ b/src/share/vm/opto/doCall.cpp @@ -641,8 +641,8 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) { #ifndef PRODUCT // We do not expect the same handler bci to take both cold unloaded // and hot loaded exceptions. But, watch for it. - if (extype->is_loaded()) { - tty->print_cr("Warning: Handler @%d takes mixed loaded/unloaded exceptions in "); + if ((Verbose || WizardMode) && extype->is_loaded()) { + tty->print("Warning: Handler @%d takes mixed loaded/unloaded exceptions in ", bci()); method()->print_name(); tty->cr(); } else if (PrintOpto && (Verbose || WizardMode)) { tty->print("Bailing out on unloaded exception type ");