Changeset 8302


Ignore:
Timestamp:
12/27/04 15:23:22 (17 years ago)
Author:
piso
Message:

COMPILE-PLUS, COMPILE-MINUS: 3-arg case

File:
1 edited

Legend:

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

    r8301 r8302  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.319 2004-12-27 14:20:04 piso Exp $
     4;;; $Id: jvm.lisp,v 1.320 2004-12-27 15:23:22 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    41394139         (dformat t "compile-plus case 8~%")
    41404140         (compile-binary-operation "add" args target representation)))))
     4141    (4
     4142     (dformat t "compile-plus case 9~%")
     4143     ;; (+ a b c) => (+ (+ a b) c)
     4144     (let ((new-form `(+ (+ ,(second form) ,(third form)) ,(fourth form))))
     4145       (dformat t "form = ~S~%" form)
     4146       (dformat t "new-form = ~S~%" new-form)
     4147       (compile-plus new-form :target target :representation representation)))
    41414148    (t
    4142      (dformat t "compile-plus case 9~%")
     4149     (dformat t "compile-plus case 10~%")
    41434150     (compile-function-call form target representation))))
    41444151
     
    42284235         (dformat t "compile-minus case 8~%")
    42294236         (compile-binary-operation "subtract" args target representation)))))
     4237    (4
     4238     (dformat t "compile-minus case 9~%")
     4239     ;; (- a b c) => (- (- a b) c)
     4240     (let ((new-form `(- (- ,(second form) ,(third form)) ,(fourth form))))
     4241       (dformat t "form = ~S~%" form)
     4242       (dformat t "new-form = ~S~%" new-form)
     4243       (compile-minus new-form :target target :representation representation)))
    42304244    (t
    4231      (dformat t "compile-minus case 9~%")
     4245     (dformat t "compile-minus case 10~%")
    42324246     (compile-function-call form target representation))))
    42334247
Note: See TracChangeset for help on using the changeset viewer.