changeset 15235:27afd57655ba

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 18 Apr 2014 14:09:27 +0200
parents 7aa0ef5348e5 (current diff) 25a18b4a5b90 (diff)
children c8d4ace5b78c
files
diffstat 3 files changed, 99 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.output	Fri Apr 18 14:02:40 2014 +0200
+++ b/graal/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.output	Fri Apr 18 14:09:27 2014 +0200
@@ -0,0 +1,90 @@
+Initial stack trace:
+Frame: root doIt, a=0, hello=null
+Frame: root main, i=0
+After 123 assignment:
+Frame: root doIt, a=0, hello=123
+Frame: root main, i=0
+After hello assignment:
+Frame: root doIt, a=0, hello=world
+Frame: root main, i=0
+Initial stack trace:
+Frame: root doIt, a=1, hello=null
+Frame: root main, i=1
+After 123 assignment:
+Frame: root doIt, a=1, hello=123
+Frame: root main, i=1
+After hello assignment:
+Frame: root doIt, a=1, hello=world
+Frame: root main, i=1
+Initial stack trace:
+Frame: root doIt, a=2, hello=null
+Frame: root main, i=2
+After 123 assignment:
+Frame: root doIt, a=2, hello=123
+Frame: root main, i=2
+After hello assignment:
+Frame: root doIt, a=2, hello=world
+Frame: root main, i=2
+Initial stack trace:
+Frame: root doIt, a=3, hello=null
+Frame: root main, i=3
+After 123 assignment:
+Frame: root doIt, a=3, hello=123
+Frame: root main, i=3
+After hello assignment:
+Frame: root doIt, a=3, hello=world
+Frame: root main, i=3
+Initial stack trace:
+Frame: root doIt, a=4, hello=null
+Frame: root main, i=4
+After 123 assignment:
+Frame: root doIt, a=4, hello=123
+Frame: root main, i=4
+After hello assignment:
+Frame: root doIt, a=4, hello=world
+Frame: root main, i=4
+Initial stack trace:
+Frame: root doIt, a=5, hello=null
+Frame: root main, i=5
+After 123 assignment:
+Frame: root doIt, a=5, hello=123
+Frame: root main, i=5
+After hello assignment:
+Frame: root doIt, a=5, hello=world
+Frame: root main, i=5
+Initial stack trace:
+Frame: root doIt, a=6, hello=null
+Frame: root main, i=6
+After 123 assignment:
+Frame: root doIt, a=6, hello=123
+Frame: root main, i=6
+After hello assignment:
+Frame: root doIt, a=6, hello=world
+Frame: root main, i=6
+Initial stack trace:
+Frame: root doIt, a=7, hello=null
+Frame: root main, i=7
+After 123 assignment:
+Frame: root doIt, a=7, hello=123
+Frame: root main, i=7
+After hello assignment:
+Frame: root doIt, a=7, hello=world
+Frame: root main, i=7
+Initial stack trace:
+Frame: root doIt, a=8, hello=null
+Frame: root main, i=8
+After 123 assignment:
+Frame: root doIt, a=8, hello=123
+Frame: root main, i=8
+After hello assignment:
+Frame: root doIt, a=8, hello=world
+Frame: root main, i=8
+Initial stack trace:
+Frame: root doIt, a=9, hello=null
+Frame: root main, i=9
+After 123 assignment:
+Frame: root doIt, a=9, hello=123
+Frame: root main, i=9
+After hello assignment:
+Frame: root doIt, a=9, hello=world
+Frame: root main, i=9
\ No newline at end of file
--- a/graal/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.sl	Fri Apr 18 14:02:40 2014 +0200
+++ b/graal/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.sl	Fri Apr 18 14:09:27 2014 +0200
@@ -1,14 +1,14 @@
 function doIt(a) {
-//  println("Initial stack trace:");
-//  println(stacktrace());
+  println("Initial stack trace:");
+  println(stacktrace());
   
   hello = 123;
-//  println("After 123 assignment:");
-//  println(stacktrace());
+  println("After 123 assignment:");
+  println(stacktrace());
   
-//  helloEqualsWorld();
-//  println("After hello assignment:");
-//  println(stacktrace());
+  helloEqualsWorld();
+  println("After hello assignment:");
+  println(stacktrace());
   
 //  readln();
 }
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLHelloEqualsWorldBuiltin.java	Fri Apr 18 14:02:40 2014 +0200
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLHelloEqualsWorldBuiltin.java	Fri Apr 18 14:09:27 2014 +0200
@@ -35,11 +35,11 @@
 public abstract class SLHelloEqualsWorldBuiltin extends SLBuiltinNode {
 
     @Specialization
-    public Object change() {
+    public String change() {
         FrameInstance frameInstance = Truffle.getRuntime().getStackTrace().iterator().next();
         Frame frame = frameInstance.getFrame(FrameAccess.READ_WRITE, false);
         FrameSlot slot = frame.getFrameDescriptor().findOrAddFrameSlot("hello");
         frame.setObject(slot, "world");
-        return null;
+        return "world";
     }
 }