[haXe] rfc: callstack tracer patch
Tommy Olesen
hojfeld at gmail.com
Mon May 22 18:55:28 CEST 2006
Dear Nicolas & others,
Here is further work on the callstack patch. Now there is also a
transformation that inserts a runtime check on each call that the
object is not null. If - at runtime - a method is called on null, the
call stack is printed, including the filename & line number of the
offending line. We have already fixed bugs in our code using this -
not just "dodgy code kind of bugs", but real bugs that had annoyed us
for some time.
The transformation makes the program slower, but for us this is not a
problem, as we only turn it on when debugging. I have added a flag
"-D runtimechecking" to control this as you suggested.
Do you think we should put the patch on the wiki, so others finding it
useful can have it? (That is, if you do not want to include it in the
current compiler. If not, maybe it would be useful to include it on a
branch in your cvs?)
Kind Regards,
Tommy
On 07/05/06, Asger Ottar Alstrup <asger at area9.dk> wrote:
>
>
> On 5/6/06, Benjamin Dasnois <benjamin.dasnois at gmail.com> wrote:
> > Can't we use this patch to generate our own stack-trace even if the
> > browser has one? That would be great and would make it possible to
> > have the same type of stack-trace on all browsers.
>
>
> Since it works at the AST level, it should work for the javascript backend
> if you add the few things from flash/boot.hx to js/boot.hx.
>
> Regards,
> Asger
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: runtimechecking.patch
Type: application/octet-stream
Size: 16307 bytes
Desc: not available
Url : http://lists.motion-twin.com/pipermail/haxe/attachments/20060522/84b6ce1f/runtimechecking.obj
More information about the Haxe
mailing list