Malcolm Wallace wrote:
Simon Marlow <[EMAIL PROTECTED]> wrote:


Calling a function on entry to every single BCO would be
very  costly.

The interpreter could check before entering a BCO whether there was a breakpoint set on that BCO. That's nearly equivalent to the implementation I proposed before (overwriting the BCO with a
breakpoint  object) and might be simpler, I'm not sure.


Just storing a flag byte in the header of every BCO would be very cheap
I imagine.  And there must be some overhead in entering the interpreter
for a BCO anyway, so adding an extra check on the "breakpoint" flag at
the beginning of the interpreter loop should not cause a great slowdown?

I don't know why people are so interested in this minor aspect of the design! But sure, adding a flag to the BCO object is another possibility. Or just changing its header from a BCO to a BCO_BREAK object.

Some other questions are: how to map from source location to BCO (GHC doesn't retain enough information except at top-level functions right now), and how to add information about free variables to the BCO. These questions are sidestepped by Lemmih's implementation, fortunately.

Cheers,
        Simon
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to