diff options
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/interp/compiler.boot | 4 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 6 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 1 |
4 files changed, 16 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6d623e84..8c26c1f3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-09-11 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/compiler.boot (finishLambdaExpression): Tidy. + (extractCodeAndConstructTriple): Likewise. + * interp/g-opt.boot (optCall): Likewise. + ($VMsideEffectFreeOperators): Include %function + * interp/lisp-backend.boot: Translate %function. + +2011-09-11 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/lisplib.boot (isFunctor): Noe recognize Mapping as a functor. * interp/g-opt.boot (doInlineCall): Tidy one more time. ($VMsideEffectFreeOperators): Move %aplly to $simpleVMoperators. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 042421ec..1a4aa55a 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -321,7 +321,7 @@ finishLambdaExpression(expr is ["LAMBDA",vars,.],env) == vec := ['%vector,:reverse! vec] ["LAMBDA",[:vars,"$$"],:body] fname := ["CLOSEDFN",expandedFunction] --Like QUOTE, but gets compiled - ["CONS",fname,vec] + ['%pair,fname,vec] compWithMappingMode(x,m is ["Mapping",m',:sl],oldE) == $killOptimizeIfTrue: local:= true @@ -350,7 +350,7 @@ extractCodeAndConstructTriple(u, m, oldE) == [fn,m,oldE] u is ['%apply,op,:.] => [op,m,oldE] [op,:.,env] := u - [["CONS",["function",op],env],m,oldE] + [['%pair,['%function,op],env],m,oldE] compExpression(x,m,e) == $insideExpressionIfTrue: local:= true diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 05860159..983cd634 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -305,6 +305,10 @@ optCall (x is ['%call,:u]) == x.first := 'SPADCALL x.rest := [:a,name] x + fn is ['%pair,['%function,op],env] => + x.first := op + x.rest := [:a,env] + x fn is [q,R,n] and q in '(ELT CONST) => q is 'CONST => ['spadConstant,R,n] emitIndirectCall(fn,a,x) @@ -418,7 +422,7 @@ optSuchthat [.,:u] == ["SUCHTHAT",:u] ++ List of VM side effect free operators. $VMsideEffectFreeOperators == - '(SPADfirst ASH FLOAT FLOAT_-SIGN + '(SPADfirst ASH FLOAT FLOAT_-SIGN %function %funcall %nothing %when %false %true %otherwise %2bit %2bool %and %or %not %peq %ieq %ilt %ile %igt %ige %head %tail %integer? %beq %blt %ble %bgt %bge %bitand %bitior %bitxor %bitnot %bcompl diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index 79200c61..778f6d91 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -627,6 +627,7 @@ for x in [ ['%leave, :'RETURN], ['%otherwise,:'T], ['%funcall, :'FUNCALL], + ['%function, :'FUNCTION], ['%when, :'COND], -- I/O stream functions |