Commit eee9cce
committed
[BigInt] Implement ValueBitXor into DFG
https://bugs.webkit.org/show_bug.cgi?id=190264
Reviewed by Yusuke Suzuki.
JSTests:
* stress/big-int-bitwise-xor-jit.js: Added.
* stress/big-int-bitwise-xor-memory-stress.js: Added.
* stress/big-int-bitwise-xor-untyped.js: Added.
Source/JavaScriptCore:
This patch is splitting the BitXor node into ArithBitXor and
ValueBitXor. This is necessary due the introduction of
BigInt, since BitXor operations now can result into Int32 or BigInt.
In such case, we use ArithBitXor when operands are Int and fallback to
ValueBitXor when operands are anything else. In the case of
ValueBitXor, we speculate BigInt when op1 and op2 are predicted as
BigInt as well. BigInt specialization consist into call
`operationBigIntBitXor` function, that calls JSBigInt::bitXor.
* bytecode/BytecodeList.rb:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::arithProfileForPC):
* bytecode/Opcode.h:
(JSC::padOpcodeName):
* bytecompiler/BytecodeGenerator.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo):
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueBitwiseOp):
(JSC::DFG::SpeculativeJIT::compileBitwiseOp):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::bitOp):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitXor):
(JSC::FTL::DFG::LowerDFGToB3::compileArithBitXor):
(JSC::FTL::DFG::LowerDFGToB3::compileBitXor): Deleted.
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_bitxor):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
Canonical link: https://commits.webkit.org/206876@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238732 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent b39d3fc commit eee9cceCopy full SHA for eee9cce
31 files changed
+261-67Lines changed: 261 additions & 67 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- JSTests
- stress
- Source/JavaScriptCore
- bytecode
- bytecompiler
- dfg
- ftl
- jit
- llint
- runtime
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+11Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
1 | 12 | |
2 | 13 | |
3 | 14 | |
|
Collapse file
JSTests/stress/big-int-bitwise-xor-jit.js
Copy file name to clipboard+25Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
Collapse file
JSTests/stress/big-int-bitwise-xor-memory-stress.js
Copy file name to clipboard+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
Collapse file
JSTests/stress/big-int-bitwise-xor-untyped.js
Copy file name to clipboard+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
Collapse file
Source/JavaScriptCore/ChangeLog
Copy file name to clipboardExpand all lines: Source/JavaScriptCore/ChangeLog+67Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
1 | 68 | |
2 | 69 | |
3 | 70 | |
|
Collapse file
Source/JavaScriptCore/bytecode/BytecodeList.rb
Copy file name to clipboardExpand all lines: Source/JavaScriptCore/bytecode/BytecodeList.rb+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
240 | 240 | |
241 | 241 | |
242 | 242 | |
243 | | - |
244 | 243 | |
245 | 244 | |
246 | 245 | |
| ||
259 | 258 | |
260 | 259 | |
261 | 260 | |
| 261 | + |
262 | 262 | |
263 | 263 | |
264 | 264 | |
|
Collapse file
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Copy file name to clipboardExpand all lines: Source/JavaScriptCore/bytecode/CodeBlock.cpp+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
567 | 567 | |
568 | 568 | |
569 | 569 | |
| 570 | + |
570 | 571 | |
571 | 572 | |
572 | 573 | |
| ||
592 | 593 | |
593 | 594 | |
594 | 595 | |
595 | | - |
596 | 596 | |
597 | 597 | |
598 | 598 | |
| ||
2953 | 2953 | |
2954 | 2954 | |
2955 | 2955 | |
2956 | | - |
2957 | | - |
2958 | 2956 | |
2959 | 2957 | |
2960 | 2958 | |
|
Collapse file
Source/JavaScriptCore/bytecode/Opcode.h
Copy file name to clipboardExpand all lines: Source/JavaScriptCore/bytecode/Opcode.h+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
110 | 110 | |
111 | 111 | |
112 | 112 | |
| 113 | + |
113 | 114 | |
114 | 115 | |
115 | 116 | |
|
Collapse file
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
Copy file name to clipboardExpand all lines: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h+6-4Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
684 | 684 | |
685 | 685 | |
686 | 686 | |
687 | | - |
688 | | - |
| 687 | + |
| 688 | + |
| 689 | + |
689 | 690 | |
690 | 691 | |
691 | 692 | |
| ||
696 | 697 | |
697 | 698 | |
698 | 699 | |
699 | | - |
700 | | - |
| 700 | + |
| 701 | + |
| 702 | + |
701 | 703 | |
702 | 704 | |
703 | 705 | |
|
Collapse file
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
Copy file name to clipboardExpand all lines: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h+5-4Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
374 | 374 | |
375 | 375 | |
376 | 376 | |
377 | | - |
| 377 | + |
378 | 378 | |
379 | 379 | |
380 | 380 | |
| ||
393 | 393 | |
394 | 394 | |
395 | 395 | |
396 | | - |
| 396 | + |
397 | 397 | |
| 398 | + |
398 | 399 | |
399 | 400 | |
400 | 401 | |
| ||
404 | 405 | |
405 | 406 | |
406 | 407 | |
407 | | - |
| 408 | + |
408 | 409 | |
409 | 410 | |
410 | 411 | |
| ||
426 | 427 | |
427 | 428 | |
428 | 429 | |
429 | | - |
| 430 | + |
430 | 431 | |
431 | 432 | |
432 | 433 | |
|
0 commit comments