Bug 138651

Summary: Change DFG to use scope operand for op_resolve_scope
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 312.x   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 136724    
Attachments:
Description Flags
Patch ggaren: review+

Description Michael Saboff 2014-11-11 20:30:07 PST
The DFG should use the scope operand provided by op_resolve_scope.
Comment 1 Michael Saboff 2014-11-11 20:37:46 PST
Created attachment 241412 [details]
Patch
Comment 2 Geoffrey Garen 2014-11-11 21:25:43 PST
Comment on attachment 241412 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241412&action=review

r=me

> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2304
> +Node* ByteCodeParser::getScope(VirtualRegister scope, unsigned skipCount)

Strange to call a function named "get scope" and pass it a thing named "scope".

A better name for this argument would be scopeChain, since it's the list of possible scopes, but the head is not necessarily the one you want to get.
Comment 3 Michael Saboff 2014-11-11 21:59:52 PST
(In reply to comment #2)
> Comment on attachment 241412 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241412&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2304
> > +Node* ByteCodeParser::getScope(VirtualRegister scope, unsigned skipCount)
> 
> Strange to call a function named "get scope" and pass it a thing named
> "scope".
> 
> A better name for this argument would be scopeChain, since it's the list of
> possible scopes, but the head is not necessarily the one you want to get.

I changed the argument's name to scopeChain.
Comment 4 Michael Saboff 2014-11-11 22:00:41 PST
Committed r176005: <http://trac.webkit.org/changeset/176005>