Changeset 4796


Ignore:
Timestamp:
11/16/03 21:59:43 (18 years ago)
Author:
piso
Message:

COMPILE-RPLACD

File:
1 edited

Legend:

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

    r4795 r4796  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.39 2003-11-16 21:33:09 piso Exp $
     4;;; $Id: jvm.lisp,v 1.40 2003-11-16 21:59:43 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    19071907            (error "COMPILE-QUOTE: unsupported case: ~S" form)))))
    19081908
     1909(defun compile-rplacd (form for-effect)
     1910  (let ((args (cdr form)))
     1911    (unless (= (length args) 2)
     1912      (error "wrong number of arguments for RPLACD"))
     1913    (compile-form (first args))
     1914    (unless (remove-store-value)
     1915      (emit-push-value))
     1916    (unless for-effect
     1917      (emit 'dup))
     1918    (compile-form (second args))
     1919    (unless (remove-store-value)
     1920      (emit-push-value))
     1921    (emit-invokevirtual +lisp-object-class+
     1922                        "setCdr"
     1923                        "(Lorg/armedbear/lisp/LispObject;)V"
     1924                        -2)
     1925    (unless for-effect
     1926      (emit-store-value))))
     1927
    19091928(defun compile-declare (form for-effect)
    19101929  ;; Nothing to do.
     
    23122331                          quote
    23132332                          return-from
     2333                          rplacd
    23142334                          setq
    23152335                          tagbody
Note: See TracChangeset for help on using the changeset viewer.