Bug 125433 - Hoist and combine array bounds checks
Summary: Hoist and combine array bounds checks
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: 125253 125480 125519 128635 128910
Blocks: 112840
  Show dependency treegraph
 
Reported: 2013-12-08 19:54 PST by Filip Pizlo
Modified: 2014-02-17 07:14 PST (History)
15 users (show)

See Also:


Attachments
work in progress (19.66 KB, patch)
2014-02-11 16:41 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
almost done (30.88 KB, patch)
2014-02-11 19:05 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
more!! (49.18 KB, patch)
2014-02-11 23:16 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (72.62 KB, patch)
2014-02-12 15:57 PST, Filip Pizlo
mhahnenberg: 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 2013-12-08 19:54:43 PST
Patch forthcoming.
Comment 1 Filip Pizlo 2014-02-11 16:41:02 PST
Created attachment 223912 [details]
work in progress
Comment 2 Filip Pizlo 2014-02-11 19:05:06 PST
Created attachment 223929 [details]
almost done

I would test this except I'm blocked on https://bugs.webkit.org/show_bug.cgi?id=128635.
Comment 3 Filip Pizlo 2014-02-11 23:16:43 PST
Created attachment 223943 [details]
more!!

It successfully eliminated some overflow checks
Comment 4 WebKit Commit Bot 2014-02-12 01:09:48 PST
Attachment 223943 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/dfg/DFGIntegerCheckHoistingPhase.cpp:30:  You should not add a blank line before implementation file's own header.  [build/include_order] [4]
ERROR: Source/JavaScriptCore/dfg/DFGIntegerCheckHoistingPhase.cpp:287:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/JavaScriptCore/dfg/DFGIntegerCheckHoistingPhase.cpp:310:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Total errors found: 3 in 33 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Filip Pizlo 2014-02-12 15:57:24 PST
Created attachment 224020 [details]
the patch
Comment 6 Mark Hahnenberg 2014-02-12 17:08:27 PST
Comment on attachment 224020 [details]
the patch

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

r=me

> Source/JavaScriptCore/dfg/DFGAbstractValue.cpp:77
>          m_futurePossibleStructure.clear();
>          m_arrayModes = 0;
>      }
> -        
> +    
>      m_type = speculationFromValue(value);
>      if (m_type == SpecInt52AsDouble)
>          m_type = SpecInt52;
>      m_value = value;
> -        
> +    
>      checkConsistency();
>  }
>  

Revert.

> Source/JavaScriptCore/dfg/DFGInsertionSet.h:62
>      {
>          return insert(Insertion(index, element));
>      }
> -
> +    
>  #define DFG_DEFINE_INSERT_NODE(templatePre, templatePost, typeParams, valueParamsComma, valueParams, valueArgs) \
>      templatePre typeParams templatePost Node* insertNode(size_t index, SpeculatedType type valueParamsComma valueParams) \
>      { \

Revert.
Comment 7 Filip Pizlo 2014-02-13 14:42:06 PST
Landed in http://trac.webkit.org/changeset/164059