Currently we lazily intern globals into the global frame per-tree. This makes it difficult to switch between trees since we have to unbox different globals onto the global frame. Instead, track which global object is currently associated with the current context, and lazily add globals that any tree uses to a per-context list. All trees we activate unbox all globals in the list, allowing us to easily transition between trees without having to re-box or unbox any globals during said transition.
Created attachment 333144 [details] [diff] [review] Non-functional patch (more of a sketch, really).
This is a fix for 450535, but it doesn't solve the whole problem (449999) yet. http://hg.mozilla.org/index.cgi/tracemonkey/rev/cad6ca9a1e79
Confirmed to fix yahoo.
Two additional fixes: http://hg.mozilla.org/index.cgi/tracemonkey/rev/6c6266b8311c http://hg.mozilla.org/index.cgi/tracemonkey/rev/735b68bb8168 Globals are still per-tree, but all corner cases are intercepted and we should be sound (albeit not optimal wrt speed). I will keep working on the patch for the globals, but this is no longer an urgent blocker.
Status: NEW → ASSIGNED
Attachment #333144 - Attachment is obsolete: true
Created attachment 334492 [details] [diff] [review] Almost working path. Current state. Passes trace-tests but fails math-partial.
Created attachment 334527 [details] [diff] [review] Updated patch against tip.
Attachment #334492 - Attachment is obsolete: true
Pushed. Reviews + testing welcome. http://hg.mozilla.org/index.cgi/tracemonkey/rev/fca2a565f6c1 http://hg.mozilla.org/index.cgi/tracemonkey/rev/ab683b57667d
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Attachment #334527 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.