[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*autoload-traps* bug ?



I can't understand the behaviour of the compiler of mcl2.0b1p3
concerning the variable *autoload-traps*. Consider the code at the
end of this mail, where the contents of the file foo is:

(with-focused-view
  (make-instance 'dialog)
  (#_moveto 10 10)
  (#_lineto 50 50))

After requiring the traps, it should be possible, to set
*autoload-traps* to nil. The first try to compile platte:foo
results in a warning, but after evaluating the second form
the second try to compile the file leads to the correct result.
This sounds like a bug to me.


Karsten Poeck
University of Karlsruhe
e-mail poeck@ira.uka.de

;;Start sample code
require :traps)

#|
-->
;Loading "platte:MACL 2 p3:Library:TRAPS.lisp"...
"TRAPS"
|#

(let ((*autoload-traps* nil))
  (compile-file "platte:foo")
  (macroexpand '(#_lineto 4 5))
  )

#|
-->
(CCL::%STACK-TRAP 43153 15 4 5)
T
;Compiler warnings for "platte:foo" :
;   Undefined function TRAPS::_MOVETO, in an anonymous lambda form.
|#

(let ((*autoload-traps* nil))
  (list (macroexpand '(#_lineto 4 5))
        (macroexpand '(#_moveto 4 5)))
  )

#|
-->
((CCL::%STACK-TRAP 43153 15 4 5) (CCL::%STACK-TRAP 43155 15 4 5))
|#

(let ((*autoload-traps* nil))
  (compile-file "platte:foo")
  (load "platte:foo")
  )

#|
->
;Loading "platte:foo"...
#1P"platte:foo"
and a nice dialog with a line
|#
;;End sample code