Currently sometimes BytecodeGenerator will emit an op_resolve_scope with the LocalClosureVar mode and 0 as the scope depth, which ultimately gets turned into an operation that just moves the scopeRegister() to the result. In cases like that, BytecodeGenerator should just use the scopeRegister() directly and not emit anything for scope resolution.
Created attachment 247637 [details] the patch Not quite ready for review yet, still need to run debug tests.
Running more tests now. It's looking good. I will run debug and release, 32-bit and 64-bit, before landing.
Comment on attachment 247637 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=247637&action=review r=me Pending tests pass and add ChangeLog description > Source/JavaScriptCore/ChangeLog:7 > + Please describe what the patch does?
(In reply to comment #3) > Comment on attachment 247637 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=247637&action=review > > r=me > Pending tests pass and add ChangeLog description > > > Source/JavaScriptCore/ChangeLog:7 > > + > > Please describe what the patch does? Yup, added locally.
Landed in http://trac.webkit.org/changeset/180875