Skip to content

Commit

Permalink
Cherry-pick fd57a49. rdar://problem/100903734
Browse files Browse the repository at this point in the history
    [JSC] Should model BigInt with side effects
    https://bugs.webkit.org/show_bug.cgi?id=246291
    rdar://100494823

    Reviewed by Yusuke Suzuki.

    Operations with two BigInt operands have side effects,
    which should not be hoisted from loops.

    * Source/JavaScriptCore/dfg/DFGClobberize.cpp:
    (JSC::DFG::doesWrites):
    * Source/JavaScriptCore/dfg/DFGClobberize.h:
    (JSC::DFG::clobberize):

    Canonical link: https://commits.webkit.org/255368@main

Canonical link: https://commits.webkit.org/245886.846@safari-7613.4.1.0-branch
  • Loading branch information
hyjorc1 authored and alancoon committed Nov 9, 2022
1 parent 98c314b commit e7eaf1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/JavaScriptCore/dfg/DFGClobberize.h
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,8 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
case ValueBitRShift:
// FIXME: this use of single-argument isBinaryUseKind would prevent us from specializing (for example) for a HeapBigInt left-operand and a BigInt32 right-operand.
if (node->isBinaryUseKind(AnyBigIntUse) || node->isBinaryUseKind(BigInt32Use) || node->isBinaryUseKind(HeapBigIntUse)) {
read(World);
write(SideState);
def(PureValue(node));
return;
}
Expand Down

0 comments on commit e7eaf1f

Please sign in to comment.