Changeset 9257


Ignore:
Timestamp:
Apr 24, 2008, 9:04:01 AM (12 years ago)
Author:
gb
Message:

In NX1-THE, try to persuade the backend to do typechecking when
NX-THE-TYPECHECKS returns true.

(Needs PPC support, too.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/nx1.lisp

    r8757 r9257  
    2020(defnx1 nx1-the the (&whole call typespec form &environment env)
    2121  (if (and (self-evaluating-p form)
    22                (not (typep form typespec))
    23                (progn (nx1-whine :type call) t))
     22           (not (typep form typespec))
     23           (progn (nx1-whine :type call) t))
    2424    (setq typespec t))
    2525  ;; Allow VALUES types here (or user-defined types that
     
    3333    (if (and (consp transformed)
    3434             (eq (car transformed) 'the))
    35         (setq transformed form))
    36     (make-acode
    37      (%nx1-operator typed-form)
    38      typespec
    39      (nx1-transformed-form transformed env))))
     35      (setq transformed form))
     36    ;; Doing this in this bizarre way may be a little easier
     37    ;; to bootstrap.
     38    (if (nx-the-typechecks env)
     39      (make-acode
     40       (%nx1-operator typed-form)
     41       typespec
     42       (nx1-transformed-form transformed env)
     43       t)
     44      (make-acode
     45       (%nx1-operator typed-form)
     46       typespec
     47       (nx1-transformed-form transformed env)))))
    4048
    4149(defnx1 nx1-struct-ref struct-ref (&whole whole structure offset)
Note: See TracChangeset for help on using the changeset viewer.