diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6874485c..57f38916 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-03-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/nruncomp.boot (needToQuoteFlags?): New. + (optDeltaEntry): Use it. + 2010-03-06 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/g-opt.boot ($VMsideEffectFreeOperators): New. diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index f961ff10..3b1dd8e3 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -153,6 +153,15 @@ listOfBoundVars form == first form = "Enumeration" => [] "union"/[listOfBoundVars x for x in rest form] + +++ Subroutine of optDeltaEntry +++ Return true if the signature `sig' contains flag types +++ that need to be quoted. +needToQuoteFlags?(sig,env) == + or/[selector?(t,env) for t in sig] where + selector?(t,e) == + IDENTP t and null get(t,"value",e) + optDeltaEntry(op,sig,dc,eltOrConst) == $killOptimizeIfTrue = true => nil ndc := @@ -164,8 +173,8 @@ optDeltaEntry(op,sig,dc,eltOrConst) == -- or is candidate for inlining. atom ndc or not optimizableDomain? ndc => nil fun := lookupDefiningFunction(op,sig,ndc) - if fun = nil then - -- following code is to handle selectors like first, rest + -- following code is to handle selectors like first, rest + if fun = nil and needToQuoteFlags?(sig,$e) then nsig := [quoteSelector tt for tt in sig] where quoteSelector(x) == not(IDENTP x) => x |