@@ -1060,7 +1060,17 @@ class ByteCodeParser {
10601060 switch (node->op ()) {
10611061 case ArithAdd:
10621062 case ArithSub:
1063- case ValueAdd: {
1063+ case ValueAdd:
1064+ case ArithBitAnd:
1065+ case ValueBitAnd:
1066+ case ArithBitOr:
1067+ case ValueBitOr:
1068+ case ArithBitXor:
1069+ case ValueBitXor:
1070+ case ArithBitRShift:
1071+ case ValueBitRShift:
1072+ case ArithBitLShift:
1073+ case ValueBitLShift: {
10641074 ObservedResults observed;
10651075 if (BinaryArithProfile* arithProfile = m_inlineStackTop->m_profiledBlock ->binaryArithProfileForBytecodeIndex (m_currentIndex))
10661076 observed = arithProfile->observedResults ();
@@ -6359,37 +6369,34 @@ void ByteCodeParser::parseBlock(unsigned limit)
63596369
63606370 case op_bitand: {
63616371 auto bytecode = currentInstruction->as <OpBitand>();
6362- SpeculatedType prediction = getPrediction ();
63636372 Node* op1 = get (bytecode.m_lhs );
63646373 Node* op2 = get (bytecode.m_rhs );
63656374 if (op1->hasNumberOrAnyIntResult () && op2->hasNumberOrAnyIntResult ())
6366- set (bytecode.m_dst , addToGraph (ArithBitAnd, op1, op2));
6375+ set (bytecode.m_dst , makeSafe ( addToGraph (ArithBitAnd, op1, op2) ));
63676376 else
6368- set (bytecode.m_dst , addToGraph (ValueBitAnd, OpInfo (), OpInfo (prediction), op1, op2));
6377+ set (bytecode.m_dst , makeSafe ( addToGraph (ValueBitAnd, op1, op2) ));
63696378 NEXT_OPCODE (op_bitand);
63706379 }
63716380
63726381 case op_bitor: {
63736382 auto bytecode = currentInstruction->as <OpBitor>();
6374- SpeculatedType prediction = getPrediction ();
63756383 Node* op1 = get (bytecode.m_lhs );
63766384 Node* op2 = get (bytecode.m_rhs );
63776385 if (op1->hasNumberOrAnyIntResult () && op2->hasNumberOrAnyIntResult ())
6378- set (bytecode.m_dst , addToGraph (ArithBitOr, op1, op2));
6386+ set (bytecode.m_dst , makeSafe ( addToGraph (ArithBitOr, op1, op2) ));
63796387 else
6380- set (bytecode.m_dst , addToGraph (ValueBitOr, OpInfo (), OpInfo (prediction), op1, op2));
6388+ set (bytecode.m_dst , makeSafe ( addToGraph (ValueBitOr, op1, op2) ));
63816389 NEXT_OPCODE (op_bitor);
63826390 }
63836391
63846392 case op_bitxor: {
63856393 auto bytecode = currentInstruction->as <OpBitxor>();
6386- SpeculatedType prediction = getPrediction ();
63876394 Node* op1 = get (bytecode.m_lhs );
63886395 Node* op2 = get (bytecode.m_rhs );
63896396 if (op1->hasNumberOrAnyIntResult () && op2->hasNumberOrAnyIntResult ())
6390- set (bytecode.m_dst , addToGraph (ArithBitXor, op1, op2));
6397+ set (bytecode.m_dst , makeSafe ( addToGraph (ArithBitXor, op1, op2) ));
63916398 else
6392- set (bytecode.m_dst , addToGraph (ValueBitXor, OpInfo (), OpInfo (prediction), op1, op2));
6399+ set (bytecode.m_dst , makeSafe ( addToGraph (ValueBitXor, op1, op2) ));
63936400 NEXT_OPCODE (op_bitxor);
63946401 }
63956402
@@ -6398,11 +6405,9 @@ void ByteCodeParser::parseBlock(unsigned limit)
63986405 Node* op1 = get (bytecode.m_lhs );
63996406 Node* op2 = get (bytecode.m_rhs );
64006407 if (op1->hasNumberOrAnyIntResult () && op2->hasNumberOrAnyIntResult ())
6401- set (bytecode.m_dst , addToGraph (ArithBitRShift, op1, op2));
6402- else {
6403- SpeculatedType prediction = getPredictionWithoutOSRExit ();
6404- set (bytecode.m_dst , addToGraph (ValueBitRShift, OpInfo (), OpInfo (prediction), op1, op2));
6405- }
6408+ set (bytecode.m_dst , makeSafe (addToGraph (ArithBitRShift, op1, op2)));
6409+ else
6410+ set (bytecode.m_dst , makeSafe (addToGraph (ValueBitRShift, op1, op2)));
64066411 NEXT_OPCODE (op_rshift);
64076412 }
64086413
@@ -6411,11 +6416,9 @@ void ByteCodeParser::parseBlock(unsigned limit)
64116416 Node* op1 = get (bytecode.m_lhs );
64126417 Node* op2 = get (bytecode.m_rhs );
64136418 if (op1->hasNumberOrAnyIntResult () && op2->hasNumberOrAnyIntResult ())
6414- set (bytecode.m_dst , addToGraph (ArithBitLShift, op1, op2));
6415- else {
6416- SpeculatedType prediction = getPredictionWithoutOSRExit ();
6417- set (bytecode.m_dst , addToGraph (ValueBitLShift, OpInfo (), OpInfo (prediction), op1, op2));
6418- }
6419+ set (bytecode.m_dst , makeSafe (addToGraph (ArithBitLShift, op1, op2)));
6420+ else
6421+ set (bytecode.m_dst , makeSafe (addToGraph (ValueBitLShift, op1, op2)));
64196422 NEXT_OPCODE (op_lshift);
64206423 }
64216424
0 commit comments