aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap
diff options
context:
space:
mode:
authorGabriel Dos Reis <GabrielDosReis@users.noreply.github.com>2022-08-21 13:01:37 -0700
committerGitHub <noreply@github.com>2022-08-21 13:01:37 -0700
commit0f612f581a6d58a4d3ceed0ade26e04681b32e13 (patch)
tree3ad3907873f66a5d9bc463328e5817db0ff83e6e /src/boot/strap
parent3dc479ae544db8bc9224f183f33cb3e16fe2daac (diff)
downloadopen-axiom-0f612f581a6d58a4d3ceed0ade26e04681b32e13.tar.gz
Boot parser: Remove useless AST functions (#17)
A couple of the Boot AST building functions are identity functions. Remove to reduce obfuscation.
Diffstat (limited to 'src/boot/strap')
-rw-r--r--src/boot/strap/ast.clisp10
-rw-r--r--src/boot/strap/parser.clisp10
-rw-r--r--src/boot/strap/tokens.clisp12
3 files changed, 11 insertions, 21 deletions
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index 63c806be..cba0ef88 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -244,16 +244,6 @@
(DEFUN |bfEqual| (|name|) (LIST 'EQUAL |name|))
-(DECLAIM (FTYPE (FUNCTION (|%Thing|) |%Thing|) |bfBracket|))
-
-(DEFUN |bfBracket| (|part|) |part|)
-
-(DECLAIM (FTYPE (FUNCTION ((|%List| |%Form|)) (|%List| |%Form|)) |bfPile|))
-
-(DEFUN |bfPile| (|part|) |part|)
-
-(DEFUN |bfDo| (|x|) |x|)
-
(DEFUN |bfAtScope| (|s| |x|) (LIST 'LET (LIST (LIST '*PACKAGE* |s|)) |x|))
(DECLAIM
diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp
index 7bf31b92..b55ddd35 100644
--- a/src/boot/strap/parser.clisp
+++ b/src/boot/strap/parser.clisp
@@ -183,7 +183,7 @@
(COND
((AND (FUNCALL |f| |ps|)
(OR (|bpEqKey| |ps| 'CBRACK) (|bpBrackTrap| |ps| |a|)))
- (|bpPush| |ps| (|bfBracket| (|bpPop1| |ps|))))
+ (|bpPush| |ps| (|bpPop1| |ps|)))
((|bpEqKey| |ps| 'CBRACK) (|bpPush| |ps| NIL))
(T (|bpBrackTrap| |ps| |a|))))
(T NIL)))))
@@ -194,7 +194,7 @@
(COND ((|bpEqKey| |ps| 'BACKTAB) T)
((AND (FUNCALL |f| |ps|)
(OR (|bpEqKey| |ps| 'BACKTAB) (|bpPileTrap| |ps|)))
- (|bpPush| |ps| (|bfPile| (|bpPop1| |ps|))))
+ (|bpPush| |ps| (|bpPop1| |ps|)))
(T NIL)))
(T NIL)))
@@ -387,7 +387,7 @@
(COND (|done| (RETURN NIL))
(T
(SETQ |found|
- (LET ((#1=#:G393
+ (LET ((#1=#:G370
(CATCH :OPEN-AXIOM-CATCH-POINT (FUNCALL |f| |ps|))))
(COND
((AND (CONSP #1#)
@@ -932,7 +932,7 @@
(|bpPush| |ps| (|bfAtScope| (|bpPop2| |ps|) (|bpPop1| |ps|))))
(T
(AND (|bpEqKey| |ps| 'DO) (|bpRequire| |ps| #'|bpAssign|)
- (|bpPush| |ps| (|bfDo| (|bpPop1| |ps|)))))))
+ (|bpPush| |ps| (|bpPop1| |ps|))))))
(DEFUN |bpReturn| (|ps|)
(OR
@@ -1411,7 +1411,7 @@
(SETQ |op| (|enclosingFunction| (|parserLoadUnit| |ps|)))
(SETQ |varno| (|parserGensymSequenceNumber| |ps|))
(UNWIND-PROTECT
- (LET ((#1=#:G394
+ (LET ((#1=#:G371
(CATCH :OPEN-AXIOM-CATCH-POINT
(PROGN
(SETF (|enclosingFunction| (|parserLoadUnit| |ps|)) NIL)
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index 7aae98ae..20f8f7e4 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -84,10 +84,10 @@
(LET* (|s|)
(COND
((SETQ |s|
- (WITH-HASH-TABLE-ITERATOR (#1=#:G392 |shoeKeyTable|)
+ (WITH-HASH-TABLE-ITERATOR (#1=#:G369 |shoeKeyTable|)
(LET ((|bfVar#1| NIL))
(LOOP
- (MULTIPLE-VALUE-BIND (#2=#:G393 |k| |v|)
+ (MULTIPLE-VALUE-BIND (#2=#:G370 |k| |v|)
(#1#)
(COND ((NOT #2#) (RETURN |bfVar#1|))
(T
@@ -138,9 +138,9 @@
(COND ((> |i| 255) (RETURN NIL)) (T (SETF (ELT |a| |i|) |b|)))
(SETQ |i| (+ |i| 1))))
|a|))
- (WITH-HASH-TABLE-ITERATOR (#1=#:G394 |shoeKeyTable|)
+ (WITH-HASH-TABLE-ITERATOR (#1=#:G371 |shoeKeyTable|)
(LOOP
- (MULTIPLE-VALUE-BIND (#2=#:G395 |s| #:G396)
+ (MULTIPLE-VALUE-BIND (#2=#:G372 |s| #:G373)
(#1#)
(COND ((NOT #2#) (RETURN NIL)) (T (|shoeInsert| |s| |d|))))))
|d|)))
@@ -154,9 +154,9 @@
(LET ((|i| 0))
(LOOP (COND ((> |i| 255) (RETURN NIL)) (T (SETF (SBIT |a| |i|) 0)))
(SETQ |i| (+ |i| 1))))
- (WITH-HASH-TABLE-ITERATOR (#1=#:G397 |shoeKeyTable|)
+ (WITH-HASH-TABLE-ITERATOR (#1=#:G374 |shoeKeyTable|)
(LOOP
- (MULTIPLE-VALUE-BIND (#2=#:G398 |k| #:G399)
+ (MULTIPLE-VALUE-BIND (#2=#:G375 |k| #:G376)
(#1#)
(COND ((NOT #2#) (RETURN NIL)) ((|shoeStartsId| (SCHAR |k| 0)) NIL)
(T (SETF (SBIT |a| (CHAR-CODE (SCHAR |k| 0))) 1))))))