Mercurial > repos > rhope
comparison boolean.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 | 38d9cd036d49 |
children |
comparison
equal
deleted
inserted
replaced
169:fd06fb07762a | 170:ac5c2d78663f |
---|---|
19 ]Do If[NotCond[inval], ifno] | 19 ]Do If[NotCond[inval], ifno] |
20 | 20 |
21 out <- [backend]Store Function[ffunc] | 21 out <- [backend]Store Function[ffunc] |
22 } | 22 } |
23 | 23 |
24 Compile Boolean Inline Check[func,op,type,in,outyes,outno:out,no inline] | |
25 { | |
26 ,no inline <- If[[op]=["If"]] | |
27 { | |
28 ,no inline <- If[[[type]Name >>]=["Boolean"]] | |
29 { | |
30 ifyes <- [[func]Instruction Stream | |
31 ]Move[in, outyes] | |
32 | |
33 ifno <- [[func]Instruction Stream | |
34 ]Move[in, outno] | |
35 | |
36 ,inval <- [func]Read Field[Cast[in, type] "Val"] | |
37 { | |
38 out <- [[~]Do If[inval, ifyes] | |
39 ]Do If[NotCond[inval], ifno] | |
40 } | |
41 | |
42 } | |
43 } | |
44 } | |
45 |