diff src/share/vm/graal/graalCodeInstaller.cpp @ 4181:319860ae697a

Simplify FrameMap: make offsets of spill slots and outgoing parameters independent so that they can be allocated at the same time, eliminating the separate phases. This makes the separate StackBlock unnecesary. Change CiStackSlot to use byte offsets instead of spill slot index. This makes CiTarget.spillSlotSize unnecessary.
author Christian Wimmer <Christian.Wimmer@Oracle.com>
date Mon, 02 Jan 2012 14:16:08 -0800
parents 79c91d220d73
children 5c80ccb80036
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp	Mon Jan 02 22:18:16 2012 +0100
+++ b/src/share/vm/graal/graalCodeInstaller.cpp	Mon Jan 02 14:16:08 2012 -0800
@@ -147,13 +147,11 @@
     } else if (type == T_LONG) {
       locationType = Location::lng;
     }
-    jint index = CiStackSlot::index(value);
-    ScopeValue* value;
-    if (index >= 0) {
-      value = new LocationValue(Location::new_stk_loc(locationType, index * HeapWordSize));
-    } else {
-      value = new LocationValue(Location::new_stk_loc(locationType, -((index + 1) * HeapWordSize) + total_frame_size));
+    jint offset = CiStackSlot::offset(value);
+    if (CiStackSlot::addFrameSize(value)) {
+      offset += total_frame_size;
     }
+    ScopeValue* value = new LocationValue(Location::new_stk_loc(locationType, offset));
     if (type == T_DOUBLE || type == T_LONG) {
       second = value;
     }