< prev index next >

src/hotspot/share/runtime/vframe_hp.cpp

Print this page
*** 232,14 ***
    const_cast<RegisterMap*>(&_reg_map)->set_stack_chunk(c);
    const_cast<RegisterMap*>(&_reg_map)->set_stack_chunk_index(index);
    return res;
  }
  
- BasicLock* compiledVFrame::resolve_monitor_lock(Location location) const {
-   return StackValue::resolve_monitor_lock(&_fr, location);
- }
- 
  
  GrowableArray<MonitorInfo*>* compiledVFrame::monitors() const {
    // Natives has no scope
    if (scope() == NULL) {
      CompiledMethod* nm = code();
--- 232,10 ---

*** 252,11 ***
      // useful for stack traces and tools
      GrowableArray<MonitorInfo*> *monitors = new GrowableArray<MonitorInfo*>(1);
      // Casting away const
      frame& fr = (frame&) _fr;
      MonitorInfo* info = new MonitorInfo(
!         fr.get_native_receiver(), fr.get_native_monitor(), false, false);
      monitors->push(info);
      return monitors;
    }
    GrowableArray<MonitorValue*>* monitors = scope()->monitors();
    if (monitors == NULL) {
--- 248,11 ---
      // useful for stack traces and tools
      GrowableArray<MonitorInfo*> *monitors = new GrowableArray<MonitorInfo*>(1);
      // Casting away const
      frame& fr = (frame&) _fr;
      MonitorInfo* info = new MonitorInfo(
!         fr.get_native_receiver(), false, false);
      monitors->push(info);
      return monitors;
    }
    GrowableArray<MonitorValue*>* monitors = scope()->monitors();
    if (monitors == NULL) {

*** 272,15 ***
        // Put klass for scalar replaced object.
        ScopeValue* kv = ((ObjectValue *)ov)->klass();
        assert(kv->is_constant_oop(), "klass should be oop constant for scalar replaced object");
        Handle k(Thread::current(), ((ConstantOopReadValue*)kv)->value()());
        assert(java_lang_Class::is_instance(k()), "must be");
!       result->push(new MonitorInfo(k(), resolve_monitor_lock(mv->basic_lock()),
-                                    mv->eliminated(), true));
      } else {
!       result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock()),
-                                    mv->eliminated(), false));
      }
    }
  
    // Replace the original values with any stores that have been
    // performed through compiledVFrame::update_monitors.
--- 268,13 ---
        // Put klass for scalar replaced object.
        ScopeValue* kv = ((ObjectValue *)ov)->klass();
        assert(kv->is_constant_oop(), "klass should be oop constant for scalar replaced object");
        Handle k(Thread::current(), ((ConstantOopReadValue*)kv)->value()());
        assert(java_lang_Class::is_instance(k()), "must be");
!       result->push(new MonitorInfo(k(), mv->eliminated(), true));
      } else {
!       result->push(new MonitorInfo(owner_sv->get_obj()(), mv->eliminated(), false));
      }
    }
  
    // Replace the original values with any stores that have been
    // performed through compiledVFrame::update_monitors.

*** 510,12 ***
        int lock_index = val->index() - (method()->max_locals() + method()->max_stack());
        MonitorInfo* info = monitors->at(lock_index);
        // Originally the owner may have been scalar replaced but as an update
        // exists it must have been deoptimized, i.e. reallocated to the heap, and
        // now it is considered not to be scalar replaced.
!       MonitorInfo* new_info = new MonitorInfo((oopDesc*)val->value().l, info->lock(),
-                                               info->eliminated(), false);
        monitors->at_put(lock_index, new_info);
      }
    }
  }
  
--- 504,11 ---
        int lock_index = val->index() - (method()->max_locals() + method()->max_stack());
        MonitorInfo* info = monitors->at(lock_index);
        // Originally the owner may have been scalar replaced but as an update
        // exists it must have been deoptimized, i.e. reallocated to the heap, and
        // now it is considered not to be scalar replaced.
!       MonitorInfo* new_info = new MonitorInfo((oopDesc*)val->value().l, info->eliminated(), false);
        monitors->at_put(lock_index, new_info);
      }
    }
  }
  
< prev index next >