Ignore:
Timestamp:
12/26/04 18:45:37 (17 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r8292 r8297  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.315 2004-12-26 14:54:07 piso Exp $
     4;;; $Id: jvm.lisp,v 1.316 2004-12-26 18:45:37 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    404404    (error "Too many arguments for SETQ."))
    405405  (list 'SETQ (second form) (p1 (third form))))
     406
     407(defun p1-the (form)
     408;;   (dformat t "p1-the form = ~S~%" form)
     409;;   (if (= *safety* 3)
     410      (list 'THE (second form) (p1 (third form)))
     411;;       (p1 (third form))
     412;;       )
     413)
    406414
    407415(defun p1-default (form)
     
    508516(install-p1-handler 'symbol-macrolet      'identity)
    509517(install-p1-handler 'tagbody              'p1-tagbody)
    510 (install-p1-handler 'the                  'p1-lambda)
     518(install-p1-handler 'the                  'p1-the)
    511519(install-p1-handler 'throw                'p1-throw)
    512520(install-p1-handler 'unwind-protect       'p1-default)
     
    44104418             (emit-move-from-stack target))))))
    44114419
     4420(defun p2-the (form &key (target *val*) representation)
     4421;;   (dformat t "p2-the form = ~S~%" form)
     4422  (let ((type (second form))
     4423        (expr (third form)))
     4424  (cond
     4425   ((and (listp type) (eq (car type) 'VALUES))
     4426    ;; FIXME
     4427    (compile-form expr :target target :representation representation))
     4428   ((= *safety* 3)
     4429    (let* ((sym (gensym))
     4430           (new-expr
     4431            `(let ((,sym ,expr))
     4432               (sys::require-type ,sym ',type)
     4433               ,sym)))
     4434;;       (dformat t "new-expr = ~S~%" new-expr)
     4435      (compile-form (p1 new-expr) :target target :representation representation)))
     4436   (t
     4437    (compile-form expr :target target :representation representation)))))
     4438
    44124439(defun compile-catch (form &key (target *val*) representation)
    44134440  (when (= (length form) 2) ; (catch 'foo)
     
    49404967
    49414968      ;; Remove handler if its protected range is empty.
    4942       (delete-if (lambda (handler) (eql (symbol-value (handler-from handler))
    4943                                         (symbol-value (handler-to handler))))
    4944                  *handlers*)
     4969      (setf *handlers*
     4970            (delete-if (lambda (handler) (eql (symbol-value (handler-from handler))
     4971                                              (symbol-value (handler-to handler))))
     4972                       *handlers*))
    49454973
    49464974      (setf (method-max-locals execute-method) *registers-allocated*)
     
    50995127(install-p2-handler 'not    'compile-not/null)
    51005128(install-p2-handler 'null   'compile-not/null)
     5129(install-p2-handler 'the    'p2-the)
    51015130
    51025131(defun process-optimization-declarations (forms)
Note: See TracChangeset for help on using the changeset viewer.