aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/fnewmeta.lisp2
-rw-r--r--src/interp/i-spec2.boot24
3 files changed, 24 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fb7283a6..421e1630 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/i-spec2.boot (findConstantInDomain): Abstract from
+ upDollar.
+ (upDollar): Use it. Don't return general constants as mappings.
+ * interp/fnewmeta.lisp (|PARSE-FloatTok|): Fix typo.
+
2008-07-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/template.boot (evalSlotDomain): Likewise.
diff --git a/src/interp/fnewmeta.lisp b/src/interp/fnewmeta.lisp
index 49fe82c8..70fd040c 100644
--- a/src/interp/fnewmeta.lisp
+++ b/src/interp/fnewmeta.lisp
@@ -818,7 +818,7 @@
(DEFUN |PARSE-FloatTok| ()
(AND (PARSE-NUMBER)
- (PUSH-REDUCTION '|PARSE-FloatTok| (POP-STACK-1)))))
+ (PUSH-REDUCTION '|PARSE-FloatTok| (POP-STACK-1))))
(DEFUN |PARSE-FormalParameter| () (|PARSE-FormalParameterTok|))
diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot
index f3362bff..58c737af 100644
--- a/src/interp/i-spec2.boot
+++ b/src/interp/i-spec2.boot
@@ -67,6 +67,16 @@ upDEF t ==
--% Handler for package calling and $ constants
+++ Constant `c' is referenced from domain `d'; return its value
+++ in the VAT `op'.
+findConstantInDomain(op,c,d) ==
+ isPartialMode d => throwKeyedMsg("S2IS0020",NIL)
+ if $genValue then
+ val := wrap getConstantFromDomain([c],d)
+ else val := ["getConstantFromDomain",["LIST",MKQ c],MKQ d]
+ putValue(op,objNew(val,d))
+ putModeSet(op,[d])
+
upDollar t ==
-- Puts "dollar" property in atree node, and calls bottom up
t isnt [op,D,form] => nil
@@ -82,15 +92,13 @@ upDollar t ==
if f = $immediateDataSymbol then
f := objValUnwrap coerceInteractive(getValue form,$OutputForm)
if f = '(construct) then f := "nil"
- ATOM(form) and (f ^= $immediateDataSymbol) and
- (u := findUniqueOpInDomain(op,f,t)) => u
+ -- FIXME: The next two cases should be simplified and merged as
+ -- we move to general constant definitions.
+ atom form and (f ^= $immediateDataSymbol) =>
+ constantInDomain?([f],t) => findConstantInDomain(op,f,t)
+ findUniqueOpInDomain(op,f,t)
f in '(One Zero true false nil) and constantInDomain?([f],t) =>
- isPartialMode t => throwKeyedMsg("S2IS0020",NIL)
- if $genValue then
- val := wrap getConstantFromDomain([f],t)
- else val := ["getConstantFromDomain",["LIST",MKQ f],MKQ t]
- putValue(op,objNew(val,t))
- putModeSet(op,[t])
+ findConstantInDomain(op,f,t)
nargs := #rest form