From 2bc4e76b440ada98326241b3b01147fc121eb99f Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 30 May 2013 16:51:52 +0000 Subject: Update for modern ECL. --- ChangeLog | 5 +++++ config/open-axiom.m4 | 14 +++----------- configure | 14 +++----------- src/interp/compiler.boot | 13 ++++++------- src/interp/spad-parser.boot | 16 +++------------- src/interp/spad.lisp | 2 +- 6 files changed, 21 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23280fc6..94ad05ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-05-30 Gabriel Dos Reis + + * config/open-axiom.m4 (OPENAXIOM_HOST_LISP_CPU_PRECISION): Update. + ECL since 11.1.1 puts relevant information on *FEATURES* list. + 2013-04-05 Gabriel Dos Reis * configure.ac: Output src/syntax/Makefile. diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index 2cc42d54..384125d5 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -465,17 +465,9 @@ dnl set the global variable openaxiom_host_lisp_precision. AC_DEFUN([OPENAXIOM_HOST_LISP_CPU_PRECISION], [ if test x"$oa_include_gcl" != xyes; then AC_MSG_CHECKING([CPU precision as seen by $AXIOM_LISP]) - # Almost all Lisp systems we support put the relevant information - # on the *FEATURES* list. Except ECL. - case $axiom_lisp_flavor in - ecl) - features_expr='(progn (require :cmp) (eval (find-symbol "*COMPILER-FEATURES*" :c)))' - ;; - *) - features_expr='*features*' - ;; - esac - case `echo $features_expr | $AXIOM_LISP` in + # All Lisp systems we support put the relevant information + # on the *FEATURES* list. + case `echo '*features*' | $AXIOM_LISP` in *X86-64*|*X86_64*|*WORD-SIZE=64*|*64-BIT*) # PORTME: the pattern above covers only the supported free Lisps, i.e. # GCL, SBCL, CLisp, ECL and Clozure CL. diff --git a/configure b/configure index 83a34ac6..3527e617 100755 --- a/configure +++ b/configure @@ -3901,17 +3901,9 @@ fi if test x"$oa_include_gcl" != xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking CPU precision as seen by $AXIOM_LISP" >&5 $as_echo_n "checking CPU precision as seen by $AXIOM_LISP... " >&6; } - # Almost all Lisp systems we support put the relevant information - # on the *FEATURES* list. Except ECL. - case $axiom_lisp_flavor in - ecl) - features_expr='(progn (require :cmp) (eval (find-symbol "*COMPILER-FEATURES*" :c)))' - ;; - *) - features_expr='*features*' - ;; - esac - case `echo $features_expr | $AXIOM_LISP` in + # All Lisp systems we support put the relevant information + # on the *FEATURES* list. + case `echo '*features*' | $AXIOM_LISP` in *X86-64*|*X86_64*|*WORD-SIZE=64*|*64-BIT*) # PORTME: the pattern above covers only the supported free Lisps, i.e. # GCL, SBCL, CLisp, ECL and Clozure CL. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index fa193e00..3bcb0399 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -85,6 +85,7 @@ compTopLevel: (%Form,%Mode,%Env) -> %Maybe %Triple compTopLevel(x,m,e) == -- signals that target is derived from lhs-- see NRTmakeSlot1Info $NRTderivedTargetIfTrue: local := false + $currentFunction: local := nil $forceAdd: local:= false -- start with a base list of domains we may want to inline. $optimizableConstructorNames: local := $SystemInlinableConstructorNames @@ -2799,8 +2800,8 @@ preprocessParseTree pt == ++ Takes a parse tree `pt', typecheck it and compile it down ++ to VM instructions. compileParseTree pt == + $topOp: local := nil pt = nil => nil - CURSTRM: local := $OutputStream pf := preprocessParseTree pt pf = nil => nil -- stop if preprocessing was a disaster. -- Don't go further if only preprocessing was requested. @@ -2811,13 +2812,11 @@ compileParseTree pt == $x: local := nil -- ??? $m: local := nil -- ??? $s: local := nil -- ??? + $returnMode: local := $EmptyMode $exitModeStack: local := [] -- Used by the compiler proper - -- We don't usually call the compiler to process interpreter - -- input, however attempt to second guess nevertheless. - if $InteractiveMode then - processInteractive(pf,nil) - else if T := compTopLevel(pf,$EmptyMode,$InteractiveFrame) then - [.,.,$InteractiveFrame] := T + $leaveLevelStack: local := [] + if T := compTopLevel(pf,$EmptyMode,$InteractiveFrame) then + $InteractiveFrame := T.env finishLine $OutputStream diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot index e2a33476..1e33482b 100644 --- a/src/interp/spad-parser.boot +++ b/src/interp/spad-parser.boot @@ -1039,29 +1039,19 @@ parseSpecialCommand rd == --% -translateSpad x == +translateSpad(ifile,x) == $Index: local := 0 _*PRETTY_-PRINT_*: local := true + $InteractiveMode: local := false $MACROASSOC: local := nil $NEWSPAD: local := true - $currentFunction: local := nil - $topOp: local := nil $semanticErrorStack: local := [] $warningStack: local := [] - $returnMode: local := $EmptyMode - $leaveLevelStack: local := [] - $insideFunctorIfTrue: local := false - $insideExpressionIfTrue: local := false - $insideCoerceInteractiveHardIfTrue: local := false - $insideWhereIfTrue: local := false - $insideCategoryIfTrue: local := false - $insideCapsuleFunctionIfTrue: local := false - $form: local := nil $e: local := $EmptyEnvironment $genSDVar: local := 0 $previousTime: local := TEMPUS_-FUGIT() $backend: local := function(x +-> PRINT_-FULL(x,$OutputStream)) - compileParseTree x + compileParseTree x --% diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp index 22e01ef0..2f4161e5 100644 --- a/src/interp/spad.lisp +++ b/src/interp/spad.lisp @@ -95,7 +95,7 @@ (|parseNewExpr| rd) (let ((parseout (|popStack1|)) ) (when parseout - (|translateSpad| parseout) + (|translateSpad| ifile parseout) (format |$OutputStream| "~&"))) )))) (|ioClear!| rd))) -- cgit v1.2.3