diff options
-rw-r--r-- | src/ChangeLog | 12 | ||||
-rw-r--r-- | src/interp/compiler.boot | 8 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 2 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 8 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 2 |
5 files changed, 19 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d2d9985d..d7af41d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2012-02-23 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/nruncomp.boot (genDeltaEntry): Replace applyFun with %apply. + * interp/lisp-backend.boot (expandApply): Remove. + Unregister expander. + * interp/g-opt.boot (optCall): applyFun is not longer an opcode. + Look for %apply. + * interp/compiler.boot (applyMapping): Generate ['%call,['%apply,.]] + form, not ['%apply,..] form. + (extractCodeAndConstructTriple): Tidy. + (compApplication): Likewise. + 2012-02-19 Gabriel Dos Reis <gdr@cse.tamu.edu> * interp/lexing.boot (getNumberToken): New. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 06c617be..cdd57767 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -240,7 +240,7 @@ applyMapping([op,:argl],m,e,ml) == emitLocalCallInsn(op,argl',e) -- Compiler synthetized operators are inline. u ~= nil and u.expr is ["XLAM",:.] => ['%call,u.expr,:argl'] - ['%apply,op,:argl'] + ['%call,['%apply,op],:argl'] pairlis := pairList($FormalMapVariableList,argl') convert([form,applySubst(pairlis,first ml),e],m) @@ -361,9 +361,8 @@ compWithMappingMode(x,m is ["Mapping",m',:sl],oldE) == extractCodeAndConstructTriple(u, m, oldE) == u is ['%call,fn,:.] => - if fn is ["applyFun",a] then fn := a + if fn is ['%apply,a] then fn := a [fn,m,oldE] - u is ['%apply,op,:.] => [op,m,oldE] [op,:.,env] := u [['%pair,['%function,op],env],m,oldE] @@ -717,8 +716,7 @@ compApplication(op,argl,m,T) == not (symbolMember?(op,$formalArgList) or symbolMember?(T.expr,$formalArgList)) and null get(T.expr,"value",e) => emitLocalCallInsn(T.expr,args,e) - ident? T.expr => ['%apply,T.expr,:args] - ['%call,['applyFun,T.expr],:args] + ['%call,['%apply,T.expr],:args] coerce([form, retm, e],resolve(retm,m)) op is 'elt => nil eltForm := ['elt, op, :argl] diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 0051997d..958f69d7 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -535,7 +535,7 @@ optCall (x is ['%call,:u]) == fn isnt [.,:.] => opt := fn has OPTIMIZE => resetTo(x,FUNCALL(opt,u)) resetTo(x,u) - fn is ['applyFun,name] => + fn is ['%apply,name] => do ident? name => x.first := '%funcall diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index 8dac4ce9..cee96c52 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -1,4 +1,4 @@ --- Copyright (C) 2011, Gabriel Dos Reis. +-- Copyright (C) 2011-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -479,9 +479,6 @@ expandTry ['%try,expr,handlers,cleanup] == cleanup = nil => tryBlock ['UNWIND_-PROTECT,tryBlock,:expandToVMForm rest cleanup] -expandApply ['%apply,op,:args] == - ['SPADCALL,:args,op] - ++ Opcodes with direct mapping to target operations. for x in [ -- Boolean constants @@ -729,8 +726,7 @@ for x in [ ['%store, :function expandStore], ['%dynval, :function expandDynval], ['%throw, :function expandThrow], - ['%try, :function expandTry], - ['%apply, :function expandApply] + ['%try, :function expandTry] ] repeat property(first x,'%Expander) := rest x ++ Return the expander of a middle-end opcode, or nil if there is none. diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index cd90fe1b..1d49bce2 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -203,7 +203,7 @@ genDeltaEntry(op,mm,e) == dc = "$" => nsig := sig if integer? nsig then nsig := MSUBST("$",dc,substitute("$$","$",sig)) setDifference(listOfBoundVars dc,$functorLocalParameters) ~= [] => - ['applyFun,['compiledLookupCheck,MKQ op, + ['%apply,['compiledLookupCheck,MKQ op, mkList consSig(db,nsig,dc),consDomainForm(db,dc,nil)]] odc := dc if cons? dc then |