The current code uses exec->scope(), but should be changed to use the scope register provided in the byte code.
This is for the LLInt and baseline JIT. The DFG and FTL changes will be done separately.
Created attachment 241390 [details] Patch
Comment on attachment 241390 [details] Patch r=me
Committed r175998: <http://trac.webkit.org/changeset/175998>
Comment on attachment 241390 [details] Patch I think it would be better for the JIT to load the scope into a register, and pass it to its helper functions as a JSScope*. It's awkward to ask a helper function to muck around in your stack in order to load things out. And it's not a viable strategy for our optimizing engines, which may choose not to store things back to the stack in simple ways.
(In reply to comment #5) > Comment on attachment 241390 [details] > Patch > > I think it would be better for the JIT to load the scope into a register, > and pass it to its helper functions as a JSScope*. > > It's awkward to ask a helper function to muck around in your stack in order > to load things out. And it's not a viable strategy for our optimizing > engines, which may choose not to store things back to the stack in simple > ways. The helper operationResolveScope() is only used by the baseline JIT. This is similar to the way operationPopScope() works, except that operationPopScope also writes the value back to the stack. The operationPush* helpers also write to the stack. Seems like we should change all to work the same way.