151 switch (node->opcode()) {
152 case IrOpcode::kStart:
153 case IrOpcode::kIfTrue:
154 case IrOpcode::kIfFalse:
155 case IrOpcode::kMerge:
157 case IrOpcode::kEffectPhi:
158 case IrOpcode::kCheckpoint:
159 case IrOpcode::kFrameState:
160 case IrOpcode::kJSStackCheck:
162 case IrOpcode::kInt32Constant: {
177 case IrOpcode::kInt64Constant:
178 case IrOpcode::kFloat64Constant: {
184 case IrOpcode::kHeapConstant:
186 case IrOpcode::kCheckedFloat64ToInt32: {
188 DCHECK(input_type.
Is(Type::Number()));
202 case IrOpcode::kCheckedTaggedToTaggedSigned: {
210 case IrOpcode::kCheckedTaggedToTaggedPointer:
213 case IrOpcode::kTruncateTaggedToBit: {
224 case IrOpcode::kInt32Add: {
230 }
else if (left_type.
Is(Type::Machine()) &&
231 right_type.
Is(Type::Machine())) {
232 output_type = Type::Machine();
233 }
else if (left_type.
Is(Type::NumberOrOddball()) &&
234 right_type.
Is(Type::NumberOrOddball())) {
235 left_type = op_typer.
ToNumber(left_type);
236 right_type = op_typer.
ToNumber(right_type);
237 output_type = op_typer.NumberAdd(left_type, right_type);
248 case IrOpcode::kInt32Sub: {
254 }
else if (left_type.
Is(Type::Machine()) &&
255 right_type.
Is(Type::Machine())) {
256 output_type = Type::Machine();
257 }
else if (left_type.
Is(Type::NumberOrOddball()) &&
258 right_type.
Is(Type::NumberOrOddball())) {
259 left_type = op_typer.
ToNumber(left_type);
260 right_type = op_typer.
ToNumber(right_type);
261 output_type = op_typer.NumberSubtract(left_type, right_type);
272 case IrOpcode::kChangeInt31ToTaggedSigned:
273 case IrOpcode::kChangeInt32ToTagged:
274 case IrOpcode::kChangeFloat32ToFloat64:
275 case IrOpcode::kChangeInt32ToInt64:
276 case IrOpcode::kChangeUint32ToUint64:
277 case IrOpcode::kChangeUint64ToTagged: {
283 case IrOpcode::kChangeFloat64ToInt64: {
289 case IrOpcode::kInt64Add: {
296 }
else if (left_type.
Is(Type::Machine()) &&
297 right_type.
Is(Type::Machine())) {
299 output_type = Type::Machine();
300 }
else if (left_type.
Is(Type::BigInt()) &&
301 right_type.
Is(Type::BigInt())) {
303 output_type = op_typer.BigIntAdd(left_type, right_type);
304 }
else if (left_type.
Is(Type::NumberOrOddball()) &&
305 right_type.
Is(Type::NumberOrOddball())) {
307 left_type = op_typer.
ToNumber(left_type);
308 right_type = op_typer.
ToNumber(right_type);
309 output_type = op_typer.NumberAdd(left_type, right_type);
321 case IrOpcode::kInt64Sub: {
328 }
else if (left_type.
Is(Type::Machine()) &&
329 right_type.
Is(Type::Machine())) {
331 output_type = Type::Machine();
332 }
else if (left_type.
Is(Type::BigInt()) &&
333 right_type.
Is(Type::BigInt())) {
335 output_type = op_typer.BigIntSubtract(left_type, right_type);
336 }
else if (left_type.
Is(Type::NumberOrOddball()) &&
337 right_type.
Is(Type::NumberOrOddball())) {
339 left_type = op_typer.
ToNumber(left_type);
340 right_type = op_typer.
ToNumber(right_type);
341 output_type = op_typer.NumberSubtract(left_type, right_type);
353 case IrOpcode::kDeadValue: {
357 case IrOpcode::kTypeGuard: {
364 case IrOpcode::kTruncateBigIntToWord64: {
366 CHECK(input_type.
Is(Type::BigInt()));
371 case IrOpcode::kChangeTaggedSignedToInt64: {
373 CHECK(input_type.
Is(Type::Number()));
379 case IrOpcode::kCheckBigInt: {
385 case IrOpcode::kCheckedBigIntToBigInt64: {
387 CHECK(input_type.
Is(Type::BigInt()));
393 case IrOpcode::kReturn: {
395 for (
int i = 0;
i < return_value_count; ++
i) {
404 case IrOpcode::kSLVerifierHint: {
409 if (
const Operator* semantics = p.semantics()) {
410 switch (semantics->opcode()) {
411 case IrOpcode::kPlainPrimitiveToNumber:
412 output_type = op_typer.
ToNumber(output_type);
419 if (p.override_output_type()) {
420 output_type = *p.override_output_type();
427 case IrOpcode::kBranch: {
431 CHECK(input_type.
Is(Type::Boolean()) || input_type.
Is(Type::Machine()));
434 case IrOpcode::kTypedStateValues: {
436 for (
int i = 0; i < static_cast<int>(machine_types->
size()); ++
i) {
444 case IrOpcode::kParameter: {
449 case IrOpcode::kEnterMachineGraph:
450 case IrOpcode::kExitMachineGraph: {
455#define CASE(code, ...) case IrOpcode::k##code:
465 CASE(DeoptimizeUnless)
472 CASE(TraceInstruction)
474 CASE(TaggedIndexConstant)
475 CASE(Float32Constant)
476 CASE(ExternalConstant)
479 CASE(CompressedHeapConstant)
480 CASE(TrustedHeapConstant)
481 CASE(RelocatableInt32Constant)
482 CASE(RelocatableInt64Constant)
486 CASE(InductionVariablePhi)
490 CASE(ArgumentsElementsState)
491 CASE(ArgumentsLengthState)
494 CASE(TypedObjectState)
508 CASE(ChangeTaggedSignedToInt32)
509 CASE(ChangeTaggedToInt32)
510 CASE(ChangeTaggedToInt64)
511 CASE(ChangeTaggedToUint32)
512 CASE(ChangeTaggedToFloat64)
513 CASE(ChangeTaggedToTaggedSigned)
514 CASE(ChangeInt64ToTagged)
515 CASE(ChangeUint32ToTagged)
516 CASE(ChangeFloat64ToTagged)
517 CASE(ChangeFloat64ToTaggedPointer)
518 CASE(ChangeTaggedToBit)
519 CASE(ChangeBitToTagged)
520 CASE(ChangeInt64ToBigInt)
521 CASE(ChangeUint64ToBigInt)
522 CASE(TruncateTaggedToWord32)
523 CASE(TruncateTaggedToFloat64)
524 CASE(TruncateTaggedPointerToBit)
526 CASE(CheckedInt32Add)
527 CASE(CheckedInt32Sub)
528 CASE(CheckedInt32Div)
529 CASE(CheckedInt32Mod)
530 CASE(CheckedUint32Div)
531 CASE(CheckedUint32Mod)
532 CASE(CheckedInt32Mul)
533 CASE(CheckedAdditiveSafeIntegerAdd)
534 CASE(CheckedAdditiveSafeIntegerSub)
535 CASE(CheckedInt64Add)
536 CASE(CheckedInt64Sub)
537 CASE(CheckedInt64Mul)
538 CASE(CheckedInt64Div)
539 CASE(CheckedInt64Mod)
540 CASE(CheckedInt32ToTaggedSigned)
541 CASE(CheckedInt64ToInt32)
542 CASE(CheckedInt64ToTaggedSigned)
543 CASE(CheckedUint32Bounds)
544 CASE(CheckedUint32ToInt32)
545 CASE(CheckedUint32ToTaggedSigned)
546 CASE(CheckedUint64Bounds)
547 CASE(CheckedUint64ToInt32)
548 CASE(CheckedUint64ToInt64)
549 CASE(CheckedUint64ToTaggedSigned)
550 CASE(CheckedFloat64ToAdditiveSafeInteger)
551 CASE(CheckedFloat64ToInt64)
552 CASE(CheckedTaggedSignedToInt32)
553 CASE(CheckedTaggedToInt32)
554 CASE(CheckedTaggedToArrayIndex)
555 CASE(CheckedTruncateTaggedToWord32)
556 CASE(CheckedTaggedToFloat64)
557 CASE(CheckedTaggedToAdditiveSafeInteger)
558 CASE(CheckedTaggedToInt64)
581 CASE(Int32AddWithOverflow)
582 CASE(Int32SubWithOverflow)
584 CASE(Int32MulWithOverflow)
600 CASE(Word64RolLowerable)
601 CASE(Word64RorLowerable)
602 CASE(Int64AddWithOverflow)
603 CASE(Int64SubWithOverflow)
607 CASE(Int64MulWithOverflow)
624 CASE(StoreIndirectPointer)
630 CASE(Word64ClzLowerable)
631 CASE(Word64CtzLowerable)
632 CASE(Word64ReverseBits)
633 CASE(Word64ReverseBytes)
634 CASE(Simd128ReverseBytes)
635 CASE(Int64AbsWithOverflow)
636 CASE(BitcastTaggedToWord)
637 CASE(BitcastTaggedToWordForTagAndSmiBits)
638 CASE(BitcastWordToTagged)
639 CASE(BitcastWordToTaggedSigned)
640 CASE(TruncateFloat64ToWord32)
641 CASE(ChangeFloat64ToInt32)
642 CASE(ChangeFloat64ToUint32)
643 CASE(ChangeFloat64ToUint64)
644 CASE(Float64SilenceNaN)
645 CASE(TruncateFloat64ToInt64)
646 CASE(TruncateFloat64ToUint32)
647 CASE(TruncateFloat32ToInt32)
648 CASE(TruncateFloat32ToUint32)
649 CASE(TryTruncateFloat32ToInt64)
650 CASE(TryTruncateFloat64ToInt64)
651 CASE(TryTruncateFloat32ToUint64)
652 CASE(TryTruncateFloat64ToUint64)
653 CASE(TryTruncateFloat64ToInt32)
654 CASE(TryTruncateFloat64ToUint32)
655 CASE(ChangeInt32ToFloat64)
656 CASE(BitcastWord32ToWord64)
657 CASE(ChangeInt64ToFloat64)
658 CASE(ChangeUint32ToFloat64)
659 CASE(ChangeFloat16RawBitsToFloat64)
660 CASE(TruncateFloat64ToFloat32)
661 CASE(TruncateFloat64ToFloat16RawBits)
662 CASE(TruncateInt64ToInt32)
663 CASE(RoundFloat64ToInt32)
664 CASE(RoundInt32ToFloat32)
665 CASE(RoundInt64ToFloat32)
666 CASE(RoundInt64ToFloat64)
667 CASE(RoundUint32ToFloat32)
668 CASE(RoundUint64ToFloat32)
669 CASE(RoundUint64ToFloat64)
670 CASE(BitcastFloat32ToInt32)
671 CASE(BitcastFloat64ToInt64)
672 CASE(BitcastInt32ToFloat32)
673 CASE(BitcastInt64ToFloat64)
674 CASE(Float64ExtractLowWord32)
675 CASE(Float64ExtractHighWord32)
676 CASE(Float64InsertLowWord32)
677 CASE(Float64InsertHighWord32)
682 CASE(LoadStackCheckOffset)
683 CASE(LoadFramePointer)
686 CASE(LoadParentFramePointer)
687 CASE(LoadRootRegister)
699 CASE(StoreTrapOnNull)
701 CASE(SignExtendWord8ToInt32)
702 CASE(SignExtendWord16ToInt32)
703 CASE(SignExtendWord8ToInt64)
704 CASE(SignExtendWord16ToInt64)
705 CASE(SignExtendWord32ToInt64)
706 CASE(StackPointerGreaterThan)
713 CASE(JSAsyncFunctionEnter)
714 CASE(JSAsyncFunctionReject)
715 CASE(JSAsyncFunctionResolve)
717 CASE(JSForInEnumerate)
725 CASE(JSGetImportMeta)
726 CASE(JSGeneratorStore)
727 CASE(JSGeneratorRestoreContinuation)
728 CASE(JSGeneratorRestoreContext)
729 CASE(JSGeneratorRestoreRegister)
730 CASE(JSGeneratorRestoreInputOrDebugPos)
731 CASE(JSFulfillPromise)
732 CASE(JSPerformPromiseThen)
733 CASE(JSPromiseResolve)
734 CASE(JSRejectPromise)
735 CASE(JSResolvePromise)
736 CASE(JSObjectIsArray)