changeset 22432:4369b936c520

SL: adopt FindContextNode as a child
author Andreas Woess <andreas.woess@oracle.com>
date Tue, 11 Aug 2015 03:00:55 +0200
parents ec8b73f15675
children b5d0f60a6ff5
files graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/builtins/SLCallFunctionsWithBuiltin.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/builtins/SLCallFunctionsWithBuiltin.java	Tue Aug 11 02:56:50 2015 +0200
+++ b/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/builtins/SLCallFunctionsWithBuiltin.java	Tue Aug 11 03:00:55 2015 +0200
@@ -37,11 +37,11 @@
 public abstract class SLCallFunctionsWithBuiltin extends SLGraalRuntimeBuiltin {
 
     @Child private IndirectCallNode indirectCall = Truffle.getRuntime().createIndirectCallNode();
+    @Child private Node findContextNode = SLLanguage.INSTANCE.createFindContextNode0();
 
     @Specialization
     public SLNull runTests(VirtualFrame frame, String startsWith, SLFunction harness) {
-        Node n = SLLanguage.INSTANCE.createFindContextNode0();
-        SLContext context = SLLanguage.INSTANCE.findContext0(n);
+        SLContext context = SLLanguage.INSTANCE.findContext0(findContextNode);
         boolean found = false;
         for (SLFunction function : context.getFunctionRegistry().getFunctions()) {
             if (function.getName().startsWith(startsWith) && getSource(function) == getSource(harness) && getSource(function) != null) {