Bug 142153

Summary: BytecodeGenerator shouldn't emit op_resolve_scope as a roundabout way of returning the scopeRegister
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 141174    
Attachments:
Description Flags
the patch msaboff: review+

Description Filip Pizlo 2015-03-01 12:52:17 PST
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.
Comment 1 Filip Pizlo 2015-03-01 12:53:15 PST
Created attachment 247637 [details]
the patch

Not quite ready for review yet, still need to run debug tests.
Comment 2 Filip Pizlo 2015-03-01 13:04:24 PST
Running more tests now.  It's looking good.  I will run debug and release, 32-bit and 64-bit, before landing.
Comment 3 Michael Saboff 2015-03-01 13:14:06 PST
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?
Comment 4 Filip Pizlo 2015-03-01 13:19:58 PST
(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.
Comment 5 Filip Pizlo 2015-03-01 18:09:20 PST
Landed in http://trac.webkit.org/changeset/180875