src/share/vm/runtime/vframe_hp.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/vframe_hp.cpp

Print this page




 181 
 182 
 183 // The implementation of the following two methods was factorized into the
 184 // class StackValue because it is also used from within deoptimization.cpp for
 185 // rematerialization and relocking of non-escaping objects.
 186 
 187 StackValue *compiledVFrame::create_stack_value(ScopeValue *sv) const {
 188   return StackValue::create_stack_value(&_fr, register_map(), sv);
 189 }
 190 
 191 BasicLock* compiledVFrame::resolve_monitor_lock(Location location) const {
 192   return StackValue::resolve_monitor_lock(&_fr, location);
 193 }
 194 
 195 
 196 GrowableArray<MonitorInfo*>* compiledVFrame::monitors() const {
 197   // Natives has no scope
 198   if (scope() == NULL) {
 199     CompiledMethod* nm = code();
 200     Method* method = nm->method();
 201     assert(method->is_native(), "");
 202     if (!method->is_synchronized()) {
 203       return new GrowableArray<MonitorInfo*>(0);
 204     }
 205     // This monitor is really only needed for UseBiasedLocking, but
 206     // return it in all cases for now as it might be useful for stack
 207     // traces and tools as well
 208     GrowableArray<MonitorInfo*> *monitors = new GrowableArray<MonitorInfo*>(1);
 209     // Casting away const
 210     frame& fr = (frame&) _fr;
 211     MonitorInfo* info = new MonitorInfo(
 212         fr.get_native_receiver(), fr.get_native_monitor(), false, false);
 213     monitors->push(info);
 214     return monitors;
 215   }
 216   GrowableArray<MonitorValue*>* monitors = scope()->monitors();
 217   if (monitors == NULL) {
 218     return new GrowableArray<MonitorInfo*>(0);
 219   }
 220   GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(monitors->length());
 221   for (int index = 0; index < monitors->length(); index++) {




 181 
 182 
 183 // The implementation of the following two methods was factorized into the
 184 // class StackValue because it is also used from within deoptimization.cpp for
 185 // rematerialization and relocking of non-escaping objects.
 186 
 187 StackValue *compiledVFrame::create_stack_value(ScopeValue *sv) const {
 188   return StackValue::create_stack_value(&_fr, register_map(), sv);
 189 }
 190 
 191 BasicLock* compiledVFrame::resolve_monitor_lock(Location location) const {
 192   return StackValue::resolve_monitor_lock(&_fr, location);
 193 }
 194 
 195 
 196 GrowableArray<MonitorInfo*>* compiledVFrame::monitors() const {
 197   // Natives has no scope
 198   if (scope() == NULL) {
 199     CompiledMethod* nm = code();
 200     Method* method = nm->method();
 201     assert(method->is_native() || nm->is_aot(), "Expect a native method or precompiled method");
 202     if (!method->is_synchronized()) {
 203       return new GrowableArray<MonitorInfo*>(0);
 204     }
 205     // This monitor is really only needed for UseBiasedLocking, but
 206     // return it in all cases for now as it might be useful for stack
 207     // traces and tools as well
 208     GrowableArray<MonitorInfo*> *monitors = new GrowableArray<MonitorInfo*>(1);
 209     // Casting away const
 210     frame& fr = (frame&) _fr;
 211     MonitorInfo* info = new MonitorInfo(
 212         fr.get_native_receiver(), fr.get_native_monitor(), false, false);
 213     monitors->push(info);
 214     return monitors;
 215   }
 216   GrowableArray<MonitorValue*>* monitors = scope()->monitors();
 217   if (monitors == NULL) {
 218     return new GrowableArray<MonitorInfo*>(0);
 219   }
 220   GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(monitors->length());
 221   for (int index = 0; index < monitors->length(); index++) {


src/share/vm/runtime/vframe_hp.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File