Changeset 12311


Ignore:
Timestamp:
Jun 28, 2009, 6:16:32 AM (10 years ago)
Author:
gb
Message:

Maybe really fix THE issues.

File:
1 edited

Legend:

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

    r12297 r12311  
    4545        (nx1-whine :type call)
    4646        (setq typespec t))
    47       (do* ()
    48            ((or (atom transformed)
    49                 (not (eq (car transformed) 'the))))
    50         (destructuring-bind (ftype form) (cdr transformed)
    51           (setq typespec (nx-target-type (nx1-type-intersect call typespec (typespec-for-the ftype)))
    52                 transformed form)))
    53       (make-acode
    54        (%nx1-operator typed-form)
    55        typespec
    56        (nx1-transformed-form transformed env)
    57        (nx-declarations-typecheck env)))))
     47      (flet ((fold-the ()
     48               (do* ()
     49                    ((or (atom transformed)
     50                         (not (eq (car transformed) 'the))))
     51                 (destructuring-bind (ftype form) (cdr transformed)
     52                   (setq typespec (nx-target-type (nx1-type-intersect call typespec (typespec-for-the ftype)))
     53                         *nx-form-type* typespec
     54                         transformed form)))))
     55        (fold-the)
     56        (do* ((last transformed transformed))
     57             ()
     58          (setq transformed (nx-transform transformed env))
     59          (when (or (atom transformed)
     60                    (not (eq (car transformed) 'the)))
     61            (return))
     62          (fold-the)
     63          (when (eq transformed last)
     64            (return)))
     65        (make-acode
     66         (%nx1-operator typed-form)
     67         typespec
     68         (let* ((*nx-form-type* typespec))
     69           (nx1-transformed-form transformed env))
     70         (nx-declarations-typecheck env))))))
    5871
    5972(defnx1 nx1-struct-ref struct-ref (&whole whole structure offset)
Note: See TracChangeset for help on using the changeset viewer.