Mercurial > repos > rhope
comparison nworker_c.rhope @ 159:d1e206ff75f9
Fix some bugs involving calling a worker object
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Jan 2011 03:17:20 -0500 |
parents | 7bbdc034e347 |
children | 690ed78ead8a |
comparison
equal
deleted
inserted
replaced
158:0e06f29aa83d | 159:d1e206ff75f9 |
---|---|
211 } | 211 } |
212 | 212 |
213 Wire From@NWorker Node[node,to,input,output:out] | 213 Wire From@NWorker Node[node,to,input,output:out] |
214 { | 214 { |
215 existing cons <- [[node]Wires From >>]Index[output] {} | 215 existing cons <- [[node]Wires From >>]Index[output] {} |
216 { exist cons <- () } | 216 { existing cons <- () } |
217 out <- [node]Wires From <<[ | 217 out <- [node]Wires From <<[ |
218 [[node]Wires From >>]Set[output, | 218 [[node]Wires From >>]Set[output, |
219 [existing cons]Append[Node Ref[to,input]] | 219 [existing cons]Append[Node Ref[to,input]] |
220 ] | 220 ] |
221 ] | 221 ] |
1600 } | 1600 } |
1601 } | 1601 } |
1602 | 1602 |
1603 Register Builtins@NProgram[prog:out] | 1603 Register Builtins@NProgram[prog:out] |
1604 { | 1604 { |
1605 registered <- [[[[[[[[[[prog]Register Worker["Print", "rhope", 1, 1] | 1605 registered <- [[[[[[[[[[[prog]Register Worker["Print", "rhope", 1, 1] |
1606 ]Register Worker["If@Boolean", "rhope", 1, 2] | 1606 ]Register Worker["If@Boolean", "rhope", 1, 2] |
1607 ]Register Worker["Build", "rhope", 1, 1] | 1607 ]Register Worker["Build", "rhope", 1, 1] |
1608 ]Register Worker["Blueprint Of", "rhope", 1, 1] | 1608 ]Register Worker["Blueprint Of", "rhope", 1, 1] |
1609 ]Register Worker["Call@Worker", "rhope", 1, 2] //We're using 2 because we need to assume that the outputs are conditional | 1609 ]Register Worker["Call", "rhope", 1, 1]//This will ensure that min outputs is 1 |
1610 ]Register Worker["Call@Worker", "rhope", 1, 10]//10 is a quick workaround for the lack of proper varargs | |
1610 ]Register Worker["ID", "rhope", 1, 1] | 1611 ]Register Worker["ID", "rhope", 1, 1] |
1611 ]Register Worker["Blueprint From ID", "rhope", 1, 2] | 1612 ]Register Worker["Blueprint From ID", "rhope", 1, 2] |
1612 ]Register Worker["Pause", "rhope", 1, 1] | 1613 ]Register Worker["Pause", "rhope", 1, 1] |
1613 ]Register Worker["Resume", "rhope", 2, 2] | 1614 ]Register Worker["Resume", "rhope", 2, 2] |
1614 ]Register Number Methods | 1615 ]Register Number Methods |
1643 ]Builtin? <<[Yes]] | 1644 ]Builtin? <<[Yes]] |
1644 ]Bind Worker["Call@Worker", | 1645 ]Bind Worker["Call@Worker", |
1645 [[[[[NWorker["rhope"] | 1646 [[[[[NWorker["rhope"] |
1646 ]Inputs <<[("worker")] | 1647 ]Inputs <<[("worker")] |
1647 ]Input Types <<[ [()]Append[Type Instance["Worker"]] ] | 1648 ]Input Types <<[ [()]Append[Type Instance["Worker"]] ] |
1648 ]Outputs <<[("ret1","ret2")] | 1649 ]Outputs <<[("ret1","ret2","ret3","ret4","ret5","ret6","ret7","ret8","ret9","ret10")] |
1649 ]Output Types <<[ [[()]Append[Type Instance["Any Type"]]]Append[Type Instance["Any Type"]] ] | 1650 ]Output Types <<[ [[()]Append[Type Instance["Any Type"]]]Append[Type Instance["Any Type"]] ] |
1650 ]Builtin? << [Yes]] | 1651 ]Builtin? << [Yes]] |
1651 ]Bind Worker["ID", | 1652 ]Bind Worker["ID", |
1652 [[[[[NWorker["rhope"] | 1653 [[[[[NWorker["rhope"] |
1653 ]Inputs <<[("bp")] | 1654 ]Inputs <<[("bp")] |