Mercurial > repos > rhope
diff nworker.rhope @ 83:27bb051d631c
Initial implementation of Dictionary
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 27 Jul 2010 23:33:31 -0400 |
parents | 2e2e55fc12f9 |
children | 3c4325e6298f |
line wrap: on
line diff
--- a/nworker.rhope Tue Jul 27 15:23:32 2010 -0400 +++ b/nworker.rhope Tue Jul 27 23:33:31 2010 -0400 @@ -806,7 +806,6 @@ Compile Node@NWorker[worker,program,func,nodes,current:out,out worker] { - Print[[[["Compile node: "]Append[[node]Type >>]]Append[", "]]Append[node index]] node index <- [nodes]Index[current] node <- [[worker]Nodes >>]Index[node index] conditions <- [node]Conditions >> @@ -987,19 +986,15 @@ _No Release[vars,node,index,worker:out] { - Print[["_No Release"]Append[[node]Type >>]] [("const","input")]Find[[node]Type >>] { [[node]Conditions >>]For Backend { - Print[["Const or input with conditions: "]Append[index]] out <- Result Var[vars, 0, index] }{ - Print[["Const or input with no conditions: "]Append[index]] out <- vars } }{ - Print[["Other node type: "]Append[index]] out <- vars } } @@ -1140,8 +1135,7 @@ } Compile Worker@NWorker[worker,program,name:out] -{ - Print[["Compile Worker: "]Append[[worker]Name >>]] +{ If[[worker]Builtin? >>] { out <- program @@ -1457,14 +1451,15 @@ Register Builtins@NProgram[prog:out] { - registered <- [[[[[[prog]Register Worker["Print", "rhope", 1, 1] + registered <- [[[[[[[prog]Register Worker["Print", "rhope", 1, 1] ]Register Worker["If@Boolean", "rhope", 1, 2] ]Register Worker["Build", "rhope", 1, 1] ]Register Worker["Blueprint Of", "rhope", 1, 1] ]Register Worker["Call@Worker", "rhope", 1, 2] //We're using 2 because we need to assume that the outputs are conditional + ]Register Worker["ID", "rhope", 1, 1] ]Register Number Methods - out <- [[[[[registered]Bind Worker["If@Boolean", + out <- [[[[[[registered]Bind Worker["If@Boolean", [[[[[NWorker["rhope"] ]Inputs <<[("condition")] ]Input Types <<[ [()]Append[Type Instance["Boolean"]] ] @@ -1499,6 +1494,13 @@ ]Outputs <<[("ret1","ret2")] ]Output Types <<[ [[()]Append[Type Instance["Any Type"]]]Append[Type Instance["Any Type"]] ] ]Builtin? << [Yes]] + ]Bind Worker["ID", + [[[[[NWorker["rhope"] + ]Inputs <<[("bp")] + ]Input Types <<[ [()]Append[Type Instance["Blueprint"]]] + ]Outputs <<[("id")] + ]Output Types <<[ [()]Append[Type Instance["UInt32"]]] + ]Builtin? << [Yes]] } Find Worker@NProgram[prog, name:out,notfound]