Mercurial > repos > rhope
diff testc.rhope @ 18:ea991f95ae1f
C backend working well enough to generate Fib test
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 27 May 2009 04:49:32 -0400 |
parents | 69dfca29565f |
children | 90c20dc3f4e5 |
line wrap: on
line diff
--- a/testc.rhope Tue May 26 23:37:59 2009 -0400 +++ b/testc.rhope Wed May 27 04:49:32 2009 -0400 @@ -15,18 +15,28 @@ ]Release[Result[0]] ]Move[AddRef[Constant["const_1"]], "out"] {Print["stream1 done"]} + + stream3 <- [[[base]Instruction Stream + ]Release["n"] + ]Tail Method Call["+", ("work1","work2")] - stream2 <- [[[[[[base]Instruction Stream + stream2 <- [[[[[[[[[[[base]Instruction Stream ]Release[Result[0]] ]Method Call["-", [[()]Append[AddRef["n"]]]Append[AddRef[Constant["const_1"]]]] ]Move[Result[0], "work1"] ]Method Call["-", [[()]Append[AddRef["n"]]]Append[AddRef[Constant["const_2"]]]] ]Move[Result[0], "work2"] + ]Call["Fib", ("work1")] + ]Move[Result[0], "work1"] + ]Call["Fib", ("work2")] + ]Move[Result[0], "work2"] + ]Do If[NotCond["out"], stream3] {Print["stream2 done"]} - func <- [[base + func <- [[[base ]Do If[Result[0], stream1] ]Do If[Result[1], stream2] + ]Release["n"] {Print["func done"] } Print[[func]Definitions]