Mercurial > repos > rhope
diff nworker_c.rhope @ 170:ac5c2d78663f
Inline calls to If@Boolean when static type info is present
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 08 May 2011 18:21:19 -0700 |
parents | fd06fb07762a |
children | a32afde77abb |
line wrap: on
line diff
--- a/nworker_c.rhope Sun May 08 01:37:44 2011 -0700 +++ b/nworker_c.rhope Sun May 08 18:21:19 2011 -0700 @@ -903,11 +903,19 @@ { with call <- [func]Method Call[fname, inputs] }{ - ,normal call <- If[[[fname]Contains["@"]]And[[[inputs]Length]=[2]]] + justfunc,,,normal call <- [fname]Partition["@"] { //Check for inline on static method calls //TODO: Deal with unused output - out,normal call <- Compile Number Inline Check[func, [fname]Partition["@"], [[[node]Input Types >>]Index[0]]Index[0], [[[node]Input Types >>]Index[1]]Index[0], [inputs]Index[0], [inputs]Index[1], Result Var Name[0, node index]] + If[[[inputs]Length]=[2]] + { + out,normal call <- Compile Number Inline Check[func, justfunc, [[[node]Input Types >>]Index[0]]Index[0], [[[node]Input Types >>]Index[1]]Index[0], [inputs]Index[0], [inputs]Index[1], Result Var Name[0, node index]] + }{ + ,normal call <- If[[[inputs]Length]=[1]] + { + out,normal call <- Compile Boolean Inline Check[func, justfunc, [[[node]Input Types >>]Index[0]]Index[0], [inputs]Index[0], Result Var Name[0, node index], Result Var Name[1, node index]] + } + } } Val[normal call] @@ -933,6 +941,7 @@ } } after save <- Fold[Save Result[?, ?, node index], with call, Range[0, save outs]] + Print[["Last NumParams is now "]Append[String[[after save]Last NumParams >>]]] } Compile Node[worker,program,func,nodes,current:out,out worker]