Changeset 4792


Ignore:
Timestamp:
11/16/03 19:39:25 (18 years ago)
Author:
piso
Message:

COMPILE-ATOM

File:
1 edited

Legend:

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

    r4776 r4792  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.35 2003-11-16 03:07:21 piso Exp $
     4;;; $Id: jvm.lisp,v 1.36 2003-11-16 19:39:25 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    18011801  (emit 'goto label)))
    18021802
     1803(defun compile-atom (form for-effect)
     1804  (unless (= (length form) 2)
     1805    (error "wrong number of arguments for ATOM"))
     1806  (compile-form (cadr form) nil)
     1807  (unless (remove-store-value)
     1808    (emit-push-value))
     1809  (emit 'instanceof +lisp-cons-class+)
     1810  (let ((label1 (gensym))
     1811        (label2 (gensym)))
     1812    (emit 'ifeq `,label1)
     1813    (emit-push-nil)
     1814    (emit 'goto `,label2)
     1815    (emit 'label `,label1)
     1816    (emit-push-t)
     1817    (emit 'label `,label2)
     1818    (emit-store-value)))
     1819
    18031820(defun compile-block (form for-effect)
    18041821   (let* ((rest (cdr form))
     
    22562273    (setf (get fun 'jvm-compile-handler) handler)))
    22572274
    2258 (mapc #'install-handler '(block
     2275(mapc #'install-handler '(atom
     2276                          block
    22592277                          declare
    22602278                          function
Note: See TracChangeset for help on using the changeset viewer.