Changeset 204697 in webkit


Ignore:
Timestamp:
Aug 21, 2016 12:45:50 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

[DFG] Should not fixup AnyIntUse in 32_64
https://bugs.webkit.org/show_bug.cgi?id=161029

Reviewed by Saam Barati.

JSTests:

  • typeProfiler/int52-dfg.js: Added.

(test):

  • typeProfiler/number-filter-dfg.js: Added.

(test):

Source/JavaScriptCore:

DFG fixup phase uses AnyIntUse even in 32bit DFG. This patch removes this incorrect filtering.
If the 32bit DFG see the TypeAnyInt, it should fallback to the NumberUse case.

And this patch also fixes the case that the type set only contains TypeNumber. Previously,
we used NumberUse edge filtering. But it misses AnyInt logging: While the NumberUse filter
passes both TypeAnyInt and TypeNumber, the type set only logged TypeNumber.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r204670 r204697  
     12016-08-21  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [DFG] Should not fixup AnyIntUse in 32_64
     4        https://bugs.webkit.org/show_bug.cgi?id=161029
     5
     6        Reviewed by Saam Barati.
     7
     8        * typeProfiler/int52-dfg.js: Added.
     9        (test):
     10        * typeProfiler/number-filter-dfg.js: Added.
     11        (test):
     12
    1132016-08-19  Benjamin Poulain  <bpoulain@apple.com>
    214
  • trunk/Source/JavaScriptCore/ChangeLog

    r204686 r204697  
     12016-08-21  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [DFG] Should not fixup AnyIntUse in 32_64
     4        https://bugs.webkit.org/show_bug.cgi?id=161029
     5
     6        Reviewed by Saam Barati.
     7
     8        DFG fixup phase uses AnyIntUse even in 32bit DFG. This patch removes this incorrect filtering.
     9        If the 32bit DFG see the TypeAnyInt, it should fallback to the NumberUse case.
     10
     11        And this patch also fixes the case that the type set only contains TypeNumber. Previously,
     12        we used NumberUse edge filtering. But it misses AnyInt logging: While the NumberUse filter
     13        passes both TypeAnyInt and TypeNumber, the type set only logged TypeNumber.
     14
     15        * dfg/DFGFixupPhase.cpp:
     16        (JSC::DFG::FixupPhase::fixupNode):
     17
    1182016-08-20  Brian Burg  <bburg@apple.com>
    219
  • trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

    r204670 r204697  
    14601460            RuntimeTypeMask seenTypes = typeSet->seenTypes();
    14611461            if (typeSet->doesTypeConformTo(TypeAnyInt)) {
    1462                 if (node->child1()->shouldSpeculateInt32())
     1462                if (node->child1()->shouldSpeculateInt32()) {
    14631463                    fixEdge<Int32Use>(node->child1());
    1464                 else
     1464                    node->remove();
     1465                    break;
     1466                }
     1467
     1468                if (enableInt52()) {
    14651469                    fixEdge<AnyIntUse>(node->child1());
    1466                 node->remove();
    1467             } else if (typeSet->doesTypeConformTo(TypeNumber | TypeAnyInt)) {
     1470                    node->remove();
     1471                    break;
     1472                }
     1473
     1474                // Must not perform fixEdge<NumberUse> here since the type set only includes TypeAnyInt. Double values should be logged.
     1475            }
     1476
     1477            if (typeSet->doesTypeConformTo(TypeNumber | TypeAnyInt) && ((seenTypes & TypeNumber) && (seenTypes & TypeAnyInt))) {
     1478                // NumberUse can pass TypeNumber and TypeAnyInt. Thus, this node removal is allowed only if both TypeNumber and TypeAnyInt are logged in the type set.
    14681479                fixEdge<NumberUse>(node->child1());
    14691480                node->remove();
Note: See TracChangeset for help on using the changeset viewer.