Bug 148367 - DFG::InsertionSet should be tolerant of occasional out-of-order insertions
Summary: DFG::InsertionSet should be tolerant of occasional out-of-order insertions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 145204
  Show dependency treegraph
 
Reported: 2015-08-22 19:40 PDT by Filip Pizlo
Modified: 2015-08-24 14:11 PDT (History)
11 users (show)

See Also:


Attachments
the patch (16.66 KB, patch)
2015-08-22 19:45 PDT, Filip Pizlo
ggaren: 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-08-22 19:40:44 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2015-08-22 19:45:47 PDT
Created attachment 259730 [details]
the patch
Comment 2 Geoffrey Garen 2015-08-24 10:45:03 PDT
Comment on attachment 259730 [details]
the patch

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

r=me

> Source/JavaScriptCore/ChangeLog:19
> +        It seems like it would be best to just lift this restrictions.

restriction
Comment 3 Saam Barati 2015-08-24 10:46:03 PDT
Comment on attachment 259730 [details]
the patch

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

r=me

> Source/JavaScriptCore/dfg/DFGInsertionSet.cpp:35
> +    for (size_t index = m_insertions.size() - 1; index--;) {

Even though this is checked at the call site for this function, it might be nice for documentation's sake to assert that the last element's index is larger than what we're inserting.
Comment 4 Filip Pizlo 2015-08-24 13:59:29 PDT
(In reply to comment #2)
> Comment on attachment 259730 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259730&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/ChangeLog:19
> > +        It seems like it would be best to just lift this restrictions.
> 
> restriction

Fixed.
Comment 5 Filip Pizlo 2015-08-24 13:59:37 PDT
(In reply to comment #3)
> Comment on attachment 259730 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259730&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/dfg/DFGInsertionSet.cpp:35
> > +    for (size_t index = m_insertions.size() - 1; index--;) {
> 
> Even though this is checked at the call site for this function, it might be
> nice for documentation's sake to assert that the last element's index is
> larger than what we're inserting.

Done.
Comment 6 Filip Pizlo 2015-08-24 14:11:48 PDT
Landed in http://trac.webkit.org/changeset/188879