Opened 10 years ago

Last modified 10 years ago

#590 new enhancement

Add way to tell compiler to ignore DYNAMIC-EXTENT decls

Reported by: rme Owned by: gb
Priority: minor Milestone:
Component: Compiler Version: trunk
Keywords: Cc:

Description

It seems like there should be some way to get the compiler to ignore DYNAMIC-EXTENT declarations (perhaps at some suitably high safety or debug values).

As far as I can tell, there's no way to do that.

Change History (1)

comment:1 Changed 10 years ago by boyer

It seems to me that safety = 3 already does ignore dynamic-extent. See the call to LISP below?

Actually, I think it should be the other way. I always used to tell myself that if I ran a program happily at safety=3, it would run ok at safety=0 on the same data, but it is just not true.

Bob

% ccl -n Welcome to Clozure Common Lisp Version 1.5-dev-r13293M-trunk (LinuxX8664)! ? (declaim (optimize (speed 0) (safety 3))) NIL ? (defun foo () (let ((l (list 1 2 3))) (declare (dynamic-extent l)) (length l))) FOO ? (disassemble 'foo) ;;; (defun foo () (let ((l (list 1 2 3))) (declare (dynamic-extent l)) (length l))) L0

[0] (leaq (@ (: L0) (% rip)) (% fn)) [7] (testl (% nargs) (% nargs)) [9] (jne L81) [11] (pushq (% rbp)) [12] (movq (% rsp) (% rbp))

;;; (let ((l (list 1 2 3))) (declare (dynamic-extent l)) (length l))

[15] (movq ($ 8) (% arg_x)) [22] (movq ($ 16) (% arg_y)) [29] (movq ($ 24) (% arg_z)) [36] (movl ($ 24) (% nargs)) [41] (movq (@ 'LIST (% fn)) (% temp0)) [48] (nop) [50] (callq (@ 10 (% temp0))) [53] (leaq (@ (: L0) (% rip)) (% fn)) [60] (pushq (% arg_z))

;;; (length l)

[61] (movl ($ 8) (% nargs)) [66] (movq (@ 'LENGTH (% fn)) (% temp0)) [73] (leaveq) [74] (jmpq (@ 10 (% temp0)))

;;; #<no source text> L81

[81] (uuo-error-wrong-number-of-args)

NIL ?

Note: See TracTickets for help on using tickets.