Changeset 3517
- Timestamp:
- 08/25/03 18:22:58 (20 years ago)
- Location:
- trunk/j/src/org/armedbear/lisp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/Primitives.java
r3510 r3517 3 3 * 4 4 * Copyright (C) 2002-2003 Peter Graves 5 * $Id: Primitives.java,v 1.35 2 2003-08-25 17:56:59piso Exp $5 * $Id: Primitives.java,v 1.353 2003-08-25 18:20:21 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 571 571 // ### fixnump 572 572 private static final Primitive1 FIXNUMP = 573 new Primitive1("fixnump", PACKAGE_SYS, true) {573 new Primitive1("fixnump", PACKAGE_SYS, false) { 574 574 public LispObject execute(LispObject arg) throws LispError 575 575 { … … 1122 1122 // %setnth n list new-object => new-object 1123 1123 private static final Primitive3 _SETNTH = 1124 new Primitive3("%setnth", PACKAGE_SYS, true) {1124 new Primitive3("%setnth", PACKAGE_SYS, false) { 1125 1125 public LispObject execute(LispObject first, LispObject second, 1126 1126 LispObject third) throws LispError … … 4149 4149 // shrink-vector vector new-size => vector 4150 4150 private static final Primitive2 SHRINK_VECTOR = 4151 new Primitive2("shrink-vector", PACKAGE_SYS, true) {4151 new Primitive2("shrink-vector", PACKAGE_SYS, false) { 4152 4152 public LispObject execute(LispObject first, LispObject second) 4153 4153 throws LispError … … 4159 4159 4160 4160 private static final Primitive3 VECTOR_SUBSEQ = 4161 new Primitive3("vector-subseq", PACKAGE_SYS, true) {4161 new Primitive3("vector-subseq", PACKAGE_SYS, false) { 4162 4162 public LispObject execute(LispObject vector, LispObject start, 4163 4163 LispObject end) throws LispError … … 4646 4646 }; 4647 4647 4648 // ### %compare-elements4649 // %compare-elements test key elt1 elt24650 private static final Primitive _COMPARE_ELEMENTS =4651 new Primitive("%compare-elements", PACKAGE_SYS, true) {4652 public LispObject execute(LispObject args[]) throws Condition4653 {4654 if (args[1] == NIL) {4655 // No key function.4656 return funcall2(args[0], args[2], args[3],4657 LispThread.currentThread());4658 }4659 LispObject key = args[1];4660 final LispThread thread = LispThread.currentThread();4661 return funcall2(args[0],4662 funcall1(key, args[2], thread),4663 funcall1(key, args[3], thread),4664 thread);4665 }4666 };4667 4668 4648 // ### coerce-to-function 4669 4649 private static final Primitive1 COERCE_TO_FUNCTION = -
trunk/j/src/org/armedbear/lisp/delete-duplicates.lisp
r2729 r3517 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: delete-duplicates.lisp,v 1. 4 2003-07-02 18:32:30piso Exp $4 ;;; $Id: delete-duplicates.lisp,v 1.5 2003-08-25 18:22:58 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 59 59 (jndex jndex (1+ jndex))) 60 60 ((= index length) 61 (s ys:shrink-vector vector jndex)61 (shrink-vector vector jndex) 62 62 vector) 63 63 (setf (aref vector jndex) (aref vector index)))) -
trunk/j/src/org/armedbear/lisp/mismatch.lisp
r2714 r3517 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: mismatch.lisp,v 1. 3 2003-07-02 16:42:04piso Exp $4 ;;; $Id: mismatch.lisp,v 1.4 2003-08-25 18:22:58 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 29 29 30 30 (defun the-end (x y) 31 (cond ((sys: fixnump x)31 (cond ((sys::fixnump x) 32 32 (unless (<= x (length y)) 33 33 (bad-seq-limit x)) … … 38 38 39 39 (defun the-start (x) 40 (cond ((sys: fixnump x)40 (cond ((sys::fixnump x) 41 41 (unless (>= x 0) 42 42 (bad-seq-limit x)) -
trunk/j/src/org/armedbear/lisp/remove-duplicates.lisp
r2727 r3517 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: remove-duplicates.lisp,v 1. 3 2003-07-02 18:20:29piso Exp $4 ;;; $Id: remove-duplicates.lisp,v 1.4 2003-08-25 18:22:58 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 85 85 (setq index (1+ index)) 86 86 (setq jndex (1+ jndex))) 87 (sys: shrink-vector result jndex)))87 (sys::shrink-vector result jndex))) 88 88 89 89 -
trunk/j/src/org/armedbear/lisp/replace.lisp
r2714 r3517 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: replace.lisp,v 1. 2 2003-07-02 16:42:23piso Exp $4 ;;; $Id: replace.lisp,v 1.3 2003-08-25 18:22:58 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 28 28 29 29 (defun the-end (x y) 30 (cond ((sys: fixnump x)30 (cond ((sys::fixnump x) 31 31 (unless (<= x (length y)) 32 32 (bad-seq-limit x)) … … 37 37 38 38 (defun the-start (x) 39 (cond ((sys: fixnump x)39 (cond ((sys::fixnump x) 40 40 (unless (>= x 0) 41 41 (bad-seq-limit x)) -
trunk/j/src/org/armedbear/lisp/search.lisp
r3247 r3517 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: search.lisp,v 1.1 3 2003-08-06 23:08:20piso Exp $4 ;;; $Id: search.lisp,v 1.14 2003-08-25 18:22:58 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 22 22 ;; From CMUCL. 23 23 24 ;; (defmacro compare-elements (elt1 elt2)25 ;; `(if test-not26 ;; (if (%compare-elements test-not key ,elt1 ,elt2)27 ;; (return nil)28 ;; t)29 ;; (if (%compare-elements test key ,elt1 ,elt2)30 ;; t31 ;; (return nil))))32 24 (defmacro compare-elements (elt1 elt2) 33 25 `(if test-not -
trunk/j/src/org/armedbear/lisp/substitute.lisp
r3242 r3517 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: substitute.lisp,v 1. 6 2003-08-06 19:17:17piso Exp $4 ;;; $Id: substitute.lisp,v 1.7 2003-08-25 18:22:58 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 27 27 (defmacro real-count (count) 28 28 `(cond ((null ,count) most-positive-fixnum) 29 ((sys: fixnump ,count) (if (minusp ,count) 0 ,count))29 ((sys::fixnump ,count) (if (minusp ,count) 0 ,count)) 30 30 ((integerp ,count) (if (minusp ,count) 0 most-positive-fixnum)) 31 31 (t ,count)))
Note: See TracChangeset
for help on using the changeset viewer.