From 8d26a86a2ce79743aecfb2fccccf3486525b8426 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 21 May 2012 02:45:26 +0000 Subject: * interp/vmlisp.lisp (SETANDFILE): Remove. (LAM,EVALANDFILEACTQ): Likewise. * interp/sys-utility.boot (PRINT-AND-EVAL-DEFUN): Likewise. * interp/slam.boot (reportFunctionCompilation): Tidy. * interp/lisp-backend.boot (evalAndPrintBackendDecl): New. * interp/c-util.boot (backendCompileSPADSLAM): Use it in lieu of SETANDFILE. (compAndDefine): Use evalAndPrintBackendDecl in lieu of PRINT-AND-EVAL-DEFUN. * interp/hypertex.boot: Clean up. * interp/nhyper.boot: Likewise. * interp/word.boot: Likewise. --- src/ChangeLog | 15 +++++++++++++++ src/interp/c-util.boot | 5 +++-- src/interp/hypertex.boot | 3 +-- src/interp/i-coerfn.boot | 16 ++++++++-------- src/interp/lisp-backend.boot | 5 +++++ src/interp/nhyper.boot | 15 +-------------- src/interp/slam.boot | 2 +- src/interp/spad.lisp | 1 - src/interp/sys-utility.boot | 7 +------ src/interp/vmlisp.lisp | 12 ------------ src/interp/word.boot | 4 +--- 11 files changed, 36 insertions(+), 49 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f5a73b14..f8580b1c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2012-05-20 Gabriel Dos Reis + + * interp/vmlisp.lisp (SETANDFILE): Remove. + (LAM,EVALANDFILEACTQ): Likewise. + * interp/sys-utility.boot (PRINT-AND-EVAL-DEFUN): Likewise. + * interp/slam.boot (reportFunctionCompilation): Tidy. + * interp/lisp-backend.boot (evalAndPrintBackendDecl): New. + * interp/c-util.boot (backendCompileSPADSLAM): Use it in lieu of + SETANDFILE. + (compAndDefine): Use evalAndPrintBackendDecl in lieu of + PRINT-AND-EVAL-DEFUN. + * interp/hypertex.boot: Clean up. + * interp/nhyper.boot: Likewise. + * interp/word.boot: Likewise. + 2012-05-20 Gabriel Dos Reis * interp/vmlisp.lisp (EVALANDFILEACTQ): Second argument is no diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 404bbe9a..b8ec4c5f 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1535,7 +1535,8 @@ backendCompileSPADSLAM(name,args,body) == [true, ["PROGN",["SETQ",g2,app], ["SETQ",al,["cons5",["CONS",key,g2],al]],g2]]]] - SETANDFILE(al,nil) -- define the global cache. + -- define the global cache. + evalAndPrintBackendDecl(al,['DEFPARAMETER,al,nil]) assembleCode [auxfn,["LAMBDA",args,:body]] assembleCode [name,["LAMBDA",args,code]] @@ -1755,7 +1756,7 @@ compileFileQuietly path == ++ Subroutine of compileConstructor1. Called to compile the body ++ of a category constructor definition. compAndDefine l == - _*COMP370_-APPLY_* := "PRINT-AND-EVAL-DEFUN" + _*COMP370_-APPLY_* := function evalAndPrintBackendDecl backendCompile l $compileDontDefineFunctions := true diff --git a/src/interp/hypertex.boot b/src/interp/hypertex.boot index 7f90801a..500ba281 100644 --- a/src/interp/hypertex.boot +++ b/src/interp/hypertex.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -37,7 +37,6 @@ namespace BOOT -- HyperTex Spad interface --- SETANDFILEQ($SendXEventToHyperTeX, 8) $LinkToPage == 96 $StartPage == 97 $SendLine == 98 diff --git a/src/interp/i-coerfn.boot b/src/interp/i-coerfn.boot index 407b0717..36d5772b 100644 --- a/src/interp/i-coerfn.boot +++ b/src/interp/i-coerfn.boot @@ -1896,7 +1896,7 @@ commuteMPolyCat(u,source,S,target,T) == -- a function like deconstructTower. RSS 8-1-85 ------------------------------------------------------------------------ -SETANDFILEQ($CoerceTable, '( _ +$CoerceTable == '( _ (Complex . ( _ (Expression indeterm Complex2Expr) _ (Factored indeterm Complex2FR) _ @@ -1976,9 +1976,9 @@ SETANDFILEQ($CoerceTable, '( _ (Tuple indeterm L2Tuple) _ (Vector indeterm L2V) _ ))_ - )) + ) -SETANDFILEQ($CoerceTable,append!($CoerceTable,'( _ +$CoerceTable == append!($CoerceTable,'( _ (Matrix . ( _ (List indeterm M2L) _ (RectangularMatrix partial M2Rm) _ @@ -2099,12 +2099,12 @@ SETANDFILEQ($CoerceTable,append!($CoerceTable,'( _ (SquareMatrix indeterm V2Sm) _ (Stream indeterm Agg2Agg) _ ) ) _ - ) ) ) + ) ) -- this list is too long for the parser, so it has to be split into parts -- specifies the commute functions -- commute stands for partial commute function ---SETANDFILEQ($CommuteTable, '( _ +-- $CommuteTable == '( _ -- (DistributedMultivariatePolynomial . ( _ -- (DistributedMultivariatePolynomial commute commuteMultPol) _ -- (Complex commute commuteMultPol) _ @@ -2177,9 +2177,9 @@ SETANDFILEQ($CoerceTable,append!($CoerceTable,'( _ -- (SquareMatrix commute commuteUp2) _ -- (UnivariatePolynomial commute commuteUp2) _ -- )) _ --- )) +-- ) -SETANDFILEQ($CommuteTable, '( _ +$CommuteTable == '( _ (Complex . ( _ (DistributedMultivariatePolynomial commute commuteG2) _ (MultivariatePolynomial commute commuteG2) _ @@ -2209,5 +2209,5 @@ SETANDFILEQ($CommuteTable, '( _ (SparseUnivariatePolynomial commute commuteSm1) _ (UnivariatePolynomial commute commuteSm2) _ )) _ - )) + ) diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index acf96392..321fc017 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -46,6 +46,7 @@ module lisp_-backend where printBackendStmt: %Code -> %Void printBackendDecl: (%Symbol,%Code) -> %Void evalAndPrintBackendStmt: %Code -> %Void + evalAndPrintBackendDecl: (%Symbol,%Code) -> %Void --% @@ -837,3 +838,7 @@ printBackendDecl(label,decl) == if $PrettyPrint or not ioTerminal? st then PRINT_-FULL(decl,st) flushOutput st + +evalAndPrintBackendDecl(label,decl) == + eval decl + printBackendDecl(label,decl) diff --git a/src/interp/nhyper.boot b/src/interp/nhyper.boot index 2772ca37..e456aaf8 100644 --- a/src/interp/nhyper.boot +++ b/src/interp/nhyper.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007, Gabriel Dos Reis. +-- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -34,19 +34,6 @@ -- HyperTex Spad interface ---SETANDFILEQ($SendXEventToHyperTeX, 8) ---SETANDFILEQ($LinkToPage, 96) ---SETANDFILEQ($StartPage, 97) ---SETANDFILEQ($SendLine, 98) ---SETANDFILEQ($EndOfPage, 99) ---SETANDFILEQ($PopUpPage, 95) ---SETANDFILEQ($PopUpNamedPage, 94) ---SETANDFILEQ($KillPage, 93) ---SETANDFILEQ($ReplacePage, 92) ---SETANDFILEQ($ReplaceNamedPage, 91) ---SETANDFILEQ($SpadError, 90) ---SETANDFILEQ($PageStuff, 100) - -- Issue a line of HyperTex issueHT line == sockSendInt($MenuServer, $SendLine) diff --git a/src/interp/slam.boot b/src/interp/slam.boot index 2a8b0745..df0384b7 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -199,7 +199,7 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) == mkCacheVec(op,cacheName,cacheType,cacheResetCode,cacheCountCode) $e:= put(nam,'cacheInfo, cacheVector,$e) eval cacheResetCode - SETANDFILE(cacheName,mkCircularAlist cacheCount) + symbolValue(cacheName) := mkCircularAlist cacheCount nam getCacheCount fn == diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp index d11a5aae..a5cc55e6 100644 --- a/src/interp/spad.lisp +++ b/src/interp/spad.lisp @@ -85,7 +85,6 @@ (*spad-input-file* nil) (*spad-output-file* nil) &aux - ;; (*comp370-apply* (function print-and-eval-defun)) (*comp370-apply* (function |printBackendDecl|)) (*fileactq-apply* (function |printBackendDecl|)) ($SPAD T) diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 52d79213..7e4e738a 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -1,4 +1,4 @@ --- Copyright (C) 2007-2011 Gabriel Dos Reis. +-- Copyright (C) 2007-2012 Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -252,11 +252,6 @@ COMPILE_-DEFUN(name,body) == EVAL_-DEFUN(name,body) == eval MACROEXPANDALL body -PRINT_-AND_-EVAL_-DEFUN(name,body) == - eval body - printBackendDecl(name,body) - - --% Hash table hashTable cmp == diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index b60b66b5..9d569cbf 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -106,12 +106,6 @@ (defmacro |equal| (x y) `(equalp ,x ,y)) -(defmacro evalandfileactq (name form) - `(eval-when - #+:common-lisp (:load-toplevel :execute) - #-:common-lisp (eval load) - ,form)) - (defmacro exit (&rest value) `(return-from seq ,@value)) @@ -1185,12 +1179,6 @@ ; 99.0 Ancient Stuff We Decided To Keep -(defun SETANDFILE (x y) (LAM\,EVALANDFILEACTQ x `(defparameter ,x ',y))) - -(defun LAM\,EVALANDFILEACTQ (name form) - (LAM\,FILEACTQ name form) - (eval form)) - (defun LAM\,FILEACTQ (name form) (if *FILEACTQ-APPLY* (FUNCALL *FILEACTQ-APPLY* name form))) diff --git a/src/interp/word.boot b/src/interp/word.boot index 27fe7b2c..8387a2ab 100644 --- a/src/interp/word.boot +++ b/src/interp/word.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2011, Gabriel Dos Reis. +-- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -125,8 +125,6 @@ wordsOfString1(s,j) == isBreakCharacter x == null SMALL__LITER x --- SETANDFILEQ($functionTable,buildFunctionTable()) - --======================================================================= -- Augment Function Directories --======================================================================= -- cgit v1.2.3