# HG changeset patch # User Bernhard Urban # Date 1402040422 -7200 # Node ID da9b9b6258180a64b63fd61d4b17e96bbf3ad4e7 # Parent 7b37f1b6d188233932b60a2382d6e29f4bbf2cd3 Truffle FrameDescriptor: add compiler asserts diff -r 7b37f1b6d188 -r da9b9b625818 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerAssertsSubstitutions.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerAssertsSubstitutions.java Thu Jun 05 17:44:13 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerAssertsSubstitutions.java Fri Jun 06 09:40:22 2014 +0200 @@ -33,6 +33,9 @@ @MacroSubstitution(macro = NeverPartOfCompilationNode.class, isStatic = true) public static native void neverPartOfCompilation(); + @MacroSubstitution(macro = NeverPartOfCompilationNode.class, isStatic = true) + public static native void neverPartOfCompilation(String message); + @MacroSubstitution(macro = CompilationConstantNode.class, isStatic = true) public static native boolean compilationConstant(boolean value); diff -r 7b37f1b6d188 -r da9b9b625818 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerAsserts.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerAsserts.java Thu Jun 05 17:44:13 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerAsserts.java Fri Jun 06 09:40:22 2014 +0200 @@ -29,7 +29,7 @@ * either executed in the interpreter or in the compiled code. The assertions are checked during * code generation and the Truffle compiler produces for failing assertions a stack trace that * identifies the code position of the assertion in the context of the current compilation. - * + * */ public class CompilerAsserts { @@ -42,9 +42,12 @@ public static void neverPartOfCompilation() { } + public static void neverPartOfCompilation(@SuppressWarnings("unused") String message) { + } + /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -54,7 +57,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -64,7 +67,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -74,7 +77,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -84,7 +87,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -94,7 +97,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -104,7 +107,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -114,7 +117,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ @@ -124,7 +127,7 @@ /** * Assertion that the corresponding value is reduced to a constant during compilation. - * + * * @param value the value that must be constant during compilation * @return the value given as parameter */ diff -r 7b37f1b6d188 -r da9b9b625818 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameDescriptor.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameDescriptor.java Thu Jun 05 17:44:13 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameDescriptor.java Fri Jun 06 09:40:22 2014 +0200 @@ -57,6 +57,7 @@ } public FrameSlot addFrameSlot(Object identifier, FrameSlotKind kind) { + CompilerAsserts.neverPartOfCompilation("interpreter-only. includes hashmap operations."); assert !identifierToSlotMap.containsKey(identifier); FrameSlot slot = new FrameSlot(this, identifier, slots.size(), kind); slots.add(slot); @@ -87,6 +88,7 @@ } public void removeFrameSlot(Object identifier) { + CompilerAsserts.neverPartOfCompilation("interpreter-only. includes hashmap operations."); assert identifierToSlotMap.containsKey(identifier); slots.remove(identifierToSlotMap.get(identifier)); identifierToSlotMap.remove(identifier); @@ -104,7 +106,7 @@ /** * Retrieve the list of all the identifiers associated with this frame descriptor. - * + * * @return the list of all the identifiers in this frame descriptor */ public Set getIdentifiers() {