mes: Move pair? to core.
* src/lib.c (pair_p): New function. Gains 8% performance on MesCC.
This commit is contained in:
parent
4e1f494d19
commit
d9199b3536
|
@ -42,7 +42,6 @@
|
||||||
;; end boot-00.scm
|
;; end boot-00.scm
|
||||||
|
|
||||||
;; boot-01.scm
|
;; boot-01.scm
|
||||||
(define (pair? x) (eq? (core:type x) <cell:pair>))
|
|
||||||
(define (not x) (if x #f #t))
|
(define (not x) (if x #f #t))
|
||||||
|
|
||||||
(define (display x . rest)
|
(define (display x . rest)
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
;; end boot-00.scm
|
;; end boot-00.scm
|
||||||
|
|
||||||
;; boot-01.scm
|
;; boot-01.scm
|
||||||
(define (pair? x) (eq? (core:type x) <cell:pair>))
|
|
||||||
(define (not x) (if x #f #t))
|
(define (not x) (if x #f #t))
|
||||||
|
|
||||||
(define (display x . rest)
|
(define (display x . rest)
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
;; end boot-00.scm
|
;; end boot-00.scm
|
||||||
|
|
||||||
;; boot-01.scm
|
;; boot-01.scm
|
||||||
(define (pair? x) (eq? (core:type x) <cell:pair>))
|
|
||||||
(define (not x) (if x #f #t))
|
(define (not x) (if x #f #t))
|
||||||
|
|
||||||
(define (display x . rest)
|
(define (display x . rest)
|
||||||
|
|
|
@ -75,9 +75,6 @@
|
||||||
(define (number? x)
|
(define (number? x)
|
||||||
(eq? (core:type x) <cell:number>))
|
(eq? (core:type x) <cell:number>))
|
||||||
|
|
||||||
(define (pair? x)
|
|
||||||
(eq? (core:type x) <cell:pair>))
|
|
||||||
|
|
||||||
(define (port? x)
|
(define (port? x)
|
||||||
(eq? (core:type x) <cell:port>))
|
(eq? (core:type x) <cell:port>))
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,6 @@
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define (pair? x)
|
|
||||||
(eq? (core:type x) <cell:pair>))
|
|
||||||
|
|
||||||
(define (atom? x)
|
(define (atom? x)
|
||||||
(if (pair? x) #f
|
(if (pair? x) #f
|
||||||
(if (null? x) #f
|
(if (null? x) #f
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define (pair? x) (eq? (core:type x) <cell:pair>))
|
|
||||||
|
|
||||||
(define (not x) (if x #f #t))
|
(define (not x) (if x #f #t))
|
||||||
|
|
||||||
(define-macro (or . x)
|
(define-macro (or . x)
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define (pair? x) (eq? (core:type x) <cell:pair>))
|
|
||||||
(define (vector? x)
|
(define (vector? x)
|
||||||
(eq? (core:type x) <cell:vector>))
|
(eq? (core:type x) <cell:vector>))
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
(define <cell:pair> 7)
|
(define <cell:pair> 7)
|
||||||
(define <cell:string> 10)
|
(define <cell:string> 10)
|
||||||
|
|
||||||
(define (pair? x) (eq? (core:type x) <cell:pair>))
|
|
||||||
(define (not x) (if x #f #t))
|
(define (not x) (if x #f #t))
|
||||||
|
|
||||||
(define (display x . rest)
|
(define (display x . rest)
|
||||||
|
|
Loading…
Reference in New Issue