提交 e8af7ab5 编写于 作者: T twisti

7187290: nightly failures after JSR 292 lazy method handle update

Reviewed-by: kvn, twisti
上级 8bc37f7e
...@@ -1569,31 +1569,33 @@ void GraphBuilder::access_field(Bytecodes::Code code) { ...@@ -1569,31 +1569,33 @@ void GraphBuilder::access_field(Bytecodes::Code code) {
ObjectType* obj_type = obj->type()->as_ObjectType(); ObjectType* obj_type = obj->type()->as_ObjectType();
if (obj_type->is_constant() && !PatchALot) { if (obj_type->is_constant() && !PatchALot) {
ciObject* const_oop = obj_type->constant_value(); ciObject* const_oop = obj_type->constant_value();
if (field->is_constant()) { if (!const_oop->is_null_object()) {
ciConstant field_val = field->constant_value_of(const_oop); if (field->is_constant()) {
BasicType field_type = field_val.basic_type(); ciConstant field_val = field->constant_value_of(const_oop);
switch (field_type) { BasicType field_type = field_val.basic_type();
case T_ARRAY: switch (field_type) {
case T_OBJECT: case T_ARRAY:
if (field_val.as_object()->should_be_constant()) { 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)); constant = new Constant(as_ValueType(field_val));
} }
break; } else {
default: // For CallSite objects treat the target field as a compile time constant.
constant = new Constant(as_ValueType(field_val)); if (const_oop->is_call_site()) {
} ciCallSite* call_site = const_oop->as_call_site();
} else { if (field->is_call_site_target()) {
// For constant CallSites treat the target field as a compile time constant. ciMethodHandle* target = call_site->get_target();
if (const_oop->is_call_site()) { if (target != NULL) { // just in case
ciCallSite* call_site = const_oop->as_call_site(); ciConstant field_val(T_OBJECT, target);
if (field->is_call_site_target()) { constant = new Constant(as_ValueType(field_val));
ciMethodHandle* target = call_site->get_target(); // Add a dependence for invalidation of the optimization.
if (target != NULL) { // just in case if (!call_site->is_constant_call_site()) {
ciConstant field_val(T_OBJECT, target); dependency_recorder()->assert_call_site_target_value(call_site, 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);
} }
} }
} }
......
...@@ -1462,7 +1462,7 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, methodHandle met ...@@ -1462,7 +1462,7 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, methodHandle met
nmethod* nm = NULL; nmethod* nm = NULL;
bool skip_fillInStackTrace_check = false; bool skip_fillInStackTrace_check = false;
bool skip_throwableInit_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;) { for (frame fr = thread->last_frame(); max_depth != total_count;) {
methodOop method = NULL; methodOop method = NULL;
...@@ -1544,9 +1544,6 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, methodHandle met ...@@ -1544,9 +1544,6 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, methodHandle met
} }
if (method->is_hidden()) { if (method->is_hidden()) {
if (skip_hidden) continue; if (skip_hidden) continue;
} else {
// start skipping hidden frames after first non-hidden frame
skip_hidden = !ShowHiddenFrames;
} }
bt.push(method, bci, CHECK); bt.push(method, bci, CHECK);
total_count++; total_count++;
......
...@@ -582,7 +582,8 @@ void methodOopDesc::set_native_function(address function, bool post_event_flag) ...@@ -582,7 +582,8 @@ void methodOopDesc::set_native_function(address function, bool post_event_flag)
bool methodOopDesc::has_native_function() const { 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(); address func = native_function();
return (func != NULL && func != SharedRuntime::native_method_throw_unsatisfied_link_error_entry()); 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 { ...@@ -612,6 +613,9 @@ bool methodOopDesc::is_not_compilable(int comp_level) const {
if (number_of_breakpoints() > 0) { if (number_of_breakpoints() > 0) {
return true; return true;
} }
if (is_method_handle_intrinsic()) {
return !is_synthetic(); // the generated adapters must be compiled
}
if (comp_level == CompLevel_any) { if (comp_level == CompLevel_any) {
return is_not_c1_compilable() || is_not_c2_compilable(); return is_not_c1_compilable() || is_not_c2_compilable();
} }
......
...@@ -641,8 +641,8 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) { ...@@ -641,8 +641,8 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) {
#ifndef PRODUCT #ifndef PRODUCT
// We do not expect the same handler bci to take both cold unloaded // We do not expect the same handler bci to take both cold unloaded
// and hot loaded exceptions. But, watch for it. // and hot loaded exceptions. But, watch for it.
if (extype->is_loaded()) { if ((Verbose || WizardMode) && extype->is_loaded()) {
tty->print_cr("Warning: Handler @%d takes mixed loaded/unloaded exceptions in "); tty->print("Warning: Handler @%d takes mixed loaded/unloaded exceptions in ", bci());
method()->print_name(); tty->cr(); method()->print_name(); tty->cr();
} else if (PrintOpto && (Verbose || WizardMode)) { } else if (PrintOpto && (Verbose || WizardMode)) {
tty->print("Bailing out on unloaded exception type "); tty->print("Bailing out on unloaded exception type ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册