diff options
author | dos-reis <gdr@axiomatics.org> | 2010-03-09 15:49:26 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-03-09 15:49:26 +0000 |
commit | c4e4529187db6e0aba25f8af43cf7be4cc15386e (patch) | |
tree | 3184d089cab8765327634d681db0c4168f56e156 /src/interp/nruncomp.boot | |
parent | 0e88b70dfbb109f73fe0e8cac2c25ef445cb2c50 (diff) | |
download | open-axiom-c4e4529187db6e0aba25f8af43cf7be4cc15386e.tar.gz |
* interp/nruncomp.boot (needToQuoteFlags?): New.
(optDeltaEntry): Use it.
Diffstat (limited to 'src/interp/nruncomp.boot')
-rw-r--r-- | src/interp/nruncomp.boot | 13 |
1 files changed, 11 insertions, 2 deletions
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 |