# HG changeset patch # User Thomas Wuerthinger # Date 1380978061 -7200 # Node ID 992508ee13b6a33addbc88a9fe10daec6c975bfe # Parent ec267141f753dab40bb4c8a05d9ca93cd4863f46 Adjustment to unsafe customization macro node. diff -r ec267141f753 -r 992508ee13b6 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/UnsafeCustomizationMacroNode.java --- 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 { diff -r ec267141f753 -r 992508ee13b6 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java --- 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); } diff -r ec267141f753 -r 992508ee13b6 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java --- 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; }