⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243344 in webkit


Ignore:
Timestamp:
Mar 21, 2019, 4:34:31 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

Remove an invalid assertion in DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined().
https://bugs.webkit.org/show_bug.cgi?id=196116
<rdar://problem/48976951>

Reviewed by Filip Pizlo.

JSTests:

  • stress/dfg-compare-eq-via-nonSpeculativeNonPeepholeCompareNullOrUndefined.js: Added.

Source/JavaScriptCore:

The DFG backend should not make assumptions about what optimizations the front end
will or will not do. The assertion asserts that the operand cannot be known to be
a cell. However, it is not guaranteed that the front end will fold away this case.
Also, the DFG backend is perfectly capable of generating code to handle the case
where the operand is a cell.

The attached test case demonstrates a case where the operand can be a known cell.
The test needs to be run with the concurrent JIT and GC, and is racy. It used to
trip up this assertion about once every 10 runs or so.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r243299 r243344  
     12019-03-21  Mark Lam  <mark.lam@apple.com>
     2
     3        Remove an invalid assertion in DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined().
     4        https://bugs.webkit.org/show_bug.cgi?id=196116
     5        <rdar://problem/48976951>
     6
     7        Reviewed by Filip Pizlo.
     8
     9        * stress/dfg-compare-eq-via-nonSpeculativeNonPeepholeCompareNullOrUndefined.js: Added.
     10
    1112019-03-21  Tadeu Zagallo  <tzagallo@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r243335 r243344  
     12019-03-21  Mark Lam  <mark.lam@apple.com>
     2
     3        Remove an invalid assertion in DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined().
     4        https://bugs.webkit.org/show_bug.cgi?id=196116
     5        <rdar://problem/48976951>
     6
     7        Reviewed by Filip Pizlo.
     8
     9        The DFG backend should not make assumptions about what optimizations the front end
     10        will or will not do.  The assertion asserts that the operand cannot be known to be
     11        a cell.  However, it is not guaranteed that the front end will fold away this case.
     12        Also, the DFG backend is perfectly capable of generating code to handle the case
     13        where the operand is a cell.
     14
     15        The attached test case demonstrates a case where the operand can be a known cell.
     16        The test needs to be run with the concurrent JIT and GC, and is racy.  It used to
     17        trip up this assertion about once every 10 runs or so.
     18
     19        * dfg/DFGSpeculativeJIT64.cpp:
     20        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
     21
    1222019-03-21  Tadeu Zagallo  <tzagallo@apple.com>
    223
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r243232 r243344  
    218218void SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined(Edge operand)
    219219{
    220     ASSERT_WITH_MESSAGE(!masqueradesAsUndefinedWatchpointIsStillValid() || !isKnownCell(operand.node()), "The Compare should have been eliminated, it is known to be always false.");
    221 
    222220    JSValueOperand arg(this, operand, ManualOperandSpeculation);
    223221    GPRReg argGPR = arg.gpr();
Note: See TracChangeset for help on using the changeset viewer.