1 /* |
1 /* |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
104 case T_LONG: |
104 case T_LONG: |
105 result->set_long_at(val->index(), val->value().j); |
105 result->set_long_at(val->index(), val->value().j); |
106 break; |
106 break; |
107 case T_OBJECT: |
107 case T_OBJECT: |
108 { |
108 { |
109 Handle obj((oop)val->value().l); |
109 Handle obj(Thread::current(), (oop)val->value().l); |
110 result->set_obj_at(val->index(), obj); |
110 result->set_obj_at(val->index(), obj); |
111 } |
111 } |
112 break; |
112 break; |
113 default: |
113 default: |
114 ShouldNotReachHere(); |
114 ShouldNotReachHere(); |
225 if (ov->is_object() && owner_sv->obj_is_scalar_replaced()) { // The owner object was scalar replaced |
225 if (ov->is_object() && owner_sv->obj_is_scalar_replaced()) { // The owner object was scalar replaced |
226 assert(mv->eliminated(), "monitor should be eliminated for scalar replaced object"); |
226 assert(mv->eliminated(), "monitor should be eliminated for scalar replaced object"); |
227 // Put klass for scalar replaced object. |
227 // Put klass for scalar replaced object. |
228 ScopeValue* kv = ((ObjectValue *)ov)->klass(); |
228 ScopeValue* kv = ((ObjectValue *)ov)->klass(); |
229 assert(kv->is_constant_oop(), "klass should be oop constant for scalar replaced object"); |
229 assert(kv->is_constant_oop(), "klass should be oop constant for scalar replaced object"); |
230 Handle k(((ConstantOopReadValue*)kv)->value()()); |
230 Handle k(Thread::current(), ((ConstantOopReadValue*)kv)->value()()); |
231 assert(java_lang_Class::is_instance(k()), "must be"); |
231 assert(java_lang_Class::is_instance(k()), "must be"); |
232 result->push(new MonitorInfo(k(), resolve_monitor_lock(mv->basic_lock()), |
232 result->push(new MonitorInfo(k(), resolve_monitor_lock(mv->basic_lock()), |
233 mv->eliminated(), true)); |
233 mv->eliminated(), true)); |
234 } else { |
234 } else { |
235 result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock()), |
235 result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock()), |