diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectTypeImpl.java @ 18361:6ac7e9c85be6

Split getEncoding into two methods.
author Roland Schatz <roland.schatz@oracle.com>
date Wed, 12 Nov 2014 16:59:39 +0100
parents 301c5e3d683a
children 91283d4a1218
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectTypeImpl.java	Wed Nov 12 11:48:54 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectTypeImpl.java	Wed Nov 12 16:59:39 2014 +0100
@@ -278,15 +278,13 @@
     }
 
     @Override
-    public JavaConstant getEncoding(Representation r) {
-        switch (r) {
-            case JavaClass:
-                return HotSpotObjectConstantImpl.forObject(mirror());
-            case ObjectHub:
-                return klass();
-            default:
-                throw GraalInternalError.shouldNotReachHere("unexpected representation " + r);
-        }
+    public JavaConstant getJavaClass() {
+        return HotSpotObjectConstantImpl.forObject(mirror());
+    }
+
+    @Override
+    public JavaConstant getObjectHub() {
+        return klass();
     }
 
     @Override