diff options
author | dos-reis <gdr@axiomatics.org> | 2012-02-27 06:40:47 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2012-02-27 06:40:47 +0000 |
commit | 1b555159f3f2687fb937a12cec30383a440e9f5a (patch) | |
tree | 77c4daa7d6621336c7b95f725a74bc58e1951061 /src | |
parent | 5a8ab1eee58ce44dbdadc47b079b5925cbbf46b4 (diff) | |
download | open-axiom-1b555159f3f2687fb937a12cec30383a440e9f5a.tar.gz |
* interp/nruncomp.boot (markOperation): New.
(optDeltaEntry): Implement better patch for last change.
* interp/compiler.boot (compFormWithModemap): Undo last change.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/compiler.boot | 13 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 7 |
3 files changed, 17 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b84d41f2..cfa1c262 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-02-27 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/nruncomp.boot (markOperation): New. + (optDeltaEntry): Implement better patch for last change. + * interp/compiler.boot (compFormWithModemap): Undo last change. + 2012-02-26 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/compiler.boot (compFormWithModemap): Mark implementation diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 5692bc63..9605b35b 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -217,8 +217,7 @@ emitLocalCallInsn(op,args,e) == applyMapping([op,:argl],m,e,ml) == #argl ~= #ml-1 => nil - isCategoryForm(first ml,e) => - --is op a functor? + isCategoryForm(first ml,e) => --is op a functor? pairlis := pairList($FormalMapVariableList,argl) ml' := applySubst(pairlis,ml) argl' := @@ -616,12 +615,12 @@ compFormWithModemap(form,m,e,modemap) == T := [x',target,e'] where x':= - args := [t.expr for t in Tl] + form' := [f,:[t.expr for t in Tl]] target = $Category or isCategoryForm(target,e) => -- Constructor instantiations are direct calls - ident? f and constructorDB f ~= nil => [f,:args] + ident? f and constructorDB f ~= nil => form' -- Otherwise, this is an indirect call - ['%call,f,:args] + ['%call,:form'] -- try to deal with new-style Unions where we know the conditions op = "elt" and f is ['XLAM,:.] and ident?(z := first argl) and (c := get(z,'condition,e)) and @@ -630,9 +629,7 @@ compFormWithModemap(form,m,e,modemap) == -- first is a full tag, as placed by getInverseEnvironment -- second is what getSuccessEnvironment will place there ['%tail,z] - -- Mark atomic implementations as external - f isnt [.,:.] => ['%call,['%external,f],:args] - ['%call,f,:args] + ['%call,:form'] e':= Tl ~= nil => last(Tl).env e diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 29372705..4d16baee 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -152,6 +152,11 @@ needToQuoteFlags?(sig,env) == selector?(t,e) == ident? t and null get(t,"value",e) +markOperation f == + f = nil => f + ident? f => ['%external,f] + f + optDeltaEntry(op,sig,dc,kind) == -- references to modemaps from current domain are folded in a later -- stage of the compilation process. @@ -180,7 +185,7 @@ optDeltaEntry(op,sig,dc,kind) == return fun' cons? fun => first fun fun - getFunctionReplacement fun + markOperation getFunctionReplacement fun ++ True if we are interested only in abstract slot, not the actual ++ slot number in the template vector. |