提交 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) {
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);
}
}
}
}
......
......@@ -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++;
......
......@@ -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();
}
......
......@@ -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 ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册