Bug 138651 - Change DFG to use scope operand for op_resolve_scope
Summary: Change DFG to use scope operand for op_resolve_scope
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 312.x
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks: 136724
  Show dependency treegraph
 
Reported: 2014-11-11 20:30 PST by Michael Saboff
Modified: 2014-11-11 22:00 PST (History)
0 users

See Also:


Attachments
Patch (2.19 KB, patch)
2014-11-11 20:37 PST, Michael Saboff
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>