Mercurial > repos > rhope
diff backendutils.rhope @ 74:a844c623c7df
Add support for Worker type
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 01 Jul 2010 21:32:08 -0400 |
parents | 3e20ed8959c4 |
children | 0083b2f7b3c7 |
line wrap: on
line diff
--- a/backendutils.rhope Sat Jun 19 23:13:41 2010 -0400 +++ b/backendutils.rhope Thu Jul 01 21:32:08 2010 -0400 @@ -96,22 +96,23 @@ Blueprint Constant { - Value + Value + Need Addref } Constant[var:out] { - out <- [Build["Constant"]]Value <<[var] + out <- [[Build["Constant"]]Value <<[var]]Need Addref <<[Yes] } Make Op@Constant[const,func:out] { - out <- [func]Lookup Constant[[const]Value >>] + out <- [func]Lookup Constant[[const]Value >>, [const]Need Addref >>] } Strip Addref@Constant[op:out] { - out <- op + out <- [op]Need Addref <<[No] } Blueprint Result @@ -287,4 +288,20 @@ ,out <- If[[[type]Name >>] = [[compare]Name >>]] { out <- [[type]Variant >>] = [[compare]Variant >>] } } -} +} + +Blueprint Worker Literal +{ + Name + Args +} + Worker Literal[name:out] +{ + out <- [[Build["Worker Literal"]]Name <<[name]]Args <<[()] +} + +Set Input@Worker Literal[worker,argnum,val:out] +{ + out <- [worker]Args <<[ [[worker]Args >>]Set[argnum, val] ] +} +