-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8e3603
commit 7cd7dc6
Showing
6 changed files
with
88 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 22 additions & 1 deletion
23
snapi-truffle/src/main/java/raw/runtime/truffle/ast/expressions/function/LambdaNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
package raw.runtime.truffle.ast.expressions.function; | ||
|
||
public class LambdaNode {} | ||
import com.oracle.truffle.api.CompilerDirectives; | ||
import com.oracle.truffle.api.RootCallTarget; | ||
import com.oracle.truffle.api.frame.VirtualFrame; | ||
import com.oracle.truffle.api.nodes.ExplodeLoop; | ||
import raw.runtime.truffle.ExpressionNode; | ||
import raw.runtime.truffle.runtime.function.Function; | ||
import raw.runtime.truffle.runtime.function.Lambda; | ||
|
||
public class LambdaNode extends ExpressionNode { | ||
|
||
@CompilerDirectives.CompilationFinal private final RootCallTarget callTarget; | ||
|
||
public LambdaNode(Function f) { | ||
callTarget = f.getCallTarget(); | ||
} | ||
|
||
@Override | ||
@ExplodeLoop | ||
public Object executeGeneric(VirtualFrame virtualFrame) { | ||
return new Lambda(callTarget, virtualFrame); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters