aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-05-12 19:12:19 +0000
committerdos-reis <gdr@axiomatics.org>2008-05-12 19:12:19 +0000
commitcca1e10eac77b9302c5862fa903872c792b36620 (patch)
tree88410d2826884d761a75f00b946bd2041fac31db /src/interp
parentd4221b8a648adc6bf3b44410dedd8b5e8abbeb18 (diff)
downloadopen-axiom-cca1e10eac77b9302c5862fa903872c792b36620.tar.gz
* interp/c-util.boot (isLiteral): Declare.
(makeLiteral): Likewise. * interp/compiler.boot (compSymbol): Use isLiteral. * interp/wi1.boot (compSymbol): Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/c-util.boot9
-rw-r--r--src/interp/compiler.boot2
-rw-r--r--src/interp/wi1.boot4
3 files changed, 10 insertions, 5 deletions
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."])