Changeset 260651 in webkit


Ignore:
Timestamp:
Apr 24, 2020 10:20:03 AM (4 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] DFG AI for some bitops + BigInt32 should be precise
https://bugs.webkit.org/show_bug.cgi?id=210956

Reviewed by Keith Miller.

JSTests:

  • stress/bigint-bitops.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

Use SpecBigInt32 for ValueBitXor, ValueBitAnd, and ValueBitOr since they are always producing BigInt32 and they have inlined implementations in DFG / FTL.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r260639 r260651  
     12020-04-24  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] DFG AI for some bitops + BigInt32 should be precise
     4        https://bugs.webkit.org/show_bug.cgi?id=210956
     5
     6        Reviewed by Keith Miller.
     7
     8        * stress/bigint-bitops.js: Added.
     9        (shouldBe):
     10        (test):
     11
    1122020-04-24  Paulo Matos  <pmatos@igalia.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r260621 r260651  
     12020-04-24  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] DFG AI for some bitops + BigInt32 should be precise
     4        https://bugs.webkit.org/show_bug.cgi?id=210956
     5
     6        Reviewed by Keith Miller.
     7
     8        Use SpecBigInt32 for ValueBitXor, ValueBitAnd, and ValueBitOr since they are always producing BigInt32 and they have inlined implementations in DFG / FTL.
     9
     10        * dfg/DFGAbstractInterpreterInlines.h:
     11        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
     12
    1132020-04-23  Alexey Shvayka  <shvaikalesh@gmail.com>
    214
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

    r260512 r260651  
    542542
    543543        // FIXME: this use of binaryUseKind means that we cannot specialize to (for example) a HeapBigInt left-operand and a BigInt32 right-operand.
     544        // https://bugs.webkit.org/show_bug.cgi?id=210977
    544545        if (node->binaryUseKind() == BigInt32Use) {
    545546#if USE(BIGINT32)
     547            switch (node->op()) {
     548            case ValueBitXor:
     549            case ValueBitAnd:
     550            case ValueBitOr:
     551                setTypeForNode(node, SpecBigInt32);
     552                break;
     553
    546554            // FIXME: We should have inlined implementation that always returns BigInt32.
    547555            // https://bugs.webkit.org/show_bug.cgi?id=210847
    548             setTypeForNode(node, SpecBigInt);
     556            case ValueBitRShift:
     557            case ValueBitLShift:
     558                setTypeForNode(node, SpecBigInt);
     559                break;
     560            default:
     561                DFG_CRASH(m_graph, node, "Incorrect DFG op");
     562            }
    549563#else
    550             RELEASE_ASSERT_NOT_REACHED();
     564            DFG_CRASH(m_graph, node, "No BigInt32 support");
    551565#endif
    552566        } else if (node->binaryUseKind() == HeapBigIntUse)
Note: See TracChangeset for help on using the changeset viewer.