hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
changeset 3688 22b55d147bc1
parent 2131 98f9cef66a34
child 3800 3195b4844b5a
child 3795 6227ff014cfe
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Mon Aug 24 11:13:46 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Mon Aug 24 22:26:15 2009 -0700
@@ -1047,16 +1047,17 @@
     items->at_put(i, size);
   }
 
-  // need to get the info before, as the items may become invalid through item_free
+  // Evaluate state_for early since it may emit code.
   CodeEmitInfo* patching_info = NULL;
   if (!x->klass()->is_loaded() || PatchALot) {
     patching_info = state_for(x, x->state_before());
 
     // cannot re-use same xhandlers for multiple CodeEmitInfos, so
-    // clone all handlers.
+    // clone all handlers.  This is handled transparently in other
+    // places by the CodeEmitInfo cloning logic but is handled
+    // specially here because a stub isn't being used.
     x->set_exception_handlers(new XHandlers(x->exception_handlers()));
   }
-
   CodeEmitInfo* info = state_for(x, x->state());
 
   i = dims->length();