From c0f80aca887462749a7cdc4fcacc579ee59aa850 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 7 Sep 2008 20:13:42 +0000 Subject: * boot/parser.boot (bpImport): Invert syntax for importing foreign functions. * boot/strap/parser.clisp: Update. * interp/sys-os.boot: Change to new syntax throughout. --- src/boot/strap/ast.clisp | 11 ++++++++--- src/boot/strap/parser.clisp | 28 ++++++++++++++++++---------- src/boot/strap/translator.clisp | 20 +++++++++++++++++--- 3 files changed, 43 insertions(+), 16 deletions(-) (limited to 'src/boot/strap') diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp index 8f1b5b77..f5536c0c 100644 --- a/src/boot/strap/ast.clisp +++ b/src/boot/strap/ast.clisp @@ -2206,9 +2206,14 @@ (RETURN (COND ((NULL |t|) |t|) - ((SETQ |t'| (ASSOC (|coreSymbol| |t|) |$NativeTypeTable|)) - (CDR |t'|)) - ('T + ((SETQ |t'| + (CDR (ASSOC (|coreSymbol| |t|) |$NativeTypeTable|))) + (COND + ((AND (EQ |t| '|string|) (|%hasFeature| :SBCL)) + (LIST |t'| :EXTERNAL-FORMAT :ASCII :ELEMENT-TYPE + 'BASE-CHAR)) + (#0='T |t'|))) + (#0# (|fatalError| (CONCAT "unsupported native type: " (SYMBOL-NAME |t|)))))))) diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp index 9cd82f72..baea8792 100644 --- a/src/boot/strap/parser.clisp +++ b/src/boot/strap/parser.clisp @@ -483,16 +483,24 @@ ('T (|bpPush| (|%Module| (|bpPop1|) NIL))))))))) (DEFUN |bpImport| () - (COND - ((|bpEqKey| 'IMPORT) - (PROGN - (OR (|bpName|) (|bpTrap|)) - (COND - ((|bpEqKey| 'FOR) - (AND (OR (|bpSignature|) (|bpTrap|)) - (|bpPush| (|ImportSignature| (|bpPop2|) (|bpPop1|))))) - (#0='T (|bpPush| (|Import| (|bpPop1|))))))) - (#0# NIL))) + (PROG (|a|) + (RETURN + (COND + ((|bpEqKey| 'IMPORT) + (PROGN + (SETQ |a| (|bpState|)) + (OR (|bpName|) (|bpTrap|)) + (COND + ((|bpEqPeek| 'COLON) + (PROGN + (|bpRestore| |a|) + (AND (OR (|bpSignature|) (|bpTrap|)) + (OR (|bpEqKey| 'FOR) (|bpTrap|)) + (OR (|bpName|) (|bpTrap|)) + (|bpPush| + (|ImportSignature| (|bpPop1|) (|bpPop1|)))))) + (#0='T (|bpPush| (|Import| (|bpPop1|))))))) + (#0# NIL))))) (DEFUN |bpTypeAliasDefition| () (AND (OR (|bpTerm| #'|bpIdList|) (|bpTrap|)) (|bpEqKey| 'TDEF) diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp index 4d1f7fb2..c58a80a2 100644 --- a/src/boot/strap/translator.clisp +++ b/src/boot/strap/translator.clisp @@ -93,9 +93,23 @@ (DEFUN |AxiomCore|::|%sysInit| () (DECLARE (SPECIAL |$translatingOldBoot|)) - (COND - ((EQUAL (CDR (ASSOC (|Option| "boot") (|%systemOptions|))) "old") - (SETQ |$translatingOldBoot| T)))) + (PROGN + (SETQ *LOAD-VERBOSE* NIL) + (COND + ((OR (|%hasFeature| :GCL) (|%hasFeature| :ECL)) + (SETF (SYMBOL-VALUE + (|bfColonColon| 'COMPILER '*COMPILE-VERBOSE*)) + NIL) + (SETF (SYMBOL-VALUE + (|bfColonColon| 'COMPILER + 'SUPPRESS-COMPILER-WARNINGS*)) + NIL) + (SETF (SYMBOL-VALUE + (|bfColonColon| 'COMPILER 'SUPPRESS-COMPILER-NOTES*)) + T))) + (COND + ((EQUAL (CDR (ASSOC (|Option| "boot") (|%systemOptions|))) "old") + (SETQ |$translatingOldBoot| T))))) (DECLAIM (FTYPE (FUNCTION (|%Thing|) |%Thing|) |setCurrentPackage|)) -- cgit v1.2.3