changeset 10865:740789178ad8

Merge
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Tue, 23 Jul 2013 19:53:26 +0200
parents 6457dc4227e3 (diff) 8c570011b86f (current diff)
children df4d86530e21
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java
diffstat 5 files changed, 11 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.java	Tue Jul 23 19:05:08 2013 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.java	Tue Jul 23 19:53:26 2013 +0200
@@ -90,11 +90,11 @@
      * 
      * @param base the base address from which the value is read
      * @param displacement the displacement within the object in bytes
-     * @param compressedPointer whether this is a read of a compressed or an uncompressed pointer
+     * @param compressible whether this is a read of a compressed or an uncompressed pointer
      * @return the read value encapsulated in a {@link Constant} object, or {@code null} if the
      *         value cannot be read.
      */
-    Constant readUnsafeConstant(Kind kind, Object base, long displacement, boolean compressedPointer);
+    Constant readUnsafeConstant(Kind kind, Object base, long displacement, boolean compressible);
 
     /**
      * Determines if a given foreign call is side-effect free. Deoptimization cannot return
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java	Tue Jul 23 19:05:08 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java	Tue Jul 23 19:53:26 2013 +0200
@@ -200,12 +200,12 @@
         if (receiver == null) {
             assert Modifier.isStatic(flags);
             if (holder.isInitialized()) {
-                return graalRuntime().getRuntime().readUnsafeConstant(getKind(), holder.mirror(), offset, graalRuntime().getRuntime().config.useCompressedOops);
+                return graalRuntime().getRuntime().readUnsafeConstant(getKind(), holder.mirror(), offset, getKind() == Kind.Object);
             }
             return null;
         } else {
             assert !Modifier.isStatic(flags);
-            return graalRuntime().getRuntime().readUnsafeConstant(getKind(), receiver.asObject(), offset, graalRuntime().getRuntime().config.useCompressedOops);
+            return graalRuntime().getRuntime().readUnsafeConstant(getKind(), receiver.asObject(), offset, getKind() == Kind.Object);
         }
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java	Tue Jul 23 19:05:08 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java	Tue Jul 23 19:53:26 2013 +0200
@@ -1115,7 +1115,7 @@
     }
 
     @Override
-    public Constant readUnsafeConstant(Kind kind, Object base, long displacement, boolean compressedPointer) {
+    public Constant readUnsafeConstant(Kind kind, Object base, long displacement, boolean compressible) {
         switch (kind) {
             case Boolean:
                 return Constant.forBoolean(base == null ? unsafe.getByte(displacement) != 0 : unsafe.getBoolean(base, displacement));
@@ -1143,7 +1143,7 @@
                 return Constant.forDouble(base == null ? unsafe.getDouble(displacement) : unsafe.getDouble(base, displacement));
             case Object: {
                 Object o = null;
-                if (compressedPointer || !this.getGraalRuntime().getRuntime().config.useCompressedOops) {
+                if (compressible) {
                     o = unsafe.getObject(base, displacement);
                 } else {
                     o = this.getGraalRuntime().getCompilerToVM().readUnsafeUncompressedPointer(base, displacement);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Tue Jul 23 19:05:08 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Tue Jul 23 19:53:26 2013 +0200
@@ -70,7 +70,7 @@
         return graph().unique(new FloatingReadNode(object(), location(), lastLocationAccess, stamp(), getGuard(), getBarrierType(), isCompressible()));
     }
 
-    public static ValueNode canonicalizeRead(ValueNode read, LocationNode location, ValueNode object, CanonicalizerTool tool, boolean compressedPointer) {
+    public static ValueNode canonicalizeRead(ValueNode read, LocationNode location, ValueNode object, CanonicalizerTool tool, boolean compressible) {
         MetaAccessProvider runtime = tool.runtime();
         if (read.usages().count() == 0) {
             // Read without usages can be savely removed.
@@ -83,7 +83,7 @@
                 if (object.kind() == Kind.Object) {
                     Object base = object.asConstant().asObject();
                     if (base != null) {
-                        Constant constant = tool.runtime().readUnsafeConstant(kind, base, displacement, compressedPointer);
+                        Constant constant = tool.runtime().readUnsafeConstant(kind, base, displacement, compressible);
                         if (constant != null) {
                             return ConstantNode.forConstant(constant, runtime, read.graph());
                         }
@@ -91,7 +91,7 @@
                 } else if (object.kind() == Kind.Long || object.kind().getStackKind() == Kind.Int) {
                     long base = object.asConstant().asLong();
                     if (base != 0L) {
-                        Constant constant = tool.runtime().readUnsafeConstant(kind, null, base + displacement, compressedPointer);
+                        Constant constant = tool.runtime().readUnsafeConstant(kind, null, base + displacement, compressible);
                         if (constant != null) {
                             return ConstantNode.forConstant(constant, runtime, read.graph());
                         }
--- a/src/share/vm/runtime/arguments.cpp	Tue Jul 23 19:05:08 2013 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Tue Jul 23 19:53:26 2013 +0200
@@ -1,5 +1,4 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2206,16 +2205,6 @@
 #endif
   }
 #ifdef GRAAL
-  if (UseCompressedKlassPointers) {
-    if (IgnoreUnrecognizedVMOptions) {
-      FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, true);
-    } else {
-      status = true;
-    }
-  } else {
-    // This prevents the flag being set to true by set_ergonomics_flags()
-    FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, false);
-  }
   if (UseG1GC) {
       if (IgnoreUnrecognizedVMOptions) {
         warning("UseG1GC is still experimental in Graal, use SerialGC instead ");
@@ -2224,10 +2213,10 @@
         warning("UseG1GC is still experimental in Graal, use SerialGC instead ");
         status = true;
       }
-    } else {
+  } else {
       // This prevents the flag being set to true by set_ergonomics_flags()
       FLAG_SET_CMDLINE(bool, UseG1GC, false);
-    }
+  }
 
   if (!ScavengeRootsInCode) {
       warning("forcing ScavengeRootsInCode non-zero because Graal is enabled");