Bug 140137 - MultiGetByOffset should be marked NodeMustGenerate
Summary: MultiGetByOffset should be marked NodeMustGenerate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-06 11:51 PST by Filip Pizlo
Modified: 2015-02-02 20:31 PST (History)
10 users (show)

See Also:


Attachments
the patch (3.50 KB, patch)
2015-02-02 19:48 PST, Filip Pizlo
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2015-01-06 11:51:21 PST
Nodes that perform speculations that are necessary to prove that the equivalent bytecode operation is pure must be marked NodeMustGenerate.  MultiGetByOffset checks the structure of its input.  If the incoming object didn't have that structure, then the equivalent bytecode operation (get_by_id) might do something effectful.  But, it's not marked NodeMustGenerate.  We should fix that.
Comment 1 Filip Pizlo 2015-02-02 19:48:51 PST
Created attachment 245919 [details]
the patch
Comment 2 Michael Saboff 2015-02-02 19:54:23 PST
Comment on attachment 245919 [details]
the patch

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

r=me with spelling fixes in ChangeLog.

> Source/JavaScriptCore/ChangeLog:10
> +        (JSC::DFG::Node::convertToMultiGetByOffset): Assert that we converted from something that alraedy had NodeMustGenerate.

*already*

> Source/JavaScriptCore/ChangeLog:11
> +        * dfg/DFGNodeType.h: We shouldn't DCE a node that does checks and could be effectful in bseline. Making MultiGetBYoffset as NodeMustGenerate prevents DCE. FTL could still DCE the actual loads, but the checks will stay.

*baseline*
Comment 3 Filip Pizlo 2015-02-02 19:55:11 PST
(In reply to comment #2)
> Comment on attachment 245919 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=245919&action=review
> 
> r=me with spelling fixes in ChangeLog.
> 
> > Source/JavaScriptCore/ChangeLog:10
> > +        (JSC::DFG::Node::convertToMultiGetByOffset): Assert that we converted from something that alraedy had NodeMustGenerate.
> 
> *already*
> 
> > Source/JavaScriptCore/ChangeLog:11
> > +        * dfg/DFGNodeType.h: We shouldn't DCE a node that does checks and could be effectful in bseline. Making MultiGetBYoffset as NodeMustGenerate prevents DCE. FTL could still DCE the actual loads, but the checks will stay.
> 
> *baseline*

Thanks!  Fixed both locally.
Comment 4 Filip Pizlo 2015-02-02 20:31:06 PST
Landed in http://trac.webkit.org/changeset/179536