diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java @ 1465:2c754f3a2722

Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Thu, 18 Nov 2010 17:27:43 +0100
parents 9e5e83ca2259
children 79d04223b8a5
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java	Mon Nov 15 11:06:38 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java	Thu Nov 18 17:27:43 2010 +0100
@@ -37,6 +37,7 @@
     private final String name;
     private final RiType type;
     private final int offset;
+    private CiConstant constant;
 
     public HotSpotField(RiType holder, String name, RiType type, int offset) {
         this.holder = holder;
@@ -53,7 +54,10 @@
 
     @Override
     public CiConstant constantValue(Object object) {
-        // TODO Auto-generated method stub
+        if (object == null) {
+            // Constant part only valid for static fields.
+            return constant;
+        }
         return null;
     }