diff options
author | dos-reis <gdr@axiomatics.org> | 2010-12-18 19:02:56 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-12-18 19:02:56 +0000 |
commit | 0b00c2ae8f58ce6d812f6ce3fbfecc19db7ffd3f (patch) | |
tree | dff999d6fe7258432408bb1663fcc714cfdbfe5a | |
parent | 751f5dd0f97c1c6e53dcb0ca118f1a8b5cb7fc59 (diff) | |
download | open-axiom-0b00c2ae8f58ce6d812f6ce3fbfecc19db7ffd3f.tar.gz |
* boot/initial-env.lisp (SIZE): Remove.
(MAKE-VEC): Likewise.
(MAKE-CVEC): Likewise.
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/boot/ast.boot | 2 | ||||
-rw-r--r-- | src/boot/initial-env.lisp | 11 | ||||
-rw-r--r-- | src/boot/scanner.boot | 8 | ||||
-rw-r--r-- | src/boot/strap/scanner.clisp | 6 | ||||
-rw-r--r-- | src/boot/strap/tokens.clisp | 20 | ||||
-rw-r--r-- | src/boot/tokens.boot | 14 |
7 files changed, 33 insertions, 34 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 220def3d..07e81b09 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2010-12-18 Gabriel Dos Reis <gdr@cs.tamu.edu> + * boot/initial-env.lisp (SIZE): Remove. + (MAKE-VEC): Likewise. + (MAKE-CVEC): Likewise. + +2010-12-18 Gabriel Dos Reis <gdr@cs.tamu.edu> + * boot/initial-env.lisp (VEC-SETELT): Remove. * boot/scanner.boot (shoeIntValue): Tidy. (shoeSubString): Likewise. diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 04933187..fde74059 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -860,7 +860,7 @@ shoeCompTran x== $locVars:local:=nil $dollarVars:local:=nil shoeCompTran1 body - $locVars:=SETDIFFERENCE(SETDIFFERENCE($locVars, + $locVars:=setDifference(setDifference($locVars, $fluidVars),shoeATOMs args) body:= lvars:=append($fluidVars,$locVars) diff --git a/src/boot/initial-env.lisp b/src/boot/initial-env.lisp index df85b398..31024006 100644 --- a/src/boot/initial-env.lisp +++ b/src/boot/initial-env.lisp @@ -77,12 +77,6 @@ (defun setdifference (x y) (set-difference x y)) -(defun make-cvec (sint) - (make-string sint)) - -(defun MAKE-VEC (n) - (make-array n)) - (defun |shoeInputFile| (filespec ) (open filespec :direction :input :if-does-not-exist nil)) @@ -195,11 +189,6 @@ (defun bvec-setelt (bv i x) (setf (sbit bv i) x)) -(defun size (l) - (cond ((vectorp l) (length l)) - ((consp l) (list-length l)) - (t 0))) - (defun identp (a) (and (symbolp a) a)) diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot index 748fbe0b..f148cd84 100644 --- a/src/boot/scanner.boot +++ b/src/boot/scanner.boot @@ -458,7 +458,7 @@ shoeError()== shoeLeafError ($ln.n) shoeOrdToNum x== - DIGIT_-CHAR_-P x + digit? x shoeKeyWord st == GETHASH(st,shoeKeyTable) @@ -472,12 +472,12 @@ shoeMatch(l,i) == shoeSubStringMatch (l,d,i)== h := QENUM(l, i) u := d.h - ll := SIZE l + ll := #l done := false s1 := '"" - for j in 0.. SIZE u - 1 while not done repeat + for j in 0.. #u - 1 while not done repeat s := u.j - ls := SIZE s + ls := #s done := ls+i > ll => false eql := true diff --git a/src/boot/strap/scanner.clisp b/src/boot/strap/scanner.clisp index 42cb92e3..0fe763ad 100644 --- a/src/boot/strap/scanner.clisp +++ b/src/boot/strap/scanner.clisp @@ -545,16 +545,16 @@ (PROGN (SETQ |h| (QENUM |l| |i|)) (SETQ |u| (ELT |d| |h|)) - (SETQ |ll| (SIZE |l|)) + (SETQ |ll| (LENGTH |l|)) (SETQ |done| NIL) (SETQ |s1| "") - (LET ((|bfVar#2| (- (SIZE |u|) 1)) (|j| 0)) + (LET ((|bfVar#2| (- (LENGTH |u|) 1)) (|j| 0)) (LOOP (COND ((OR (> |j| |bfVar#2|) |done|) (RETURN NIL)) (T (PROGN (SETQ |s| (ELT |u| |j|)) - (SETQ |ls| (SIZE |s|)) + (SETQ |ls| (LENGTH |s|)) (SETQ |done| (COND ((< |ll| (+ |ls| |i|)) NIL) diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index 04f5b124..a918ca35 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -84,7 +84,7 @@ (COND ((< (LENGTH (ELT |u| |k|)) |l|) (RETURN NIL)) (T (SETQ |k| (+ |k| 1))))) - (SETQ |v| (MAKE-VEC (+ |n| 1))) + (SETQ |v| (MAKE-ARRAY (+ |n| 1))) (LET ((|bfVar#2| (- |k| 1)) (|i| 0)) (LOOP (COND @@ -108,9 +108,9 @@ (SETQ |l| (HKEYS |shoeKeyTable|)) (SETQ |d| (PROGN - (SETQ |a| (MAKE-VEC 256)) - (SETQ |b| (MAKE-VEC 1)) - (SETF (ELT |b| 0) (MAKE-CVEC 0)) + (SETQ |a| (MAKE-ARRAY 256)) + (SETQ |b| (MAKE-ARRAY 1)) + (SETF (ELT |b| 0) (MAKE-STRING 0)) (LET ((|i| 0)) (LOOP (COND @@ -209,7 +209,7 @@ (LIST '|canonicalFilename| 'PROBE-FILE) (LIST '|char?| 'CHARACTERP) (LIST '|cons?| 'CONSP) (LIST '|copy| 'COPY) (LIST '|croak| 'CROAK) - (LIST '|digit?| 'DIGITP) (LIST '|drop| 'DROP) + (LIST '|digit?| 'DIGIT-CHAR-P) (LIST '|drop| 'DROP) (LIST '|exit| 'EXIT) (LIST '|false| 'NIL) (LIST '|first| 'CAR) (LIST '|fourth| 'CADDDR) (LIST '|function| 'FUNCTION) (LIST '|gensym| 'GENSYM) @@ -218,10 +218,12 @@ (LIST '|list| 'LIST) (LIST '|lowerCase?| 'LOWER-CASE-P) (LIST '|mkpf| 'MKPF) (LIST '|nconc| 'NCONC) - (LIST '|nil| NIL) (LIST '|not| 'NOT) - (LIST '|nreverse| 'NREVERSE) (LIST '|null| 'NULL) - (LIST '|or| 'OR) (LIST '|otherwise| 'T) - (LIST '|property| 'GET) (LIST '|readByte| 'READ-BYTE) + (LIST '|newString| 'MAKE-STRING) + (LIST '|newVector| 'MAKE-ARRAY) (LIST '|nil| NIL) + (LIST '|not| 'NOT) (LIST '|nreverse| 'NREVERSE) + (LIST '|null| 'NULL) (LIST '|or| 'OR) + (LIST '|otherwise| 'T) (LIST '|property| 'GET) + (LIST '|readByte| 'READ-BYTE) (LIST '|readInteger| 'PARSE-INTEGER) (LIST '|readLine| 'READ-LINE) (LIST '|readOnly?| 'CONSTANTP) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index 9103d5e9..a44678b6 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -145,7 +145,7 @@ shoeInsert(s,d) == k:=0 while l <= #u.k repeat k:=k+1 - v := MAKE_-VEC(n+1) + v := newVector(n+1) for i in 0..k-1 repeat v.i := u.i v.k := s @@ -157,9 +157,9 @@ shoeInsert(s,d) == shoeDictCons()== l := HKEYS shoeKeyTable d := - a := MAKE_-VEC(256) - b := MAKE_-VEC(1) - b.0 := MAKE_-CVEC 0 + a := newVector 256 + b := newVector 1 + b.0 := newString 0 for i in 0..255 repeat a.i := b a @@ -172,7 +172,7 @@ shoeDict:=shoeDictCons() shoePunCons()== listing := HKEYS shoeKeyTable - a:=MAKE_-BVEC 256 + a := MAKE_-BVEC 256 for i in 0..255 repeat BVEC_-SETELT(a,i,0) for k in listing repeat if not shoeStartsId k.0 @@ -253,7 +253,7 @@ for i in [ _ ["cons?", "CONSP"] , _ ["copy", "COPY"] , _ ["croak", "CROAK"] , _ - ["digit?", "DIGITP"] , _ + ["digit?", "DIGIT-CHAR-P"] , _ ["drop", "DROP"] , _ ["exit", "EXIT"] , _ ["false", 'NIL] , _ @@ -269,6 +269,8 @@ for i in [ _ ["lowerCase?", "LOWER-CASE-P"], _ ["mkpf", "MKPF"] , _ ["nconc", "NCONC"] , _ + ["newString", "MAKE-STRING"], _ + ["newVector", "MAKE-ARRAY"], _ ["nil" ,NIL ] , _ ["not", "NOT"] , _ ["nreverse", "NREVERSE"] , _ |