Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TypedNode.java @ 12752:71991b7a0f14
SL: Enhanced SimpleLanguage with support for if statements, function calls, function caching + inlining and builtins.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Nov 2013 21:34:44 +0100 |
parents | 1964871a642d |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TypedNode.java Thu Nov 07 20:55:13 2013 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TypedNode.java Mon Nov 11 21:34:44 2013 +0100 @@ -24,9 +24,11 @@ import java.math.*; +import com.oracle.truffle.api.*; import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.nodes.*; import com.oracle.truffle.sl.*; +import com.oracle.truffle.sl.runtime.*; public abstract class TypedNode extends ConditionNode { @@ -57,8 +59,20 @@ return SLTypesGen.SLTYPES.expectString(executeGeneric(frame)); } + public CallTarget executeCallTarget(VirtualFrame frame) throws UnexpectedResultException { + return SLTypesGen.SLTYPES.expectCallTarget(executeGeneric(frame)); + } + + public Object[] executeArray(VirtualFrame frame) throws UnexpectedResultException { + return SLTypesGen.SLTYPES.expectObjectArray(executeGeneric(frame)); + } + + public SLNull executeNull(VirtualFrame frame) throws UnexpectedResultException { + return SLTypesGen.SLTYPES.expectSLNull(executeGeneric(frame)); + } + @Override - public void executeVoid(VirtualFrame frame) { + public final void executeVoid(VirtualFrame frame) { executeGeneric(frame); } @@ -66,19 +80,4 @@ return a instanceof String || b instanceof String; } - @SuppressWarnings("unused") - public Object executeEvaluated(VirtualFrame frame, Object val1) { - return executeGeneric(frame); - } - - @SuppressWarnings("unused") - public Object executeEvaluated(VirtualFrame frame, Object val1, Object val2) { - return executeEvaluated(frame, val1); - } - - @SuppressWarnings("unused") - public Object executeEvaluated(VirtualFrame frame, Object val1, Object val2, Object val3) { - return executeEvaluated(frame, val1, val2); - } - }