From 66ecb6f4bb00499c6e03c91f3ebe3a49dbd8d270 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 25 Jul 2010 21:53:34 +0000 Subject: (optCallSpecially): Remove deadcode. --- src/ChangeLog | 1 + src/interp/g-opt.boot | 12 +----------- src/interp/spad.lisp | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4c852523..5faf5478 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2010-07-25 Gabriel Dos Reis * interp/g-opt.boot (optCall): Don't call optimize again. + (optCallSpecially): Remove deadcode. 2010-07-25 Gabriel Dos Reis diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 2e9a92f7..833ed930 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -211,7 +211,7 @@ changeThrowToGo(s,g) == changeThrowToGo(rest s,g) ++ Change any `(THROW tag (%return expr))' in x to just -++ `(%return expr) since a return-operator transfer control +++ `(%return expr) since a %return-expression transfers control ++ out of the function body anyway. Similarly, transform ++ reudant `(THROW tag (THROW tag expr))' to `(THROW tag expr)'. removeNeedlessThrow x == @@ -269,19 +269,9 @@ optCall (x is ['%call,:u]) == systemErrorHere ['optCall,x] optCallSpecially(q,x,n,R) == - y:= LASSOC(R,$specialCaseKeyList) => optSpecialCall(x,y,n) optimizableDomain? R => optSpecialCall(x,R,n) (y:= get(R,"value",$e)) and optimizableDomain? y.expr => optSpecialCall(x,y.expr,n) - ( - (y:= lookup(R,$getDomainCode)) and ([op,y,prop]:= y) and - (yy:= LASSOC(y,$specialCaseKeyList)) => - optSpecialCall(x,[op,yy,prop],n)) where - lookup(a,l) == - null l => nil - [l',:l]:= l - l' is ["%LET", =a,l',:.] => l' - lookup(a,l) nil optCallEval u == diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp index 722588a5..72b68a6a 100644 --- a/src/interp/spad.lisp +++ b/src/interp/spad.lisp @@ -52,7 +52,6 @@ (defvar |$Rep| '|$Rep| "should be bound to gensym? checked in coerce") (defvar |$definition| nil "checked in DomainSubstitutionFunction") (defvar |$getPutTrace| nil) -(defvar |$specialCaseKeyList| nil "checked in optCall") (defvar |$formulaFormat| nil "if true produce script formula output") (defvar |$texFormat| nil "if true produce tex output") (defvar |$fortranFormat| nil "if true produce fortran output") -- cgit v1.2.3