Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/FibonacciTest.java @ 13455:69d2e4baa215
Truffle: new infrastructure related to instrumentation, and in particular debugging: support for managing Source objects; framework for generalized "instrumentation proxy nodes" (to be inserted into ASTs with no runtime cost when inactive), and "probes" (which can be attached to proxy nodes to receive event notification); a rudimentary interface and abstract implementation for a "debug manager" (mostly a placeholder at this point); and the beginning of a language-agnostic ExecutionContext interface.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Tue, 17 Dec 2013 20:22:45 -0800 |
parents | 71991b7a0f14 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/FibonacciTest.java Thu Dec 12 14:56:52 2013 -0800 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/FibonacciTest.java Tue Dec 17 20:22:45 2013 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ import org.junit.*; +import com.oracle.truffle.api.*; import com.oracle.truffle.sl.*; import com.oracle.truffle.sl.runtime.*; @@ -75,7 +76,9 @@ for (String line : INPUT) { s.append(line).append("\n"); } - SLScript script = SLScript.create(new SLContext(System.out), s.toString()); + final SLContext context = new SLContext(System.out); + final Source source = context.getSourceManager().get("(fib test)", s.toString()); + SLScript script = SLScript.create(context, source); Integer reference = test(TEST_VALUE); for (int i = 0; i < ITERATIONS; i++) { if (!reference.equals(script.run(TEST_VALUE))) {