From ffb65f00615ba524298b39e676debf45af4a13cb Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 24 Oct 2011 16:34:55 +0000 Subject: First end-to-end implementation of a runtime re... First end-to-end implementation of a runtime reflexive compiler that generates and loads bytecodes. Review by szeiger. --- test/files/run/code.check | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/files/run/code.check (limited to 'test/files/run/code.check') diff --git a/test/files/run/code.check b/test/files/run/code.check new file mode 100644 index 0000000000..b946554fda --- /dev/null +++ b/test/files/run/code.check @@ -0,0 +1,29 @@ +testing: ((x: Int) => x.$plus(ys.length)) +result = ((x: Int) => x.+{(x: )Int}(ys.length{Int}){Int}){Int => Int} +evaluated = +testing: (() => { + val e: Element = new Element("someName"); + e +}) +result = (() => { + val e: Element = new Element{Element}{(name: )Element}("someName"{String("someName")}){Element}; + e{Element} +}{Element}){() => Element} +evaluated = Element(someName) +testing: (() => truc.elem = 6) +result = (() => truc.elem{Int} = 6{Int(6)}{Unit}){() => Unit} +evaluated = null +testing: (() => truc.elem = truc.elem.$plus(6)) +result = (() => truc.elem{Int} = truc.elem.+{(x: )Int}(6{Int(6)}){Int}{Unit}){() => Unit} +evaluated = null +testing: (() => new baz.BazElement("someName")) +result = (() => new baz.BazElement{baz.BazElement}{(name: )baz.BazElement}("someName"{String("someName")}){baz.BazElement}){() => baz.BazElement} +evaluated = BazElement(someName) +testing: ((x: Int) => x.$plus(ys.length)) +result = ((x: Int) => x.+{(x: )Int}(ys.length{Int}){Int}){Int => Int} +evaluated = +static: 2 +testing: (() => x.$plus(1)) +result = (() => x.+{(x: )Int}(1{Int(1)}){Int}){() => Int} +evaluated = 2 +1+1 = 2 -- cgit v1.2.3