changeset 11897:992508ee13b6

Adjustment to unsafe customization macro node.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 05 Oct 2013 15:01:01 +0200
parents ec267141f753
children f753092f608d
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/UnsafeCustomizationMacroNode.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java
diffstat 3 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/UnsafeCustomizationMacroNode.java	Fri Oct 04 11:56:18 2013 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/UnsafeCustomizationMacroNode.java	Sat Oct 05 15:01:01 2013 +0200
@@ -29,7 +29,7 @@
 import com.oracle.truffle.api.*;
 
 /**
- * Macro node for method {@link CompilerDirectives#unsafeCustomization(Object, Object, Object)}.
+ * Macro node for method {@link CompilerDirectives#unsafeCustomization(Object, boolean, Object)}.
  */
 public class UnsafeCustomizationMacroNode extends NeverPartOfCompilationNode implements Canonicalizable {
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java	Fri Oct 04 11:56:18 2013 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java	Sat Oct 05 15:01:01 2013 +0200
@@ -68,7 +68,4 @@
 
     @MacroSubstitution(macro = CustomTypeCheckMacroNode.class, isStatic = true)
     public static native boolean customTypeCheck(boolean condition, Object value, Object customType);
-
-    @MacroSubstitution(macro = UnsafeCustomizationMacroNode.class, isStatic = true)
-    public static native Object unsafeCustomization(Object receiver, Object customType, Object locationIdentity);
 }
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java	Fri Oct 04 11:56:18 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java	Sat Oct 05 15:01:01 2013 +0200
@@ -188,13 +188,13 @@
      * anywhere.
      * 
      * @param receiver the object that is accessed via sun.misc.Unsafe
-     * @param customType the expected type of the receiver object of follow-up unsafe accesses
+     * @param condition the condition that ifTrue allows this unsafe access to be floating
      * @param locationIdentity the location identity token that can be used for improved global
      *            value numbering or null
      * @return the accessed value
      */
     @Unsafe
-    public static Object unsafeCustomization(Object receiver, Object customType, Object locationIdentity) {
+    public static Object unsafeCustomization(Object receiver, boolean condition, Object locationIdentity) {
         return receiver;
     }