< prev index next >

src/hotspot/share/runtime/vframe_hp.cpp

Print this page
@@ -33,13 +33,15 @@
  #include "interpreter/oopMapCache.hpp"
  #include "oops/instanceKlass.hpp"
  #include "oops/oop.inline.hpp"
  #include "prims/jvmtiDeferredUpdates.hpp"
  #include "runtime/basicLock.hpp"
+ #include "runtime/continuation.hpp"
  #include "runtime/frame.inline.hpp"
  #include "runtime/handles.inline.hpp"
  #include "runtime/monitorChunk.hpp"
+ #include "runtime/registerMap.hpp"
  #include "runtime/signature.hpp"
  #include "runtime/stubRoutines.hpp"
  #include "runtime/vframeArray.hpp"
  #include "runtime/vframe_hp.hpp"
  #ifdef COMPILER2

@@ -63,17 +65,19 @@
      result->add(create_stack_value(scv_list->at(i)));
    }
  
    // Replace the original values with any stores that have been
    // performed through compiledVFrame::update_locals.
-   GrowableArray<jvmtiDeferredLocalVariableSet*>* list = JvmtiDeferredUpdates::deferred_locals(thread());
-   if (list != NULL ) {
-     // In real life this never happens or is typically a single element search
-     for (int i = 0; i < list->length(); i++) {
-       if (list->at(i)->matches(this)) {
-         list->at(i)->update_locals(result);
-         break;
+   if (!register_map()->in_cont()) { // LOOM TODO
+     GrowableArray<jvmtiDeferredLocalVariableSet*>* list = JvmtiDeferredUpdates::deferred_locals(thread());
+     if (list != NULL ) {
+       // In real life this never happens or is typically a single element search
+       for (int i = 0; i < list->length(); i++) {
+         if (list->at(i)->matches(this)) {
+           list->at(i)->update_locals(result);
+           break;
+         }
        }
      }
    }
  
    return result;

@@ -102,10 +106,11 @@
    update_deferred_value(T_OBJECT, index + method()->max_locals() + method()->max_stack(), value);
  }
  
  void compiledVFrame::update_deferred_value(BasicType type, int index, jvalue value) {
    assert(fr().is_deoptimized_frame(), "frame must be scheduled for deoptimization");
+   assert(!Continuation::is_frame_in_continuation(thread(), fr()), "No support for deferred values in continuations");
    GrowableArray<jvmtiDeferredLocalVariableSet*>* deferred = JvmtiDeferredUpdates::deferred_locals(thread());
    jvmtiDeferredLocalVariableSet* locals = NULL;
    if (deferred != NULL ) {
      // See if this vframe has already had locals with deferred writes
      for (int f = 0; f < deferred->length(); f++ ) {

@@ -191,19 +196,21 @@
    StackValueCollection* result = new StackValueCollection(length);
    for (int i = 0; i < length; i++) {
      result->add(create_stack_value(scv_list->at(i)));
    }
  
-   // Replace the original values with any stores that have been
-   // performed through compiledVFrame::update_stack.
-   GrowableArray<jvmtiDeferredLocalVariableSet*>* list = JvmtiDeferredUpdates::deferred_locals(thread());
-   if (list != NULL ) {
-     // In real life this never happens or is typically a single element search
-     for (int i = 0; i < list->length(); i++) {
-       if (list->at(i)->matches(this)) {
-         list->at(i)->update_stack(result);
-         break;
+   if (!register_map()->in_cont()) { // LOOM TODO
+     // Replace the original values with any stores that have been
+     // performed through compiledVFrame::update_stack.
+     GrowableArray<jvmtiDeferredLocalVariableSet*>* list = JvmtiDeferredUpdates::deferred_locals(thread());
+     if (list != NULL ) {
+       // In real life this never happens or is typically a single element search
+       for (int i = 0; i < list->length(); i++) {
+         if (list->at(i)->matches(this)) {
+           list->at(i)->update_stack(result);
+           break;
+         }
        }
      }
    }
  
    return result;

@@ -213,11 +220,17 @@
  // The implementation of the following two methods was factorized into the
  // class StackValue because it is also used from within deoptimization.cpp for
  // rematerialization and relocking of non-escaping objects.
  
  StackValue *compiledVFrame::create_stack_value(ScopeValue *sv) const {
-   return StackValue::create_stack_value(&_fr, register_map(), sv);
+   stackChunkOop c = _reg_map.stack_chunk()();
+   const_cast<RegisterMap*>(&_reg_map)->set_stack_chunk(_chunk());
+ 
+   StackValue* res = StackValue::create_stack_value(&_fr, register_map(), sv);
+   
+   const_cast<RegisterMap*>(&_reg_map)->set_stack_chunk(c);
+   return res;
  }
  
  BasicLock* compiledVFrame::resolve_monitor_lock(Location location) const {
    return StackValue::resolve_monitor_lock(&_fr, location);
  }
< prev index next >