Ignore:
Timestamp:
Apr 9, 2009, 9:41:28 PM (11 years ago)
Author:
rme
Message:

Merge r11805 through r11809 (format control string checker) from trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/1.3/source/compiler/nx0.lisp

    r11747 r11921  
    19001900        (list (%nx1-operator typed-form) type form)))))
    19011901
     1902(defvar *format-arg-functions* '((format . 1) (format-to-string . 1) (error . 0) (warn . 0)
     1903                                 (y-or-n-p . 0) (yes-or-no-p . 0)
     1904                                 (signal-simple-program-error . 0)
     1905                                 (signal-simple-condition . 1)
     1906                                 (signal-reader-error . 1)
     1907                                 (%method-combination-error . 0)
     1908                                 (%invalid-method-error . 1)
     1909                                 (nx-compile-time-error . 0)
     1910                                 (nx-error . 0)
     1911                                 (compiler-bug . 0)))
     1912
     1913#-BOOTSTRAPPED (unless (fboundp 'nx1-check-format-call) (fset 'nx1-check-format-call (lambda (&rest x) (declare (ignore x)))))
     1914
    19021915;;; Wimpy.
    19031916(defun nx1-call-result-type (sym &optional (args nil args-p) spread-p)
     
    19191932        (nx1-whine :undefined-function sym))
    19201933      (setq whined t))
     1934    (when (and args-p
     1935               (not spread-p)
     1936               (setq somedef (cdr (assq sym *format-arg-functions*)))
     1937               (setq somedef (nthcdr somedef args))
     1938               (stringp (car somedef)))
     1939      (when (nx1-check-format-call (car somedef) (cdr somedef) env)
     1940        (setq whined t)))
    19211941    (when (and args-p (setq somedef (or lexenv-def defenv-def global-def)))
    19221942      (multiple-value-bind (deftype reason)
Note: See TracChangeset for help on using the changeset viewer.