Patch coming.
Created attachment 24065 [details] patch This is a work-in-progress patch for dynamically recompiling with debugger / profiler hooks. Currently, it's set up to recompile on a timer, or when you attach the debugger. But there are problems: * Seem to be some cases where a function doesn't round-trip correctly from source * Recompiling on a timer seems to break event handling in dojo demos, gmail.com, and the debugger * The debugger sometimes crashes Also, the final version would need to add profiler hook opcodes to the machine, along with logic for emitting them when appropriate, in order to get the speedup. I was hoping to have this done by the time I left for vacation, but it didn't come together, so I'm posting it in case anyone wants to have a crack at finishing it while I'm gone.
Created attachment 24066 [details] patch Added a missing file to the patch.
I'm merging this patch with TOT so I can do some testing.
Created attachment 24228 [details] patch, merged to ToT, with a couple small changes I merged. I fixed a couple issues I noticed. I changed the code that recompiles functions to use ProtectedPtr for the JSFunction objects. But maybe that's not needed, because nothing can be allocated during the recompile timer? I changed the recompile timer to call JSGlobalObject::globalExec() instead of JSDOMWindowBase::globalExec(), because otherwise we'll die when recompiling functions attached to pages that are closed and have no frames. I did a few other tweaks. So far I haven't been able to get much of this to work. I die inside assertions in the debugger and I can't even tell if they're caused by the patch or not.
I think the Page.h/cpp part of this patch should probably be dumped.
Since nothing starts the timer! Maybe it just happened to be turned off when Geoff posted the patch?
> Since nothing starts the timer! Maybe it just happened to be turned off when > Geoff posted the patch? Yeah, I posted the patch with the timer turned off. I was using the timer as a stress tester.
Created attachment 24367 [details] patch, finished product with no known bugs
*** Bug 21616 has been marked as a duplicate of this bug. ***
Comment on attachment 24367 [details] patch, finished product with no known bugs r=me
Committed revision 37622. Darin mentioned in person that we might crash when starting debugging from within a modal dialog. Due to bug 21626, I wasn't able to verify if that was the case or not. So, for the time being, I've just added an ASSERT with an early return to cover the possibility.