aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-05-28 21:44:26 +0000
committerdos-reis <gdr@axiomatics.org>2009-05-28 21:44:26 +0000
commit9a866efde4ed887d024c01a49b3cdde777d8deb3 (patch)
treec3434f7a42ddb6bc3590d9aba429129541c57c0a /src/interp
parent0e6d0cdde92747cc02d9965eef8ef1edc31cb1ae (diff)
downloadopen-axiom-9a866efde4ed887d024c01a49b3cdde777d8deb3.tar.gz
* interp/compiler.boot (compVector): Tidy code generation.
(checkExternalEntity): Handle Builtin external entities. (compSignatureImport): Likewise. * algebra/boolean.spad.pamphlet (Boolean): Import Lisp function from Foreign Builtin. (KleeneTrivalentLogic): The constant `true' and `false' are now inherited.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/compiler.boot8
-rw-r--r--src/interp/property.lisp2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 03846461..cf86b490 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -979,10 +979,10 @@ compList(l,m is ["List",mUnder],e) ==
compVector: (%Form,%Mode,%Env) -> %Maybe %Triple
compVector(l,m is ["Vector",mUnder],e) ==
- null l => [$EmptyVector,m,e]
Tl:= [[.,mUnder,e]:= comp(x,mUnder,e) or return "failed" for x in l]
Tl="failed" => nil
- [["VECTOR",:[T.expr for T in Tl]],m,e]
+ [["MAKE-ARRAY", #Tl, KEYWORD::ELEMENT_-TYPE, quoteForm getVMType mUnder,
+ KEYWORD::INITIAL_-CONTENTS, ["LIST", :[T.expr for T in Tl]]],m,e]
--% MACROS
@@ -1360,6 +1360,8 @@ checkExternalEntity(id,type,lang,e) ==
-- with exported operators.
get(id,"modemap",e) =>
stackAndThrow('"%1b already names exported operations in scope",[id])
+ -- We don't type check builtin declarations at the moment.
+ lang = "Builtin" => id
-- Only functions are accepted at the moment. And all mentioned
-- types must be those that are supported by the FFI.
type' := checkExternalEntityType(type,e)
@@ -1388,7 +1390,7 @@ compSignatureImport(["%SignatureImport",id,type,home],m,e) ==
stackAndThrow('"%1bp takes exactly one argument",["Foreign"])
not IDENTP lang =>
stackAndThrow('"Argument to %1bp must be an identifier",["Foreign"])
- lang ^= "C" =>
+ not MEMQ(lang, '(Builtin C)) =>
stackAndThrow('"Sorry: Only %1bp is valid at the moment",["Foreign C"])
-- 2. Make sure this import is not subverting anything we know
id' := checkExternalEntity(id,type,lang,e)
diff --git a/src/interp/property.lisp b/src/interp/property.lisp
index 1a8a2323..7ef0cb96 100644
--- a/src/interp/property.lisp
+++ b/src/interp/property.lisp
@@ -82,7 +82,9 @@
(|rem| " rem ")
(|case| " case ")
(|and| " and ")
+ (|/\\| " /\\ ")
(|or| " or ")
+ (|\\/| " \\/ ")
(TAG ": ")
(|+->| " +-> ")
(RARROW " -> ")