diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/database.boot | 6 | ||||
-rw-r--r-- | src/interp/i-map.boot | 12 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 4 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 4 | ||||
-rw-r--r-- | src/interp/i-toplev.boot | 4 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 6 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 4 | ||||
-rw-r--r-- | src/interp/setvars.boot | 6 | ||||
-rw-r--r-- | src/interp/sys-globals.boot | 10 | ||||
-rw-r--r-- | src/interp/template.boot | 5 |
10 files changed, 34 insertions, 27 deletions
diff --git a/src/interp/database.boot b/src/interp/database.boot index aef6f6fa..60387234 100644 --- a/src/interp/database.boot +++ b/src/interp/database.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-2008, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -101,10 +101,10 @@ augmentLisplibModemapsFromFunctor(form,opAlist,signature) == rebuildCDT(filemode) == clearConstructorAndLisplibCaches() $databaseQueue:local :=nil - $e: local := [$EmptyEnvironment] -- We may need to evaluate Categories + $e: local := $EmptyEnvironment -- We may need to evaluate Categories buildDatabase(filemode,false) $IOindex:= 1 - $InteractiveFrame:= [$EmptyEnvironment] + $InteractiveFrame:= $EmptyEnvironment 0 buildDatabase(filemode,expensive) == diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot index 1dc09662..0add6301 100644 --- a/src/interp/i-map.boot +++ b/src/interp/i-map.boot @@ -1,5 +1,7 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are @@ -115,7 +117,7 @@ addDefMap(['DEF,lhs,mapsig,.,rhs],pred) == someDecs := nil allDecs := true mapmode := ['Mapping] - $env:local := [$EmptyEnvironment] + $env:local := [[nil]] $eval:local := true --generate code-- don't just type analyze $genValue:local := true --evaluate all generated code for d in mapsig repeat @@ -578,7 +580,7 @@ rewriteMap0(op,opName,argl) == tar:= nil argTypes:= nil get(opName,'mode,$e) is ['Mapping,tar,:argTypes] - $env: local := [$EmptyEnvironment] + $env: local := [[nil]] for arg in argl for var in $FormalMapVariableList repeat if argTypes then @@ -611,7 +613,7 @@ rewriteMap1(opName,argl,sig) == for arg in reverse argl repeat v := getValue arg evArgl := [objNew(objVal v, objMode v),:evArgl] - $env : local := [$EmptyEnvironment] + $env : local := [[nil]] for arg in argl for evArg in evArgl for var in $FormalMapVariableList repeat if argTypes then @@ -669,7 +671,7 @@ compileDeclaredMap(op,sig,mapDef) == -- creates a local modemap and puts it into the environment $localVars: local := nil $freeVars: local := nil - $env:local:= [$EmptyEnvironment] + $env:local:= [[nil]] parms:=[var for var in $FormalMapVariableList for m in CDR sig] for m in CDR sig for var in parms repeat $env:= put(var,'mode,m,$env) @@ -785,7 +787,7 @@ analyzeUndeclaredMap(op,argTypes,mapDef,$mapList) == -- Computes the signature of the map named op, and compiles the body $freeVars:local := NIL $localVars: local := NIL - $env:local:= [$EmptyEnvironment] + $env:local:= [[nil]] $mapList := [op,:$mapList] parms:=[var for var in $FormalMapVariableList for m in argTypes] for m in argTypes for var in parms repeat diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 14c28dcd..00e391bb 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -1,5 +1,7 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are @@ -82,7 +84,7 @@ upADEF t == -- $localVars: local := nil -- $freeVars: local := nil --- $env: local := [$EmptyEnvironment] +-- $env: local := [[nil]] $compilingMap : local := true -- if there is a predicate, merge it in with the body diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index 9835c95c..188d0899 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -1,5 +1,7 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are @@ -2259,7 +2261,7 @@ showSpad2Cmd l == reportOperations(oldArg,u) == -- u might be an uppercased version of oldArg - $env:local := [$EmptyEnvironment] + $env:local := [[nil]] $eval:local := true --generate code-- don't just type analyze $genValue:local := true --evaluate all generated code null u => nil diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot index 0c40b23d..27b0cc47 100644 --- a/src/interp/i-toplev.boot +++ b/src/interp/i-toplev.boot @@ -1,5 +1,7 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are @@ -305,7 +307,7 @@ interpretTopLevel(x, posnForm) == interpret(x, :restargs) == posnForm := if PAIRP restargs then CAR restargs else restargs --type analyzes and evaluates expression x, returns object - $env:local := [$EmptyEnvironment] + $env:local := [[nil]] $eval:local := true --generate code-- don't just type analyze $genValue:local := true --evaluate all generated code interpret1(x,nil,posnForm) diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 056a9603..8f46262c 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -1,5 +1,7 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are @@ -160,7 +162,7 @@ loadLib cname == else REMPROP(cname,'NILADIC) MAKEPROP(cname,'LOADED,fullLibName) - if $InteractiveMode then $CategoryFrame := [$EmptyEnvironment] + if $InteractiveMode then $CategoryFrame := $EmptyEnvironment stopTimingProcess 'load 'T @@ -178,7 +180,7 @@ loadLibNoUpdate(cname, libName, fullLibName) == clearConstructorCache cname installConstructor(cname,kind) MAKEPROP(cname,'LOADED,fullLibName) - if $InteractiveMode then $CategoryFrame := [$EmptyEnvironment] + if $InteractiveMode then $CategoryFrame := $EmptyEnvironment stopTimingProcess 'load 'T diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 02ce4bd1..9b52de19 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.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-2008, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -237,7 +237,7 @@ NRTgetLocalIndex1(item,killBindingIfTrue) == -- when assigning slot to flag values, we don't really want to -- compile them. Rather, we want to record them as if they were atoms. flag := isQuasiquote item - $NRTdeltaList:= [['domain,(flag => item; NRTaddInner item),:value], + $NRTdeltaList:= [['domain, NRTaddInner item,:value], :$NRTdeltaList] saveNRTdeltaListComp:= $NRTdeltaListComp:=[nil,:$NRTdeltaListComp] saveIndex := $NRTbase + $NRTdeltaLength diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot index 4aee9c65..eec432a5 100644 --- a/src/interp/setvars.boot +++ b/src/interp/setvars.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-2008, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -158,8 +158,8 @@ resetWorkspaceVariables() == SETQ($dependeeClosureAlist , NIL) SETQ($IOindex , 1 ) SETQ($coerceIntByMapCounter , 0 ) - SETQ($e , [$EmptyEnvironment]) - SETQ($env , [$EmptyEnvironment]) + SETQ($e , $EmptyEnvironment) + SETQ($env , [[nil]]) -- many variables set by the following diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index 24e80779..cc7242d2 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.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-2008, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -31,8 +31,6 @@ -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- --- Copyright (C) 2007 Gabriel Dos Reis --- -- -- This file collects and documents some the global variables used by either @@ -160,9 +158,9 @@ $insideWhereIfTrue := false $instantRecord := MAKE_-HASHTABLE "ID" ++ -$InteractiveFrame := [$EmptyEnvironment] -$e := [$EmptyEnvironment] -$env := [$EmptyEnvironment] +$InteractiveFrame := $EmptyEnvironment +$e := $EmptyEnvironment +$env := [[nil]] ++ $InteractiveMode := false diff --git a/src/interp/template.boot b/src/interp/template.boot index a8abe566..cf3adf6b 100644 --- a/src/interp/template.boot +++ b/src/interp/template.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-2008, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -278,7 +278,7 @@ NRTaddInner x == atom x => nil x is ['Record,:l] => for [.,.,y] in l repeat NRTinnerGetLocalIndex y - first x in '(Union Mapping) => + first x in '(Union Mapping _[_|_|_]) => for y in rest x repeat y is [":",.,z] => NRTinnerGetLocalIndex z NRTinnerGetLocalIndex y @@ -286,7 +286,6 @@ NRTaddInner x == getConstructorSignature x is [.,:ml] => for y in rest x for m in ml | not (y = '$) repeat isCategoryForm(m,$CategoryFrame) => NRTinnerGetLocalIndex y - isQuasiquote x => NRTinnerGetLocalIndex x keyedSystemError("S2NR0003",[x]) x |