[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #842: trace: Procedure called with incorrect number o
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #842: trace: Procedure called with incorrect number of arguments (but still magically works) |
Date: |
Sun, 13 May 2012 17:41:34 -0000 |
#842: trace: Procedure called with incorrect number of arguments (but still
magically works)
------------------------+---------------------------------------------------
Reporter: sjamaan | Owner: felix
Type: defect | Status: new
Priority: minor | Milestone:
Component: extensions | Version: 4.7.x
Keywords: |
------------------------+---------------------------------------------------
The trace egg calls its {{{walk-module}}} procedure with two arguments,
but accepts exactly three arguments.
I don't understand why it still works, though:
{{{
$ csi
#;1> (use trace)
#;2> (module foo (bar) (import chicken scheme) (define (bar x) (+ x 1)))
#;3> (trace-module 'foo)
; tracing bar
}}}
Perhaps the extra argument gets "optimized" away because it is never used?
I'd normally say this is a bug in the compiler, but it does warn when you
enable scrutiny so it's probably fine to keep the compiler the way it is.
{{{
Index: trace.scm
===================================================================
--- trace.scm (revision 26685)
+++ trace.scm (working copy)
@@ -223,7 +223,7 @@
((if (traced? proc) do-untrace do-trace) (list proc)))
procs))
-(define (walk-module mname proc warn)
+(define (walk-module mname proc)
(let* ((m (##sys#find-module mname))
(exps (nth-value 1 (##sys#module-exports m))))
(for-each
}}}
By the way, the trace module has no author field in the meta-file. If you
don't want to maintain it, maybe you can just put in "the chicken team" or
something.
This was found by Mario's specialization run of salmonella:
http://parenteses.org/mario/misc/specialize-report/install/trace.html
--
Ticket URL: <http://bugs.call-cc.org/ticket/842>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #842: trace: Procedure called with incorrect number of arguments (but still magically works),
Chicken Trac <=