# HG changeset patch # User twisti # Date 1343430855 25200 # Node ID 1ef07ae0723dcdd4580d171f55aeab331d6105f8 # Parent 30245956af37ffb58f0e881c13fc40c700b67c23 7187290: nightly failures after JSR 292 lazy method handle update Reviewed-by: kvn, twisti diff -r 30245956af37 -r 1ef07ae0723d hotspot/src/share/vm/c1/c1_GraphBuilder.cpp --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Tue Jul 24 10:51:00 2012 -0700 +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Fri Jul 27 16:14:15 2012 -0700 @@ -1569,31 +1569,33 @@ 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 -r 30245956af37 -r 1ef07ae0723d hotspot/src/share/vm/classfile/javaClasses.cpp --- a/hotspot/src/share/vm/classfile/javaClasses.cpp Tue Jul 24 10:51:00 2012 -0700 +++ b/hotspot/src/share/vm/classfile/javaClasses.cpp Fri Jul 27 16:14:15 2012 -0700 @@ -1462,7 +1462,7 @@ 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 @@ } 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 -r 30245956af37 -r 1ef07ae0723d hotspot/src/share/vm/oops/methodOop.cpp --- a/hotspot/src/share/vm/oops/methodOop.cpp Tue Jul 24 10:51:00 2012 -0700 +++ b/hotspot/src/share/vm/oops/methodOop.cpp Fri Jul 27 16:14:15 2012 -0700 @@ -582,7 +582,8 @@ 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 @@ 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 -r 30245956af37 -r 1ef07ae0723d hotspot/src/share/vm/opto/doCall.cpp --- a/hotspot/src/share/vm/opto/doCall.cpp Tue Jul 24 10:51:00 2012 -0700 +++ b/hotspot/src/share/vm/opto/doCall.cpp Fri Jul 27 16:14:15 2012 -0700 @@ -641,8 +641,8 @@ #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 ");