Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CallTarget.java @ 14991:64dcb92ee75a
Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 06 Apr 2014 17:46:24 +0200 |
parents | a12017c18d5d |
children | f675818d9ad0 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CallTarget.java Sat Apr 05 19:35:30 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CallTarget.java Sun Apr 06 17:46:24 2014 +0200 @@ -24,48 +24,22 @@ */ package com.oracle.truffle.api; -import com.oracle.truffle.api.frame.*; - /** * Represents the target of a call. */ public abstract class CallTarget { - /** - * Calls this target as a root method and without arguments. - * - * @return the return result of the call - */ - public final Object call() { - return call(null, Arguments.EMPTY_ARGUMENTS); - } + public static final Object[] NO_ARGUMENTS = new Object[0]; /** - * Calls this target with a caller frame and no arguments. - * - * @param caller the caller frame + * Calls this target as a root method.. + * + * @param arguments passed arguments as an object array * @return the return result of the call */ - public final Object call(PackedFrame caller) { - return call(caller, Arguments.EMPTY_ARGUMENTS); - } + public abstract Object call(Object[] arguments); - /** - * Calls this target as a root method passing arguments. - * - * @param arguments the arguments that should be passed to the callee - * @return the return result of the call - */ - public final Object call(Arguments arguments) { - return call(null, arguments); + public final Object call() { + return call(NO_ARGUMENTS); } - - /** - * Calls this target passing a caller frame and arguments. - * - * @param caller the caller frame - * @param arguments the arguments that should be passed to the callee - * @return the return result of the call - */ - public abstract Object call(PackedFrame caller, Arguments arguments); }