Mercurial > hg > truffle
changeset 18219:4a8dd0fdcc38
Truffle: remove CompilerDirectives.unsafeFrameCast
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Thu, 30 Oct 2014 16:32:31 +0100 |
parents | 8588db09f5e9 |
children | 890d284b2771 |
files | CHANGELOG.md 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, 2 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG.md Wed Oct 29 19:54:50 2014 +0100 +++ b/CHANGELOG.md Thu Oct 30 16:32:31 2014 +0100 @@ -31,6 +31,8 @@ * Added `NeverValidAssumption` to complement `AlwaysValidAssumption`. * Fixed a bug in `AssumedValue` that may not invalidate correctly. * New option, `-G:+/-TruffleCompilationExceptionsAreThrown`, that will throw an `OptimizationFailedException` for compiler errors. +* Removed `FrameTypeConversion` interface and changed the corresponding `FrameDescriptor` constructor to have a default value parameter instead. +* Removed `CompilerDirectives.unsafeFrameCast` (equivalent to a `(MaterializedFrame)` cast). ## Version 0.4 19-Aug-2014, [Repository Revision](http://hg.openjdk.java.net/graal/graal/shortlog/graal-0.4)
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java Wed Oct 29 19:54:50 2014 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/CompilerDirectivesSubstitutions.java Thu Oct 30 16:32:31 2014 +0100 @@ -29,12 +29,10 @@ import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*; -import com.oracle.graal.truffle.*; import com.oracle.graal.truffle.nodes.*; import com.oracle.graal.truffle.nodes.frame.*; import com.oracle.graal.truffle.nodes.typesystem.*; import com.oracle.truffle.api.*; -import com.oracle.truffle.api.frame.*; @ClassSubstitution(CompilerDirectives.class) public class CompilerDirectivesSubstitutions { @@ -79,11 +77,6 @@ @MacroSubstitution(macro = UnsafeTypeCastMacroNode.class, isStatic = true) public static native Object unsafeCast(Object value, Class<?> clazz, boolean condition, boolean nonNull); - @MethodSubstitution - private static Class<? extends MaterializedFrame> getUnsafeFrameType() { - return FrameWithoutBoxing.class; - } - @MacroSubstitution(macro = IsCompilationConstantNode.class, isStatic = true) public static native boolean isCompilationConstant(Object value);
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Wed Oct 29 19:54:50 2014 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Thu Oct 30 16:32:31 2014 +0100 @@ -30,8 +30,6 @@ import sun.misc.*; -import com.oracle.truffle.api.frame.*; - /** * Directives that influence the optimizations of the Truffle compiler. All of the operations have * no effect when executed in the Truffle interpreter. @@ -231,20 +229,6 @@ } /** - * Asserts that this value is not null and retrieved from a call to Frame.materialize. - * - * @param value the value that is known to have been obtained via Frame.materialize - * @return the value to be casted to the new type - */ - public static MaterializedFrame unsafeFrameCast(MaterializedFrame value) { - return unsafeCast(value, getUnsafeFrameType(), true, true); - } - - private static Class<? extends MaterializedFrame> getUnsafeFrameType() { - return MaterializedFrame.class; - } - - /** * Unsafe access to a boolean value within an object. The condition parameter gives a hint to * the compiler under which circumstances this access can be moved to an earlier location in the * program. The location identity gives a hint to the compiler for improved global value