aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/c-util.boot9
-rw-r--r--src/interp/compiler.boot2
-rw-r--r--src/interp/wi1.boot4
4 files changed, 15 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ee195a34..9eb33216 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2008-05-12 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/c-util.boot (isLiteral): Declare.
+ (makeLiteral): Likewise.
+ * interp/compiler.boot (compSymbol): Use isLiteral.
+ * interp/wi1.boot (compSymbol): Likewise.
+
* algebra/asp.spad.pamphlet (Asp30): Don't name local variable as
record field.
(Asp31): Likewise.
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index a2691741..4b3647d3 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -350,9 +350,14 @@ isFunction(x,e) ==
get(x,"modemap",e) or GETL(x,"SPECIAL") or x="case" or getmode(x,e) is [
"Mapping",:.]
-isLiteral(x,e) == get(x,"isLiteral",e)
+isLiteral: (%Symbol,%Env) -> %Boolean
+isLiteral(x,e) ==
+ get(x,"isLiteral",e)
-makeLiteral(x,e) == put(x,"isLiteral","true",e)
+
+makeLiteral: (%Symbol,%Env) -> %Thing
+makeLiteral(x,e) ==
+ put(x,"isLiteral","true",e)
isSomeDomainVariable s ==
IDENTP s and #(x:= PNAME s)>2 and x.(0)="#" and x.(1)="#"
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 397e6b9a..94ee5e16 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -320,7 +320,7 @@ compSymbol(s,m,e) ==
isFluid s => [s,getmode(s,e) or return nil,e]
s="true" => ['(QUOTE T),$Boolean,e]
s="false" => [false,$Boolean,e]
- s=m or get(s,"isLiteral",e) => [["QUOTE",s],s,e]
+ s=m or isLiteral(s,e) => [["QUOTE",s],s,e]
v := get(s,"value",e) =>
--+
MEMQ(s,$functorLocalParameters) =>
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot
index 02f0c892..84476bc9 100644
--- a/src/interp/wi1.boot
+++ b/src/interp/wi1.boot
@@ -367,7 +367,7 @@ compSymbol(s,m,e) ==
isFluid s => [s,getmode(s,e) or return nil,e]
s="true" => ['(QUOTE T),$Boolean,e]
s="false" => [false,$Boolean,e]
- s=m or get(s,"isLiteral",e) => [["QUOTE",s],s,e]
+ s=m or isLiteral(s,e) => [["QUOTE",s],s,e]
v:= get(s,"value",e) =>
--+
MEMQ(s,$functorLocalParameters) =>
@@ -802,7 +802,7 @@ resolve(min, mout) ==
coerce(T,m) ==
T := [T.expr,markKillAll T.mode,T.env]
m := markKillAll m
- if not get(m, 'isLiteral,T.env) then markImport m
+ if not isLiteral(m,T.env) then markImport m
$InteractiveMode =>
keyedSystemError("S2GE0016",['"coerce",
'"function coerce called from the interpreter."])