Changeset 4874


Ignore:
Timestamp:
11/23/03 17:59:53 (18 years ago)
Author:
piso
Message:

COMPILE-CONS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/jvm.lisp

    r4800 r4874  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.43 2003-11-17 02:27:16 piso Exp $
     4;;; $Id: jvm.lisp,v 1.44 2003-11-23 17:59:53 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    636636         (setf (instruction-args instruction) (u2 index))
    637637         instruction))
    638       ((189 ; ANEWARRAY class-name
    639         193 ; INSTANCEOF
     638      ((187 ; NEW class-name
     639        189 ; ANEWARRAY class-name
     640        193 ; INSTANCEOF class-name
    640641        )
    641642       (let ((index (pool-class (first args))))
     
    719720    (179 ; PUTSTATIC
    720721     -1)
     722    (187 ; NEW
     723     1)
    721724    (189 ; ANEWARRAY
    722725     0)
     
    18331836    (emit 'label `,block-exit)))
    18341837
     1838(defun compile-cons (form for-effect)
     1839  (unless (= (length form) 3)
     1840    (error "wrong number of arguments for CONS"))
     1841  (emit 'new +lisp-cons-class+)
     1842  (emit 'dup)
     1843  (compile-form (second form))
     1844  (unless (remove-store-value)
     1845    (emit-push-value))
     1846  (compile-form (third form))
     1847  (unless (remove-store-value)
     1848    (emit-push-value))
     1849  (emit-invokespecial "org/armedbear/lisp/Cons"
     1850                      "<init>"
     1851                      "(Lorg/armedbear/lisp/LispObject;Lorg/armedbear/lisp/LispObject;)V"
     1852                      -3)
     1853  (emit-store-value))
     1854
    18351855(defun compile-progn (form for-effect)
    18361856  (do ((forms (cdr form) (cdr forms)))
     
    23272347(mapc #'install-handler '(atom
    23282348                          block
     2349                          cons
    23292350                          declare
    23302351                          function
Note: See TracChangeset for help on using the changeset viewer.