• Home
  • Raw
  • Download

Lines Matching refs:bytecode

469   static const char* ToString(Bytecode bytecode);
472 static std::string ToString(Bytecode bytecode, OperandScale operand_scale);
475 static uint8_t ToByte(Bytecode bytecode) { in ToByte() argument
476 DCHECK_LE(bytecode, Bytecode::kLast); in ToByte()
477 return static_cast<uint8_t>(bytecode); in ToByte()
482 Bytecode bytecode = static_cast<Bytecode>(value); in FromByte() local
483 DCHECK_LE(bytecode, Bytecode::kLast); in FromByte()
484 return bytecode; in FromByte()
507 static OperandScale PrefixBytecodeToOperandScale(Bytecode bytecode) { in PrefixBytecodeToOperandScale() argument
508 switch (bytecode) { in PrefixBytecodeToOperandScale()
521 static AccumulatorUse GetAccumulatorUse(Bytecode bytecode) { in GetAccumulatorUse() argument
522 DCHECK_LE(bytecode, Bytecode::kLast); in GetAccumulatorUse()
523 return kAccumulatorUse[static_cast<size_t>(bytecode)]; in GetAccumulatorUse()
527 static bool ReadsAccumulator(Bytecode bytecode) { in ReadsAccumulator() argument
528 return BytecodeOperands::ReadsAccumulator(GetAccumulatorUse(bytecode)); in ReadsAccumulator()
532 static bool WritesAccumulator(Bytecode bytecode) { in WritesAccumulator() argument
533 return BytecodeOperands::WritesAccumulator(GetAccumulatorUse(bytecode)); in WritesAccumulator()
538 static constexpr bool IsAccumulatorLoadWithoutEffects(Bytecode bytecode) { in IsAccumulatorLoadWithoutEffects() argument
539 return bytecode == Bytecode::kLdar || bytecode == Bytecode::kLdaZero || in IsAccumulatorLoadWithoutEffects()
540 bytecode == Bytecode::kLdaSmi || bytecode == Bytecode::kLdaNull || in IsAccumulatorLoadWithoutEffects()
541 bytecode == Bytecode::kLdaTrue || bytecode == Bytecode::kLdaFalse || in IsAccumulatorLoadWithoutEffects()
542 bytecode == Bytecode::kLdaUndefined || in IsAccumulatorLoadWithoutEffects()
543 bytecode == Bytecode::kLdaTheHole || in IsAccumulatorLoadWithoutEffects()
544 bytecode == Bytecode::kLdaConstant || in IsAccumulatorLoadWithoutEffects()
545 bytecode == Bytecode::kLdaContextSlot || in IsAccumulatorLoadWithoutEffects()
546 bytecode == Bytecode::kLdaCurrentContextSlot || in IsAccumulatorLoadWithoutEffects()
547 bytecode == Bytecode::kLdaImmutableContextSlot || in IsAccumulatorLoadWithoutEffects()
548 bytecode == Bytecode::kLdaImmutableCurrentContextSlot; in IsAccumulatorLoadWithoutEffects()
553 static constexpr bool IsCompareWithoutEffects(Bytecode bytecode) { in IsCompareWithoutEffects() argument
554 return bytecode == Bytecode::kTestUndetectable || in IsCompareWithoutEffects()
555 bytecode == Bytecode::kTestNull || in IsCompareWithoutEffects()
556 bytecode == Bytecode::kTestUndefined || in IsCompareWithoutEffects()
557 bytecode == Bytecode::kTestTypeOf; in IsCompareWithoutEffects()
562 static constexpr bool IsRegisterLoadWithoutEffects(Bytecode bytecode) { in IsRegisterLoadWithoutEffects() argument
563 return bytecode == Bytecode::kMov || bytecode == Bytecode::kPopContext || in IsRegisterLoadWithoutEffects()
564 bytecode == Bytecode::kPushContext || bytecode == Bytecode::kStar; in IsRegisterLoadWithoutEffects()
569 static constexpr bool IsConditionalJumpImmediate(Bytecode bytecode) { in IsConditionalJumpImmediate() argument
570 return bytecode >= Bytecode::kJumpIfToBooleanTrue && in IsConditionalJumpImmediate()
571 bytecode <= Bytecode::kJumpIfJSReceiver; in IsConditionalJumpImmediate()
576 static constexpr bool IsConditionalJumpConstant(Bytecode bytecode) { in IsConditionalJumpConstant() argument
577 return bytecode >= Bytecode::kJumpIfNullConstant && in IsConditionalJumpConstant()
578 bytecode <= Bytecode::kJumpIfToBooleanFalseConstant; in IsConditionalJumpConstant()
583 static constexpr bool IsConditionalJump(Bytecode bytecode) { in IsConditionalJump() argument
584 return bytecode >= Bytecode::kJumpIfNullConstant && in IsConditionalJump()
585 bytecode <= Bytecode::kJumpIfJSReceiver; in IsConditionalJump()
589 static constexpr bool IsUnconditionalJump(Bytecode bytecode) { in IsUnconditionalJump() argument
590 return bytecode >= Bytecode::kJumpLoop && in IsUnconditionalJump()
591 bytecode <= Bytecode::kJumpConstant; in IsUnconditionalJump()
596 static constexpr bool IsJumpImmediate(Bytecode bytecode) { in IsJumpImmediate() argument
597 return bytecode == Bytecode::kJump || bytecode == Bytecode::kJumpLoop || in IsJumpImmediate()
598 IsConditionalJumpImmediate(bytecode); in IsJumpImmediate()
603 static constexpr bool IsJumpConstant(Bytecode bytecode) { in IsJumpConstant() argument
604 return bytecode >= Bytecode::kJumpConstant && in IsJumpConstant()
605 bytecode <= Bytecode::kJumpIfToBooleanFalseConstant; in IsJumpConstant()
610 static constexpr bool IsJumpIfToBoolean(Bytecode bytecode) { in IsJumpIfToBoolean() argument
611 return bytecode >= Bytecode::kJumpIfToBooleanTrueConstant && in IsJumpIfToBoolean()
612 bytecode <= Bytecode::kJumpIfToBooleanFalse; in IsJumpIfToBoolean()
617 static constexpr bool IsJump(Bytecode bytecode) { in IsJump() argument
618 return bytecode >= Bytecode::kJumpLoop && in IsJump()
619 bytecode <= Bytecode::kJumpIfJSReceiver; in IsJump()
624 static constexpr bool IsForwardJump(Bytecode bytecode) { in IsForwardJump() argument
625 return bytecode >= Bytecode::kJump && in IsForwardJump()
626 bytecode <= Bytecode::kJumpIfJSReceiver; in IsForwardJump()
632 static constexpr bool IsJumpWithoutEffects(Bytecode bytecode) { in IsJumpWithoutEffects() argument
633 return IsJump(bytecode) && !IsJumpIfToBoolean(bytecode); in IsJumpWithoutEffects()
637 static constexpr bool IsSwitch(Bytecode bytecode) { in IsSwitch() argument
638 return bytecode == Bytecode::kSwitchOnSmiNoFeedback || in IsSwitch()
639 bytecode == Bytecode::kSwitchOnGeneratorState; in IsSwitch()
644 static constexpr bool IsWithoutExternalSideEffects(Bytecode bytecode) { in IsWithoutExternalSideEffects() argument
645 return (IsAccumulatorLoadWithoutEffects(bytecode) || in IsWithoutExternalSideEffects()
646 IsRegisterLoadWithoutEffects(bytecode) || in IsWithoutExternalSideEffects()
647 IsCompareWithoutEffects(bytecode) || in IsWithoutExternalSideEffects()
648 IsJumpWithoutEffects(bytecode) || IsSwitch(bytecode)); in IsWithoutExternalSideEffects()
652 static constexpr bool IsLdarOrStar(Bytecode bytecode) { in IsLdarOrStar() argument
653 return bytecode == Bytecode::kLdar || bytecode == Bytecode::kStar; in IsLdarOrStar()
657 static constexpr bool IsCallOrConstruct(Bytecode bytecode) { in IsCallOrConstruct() argument
658 return bytecode == Bytecode::kCallAnyReceiver || in IsCallOrConstruct()
659 bytecode == Bytecode::kCallProperty || in IsCallOrConstruct()
660 bytecode == Bytecode::kCallProperty0 || in IsCallOrConstruct()
661 bytecode == Bytecode::kCallProperty1 || in IsCallOrConstruct()
662 bytecode == Bytecode::kCallProperty2 || in IsCallOrConstruct()
663 bytecode == Bytecode::kCallUndefinedReceiver || in IsCallOrConstruct()
664 bytecode == Bytecode::kCallUndefinedReceiver0 || in IsCallOrConstruct()
665 bytecode == Bytecode::kCallUndefinedReceiver1 || in IsCallOrConstruct()
666 bytecode == Bytecode::kCallUndefinedReceiver2 || in IsCallOrConstruct()
667 bytecode == Bytecode::kConstruct || in IsCallOrConstruct()
668 bytecode == Bytecode::kCallWithSpread || in IsCallOrConstruct()
669 bytecode == Bytecode::kConstructWithSpread || in IsCallOrConstruct()
670 bytecode == Bytecode::kCallJSRuntime; in IsCallOrConstruct()
674 static constexpr bool IsCallRuntime(Bytecode bytecode) { in IsCallRuntime() argument
675 return bytecode == Bytecode::kCallRuntime || in IsCallRuntime()
676 bytecode == Bytecode::kCallRuntimeForPair || in IsCallRuntime()
677 bytecode == Bytecode::kInvokeIntrinsic; in IsCallRuntime()
681 static constexpr bool IsPrefixScalingBytecode(Bytecode bytecode) { in IsPrefixScalingBytecode() argument
682 return bytecode == Bytecode::kExtraWide || bytecode == Bytecode::kWide || in IsPrefixScalingBytecode()
683 bytecode == Bytecode::kDebugBreakExtraWide || in IsPrefixScalingBytecode()
684 bytecode == Bytecode::kDebugBreakWide; in IsPrefixScalingBytecode()
688 static constexpr bool IsLazy(Bytecode bytecode) { in IsLazy() argument
694 static constexpr bool Returns(Bytecode bytecode) { in Returns() argument
695 #define OR_BYTECODE(NAME) || bytecode == Bytecode::k##NAME in Returns()
701 static int NumberOfOperands(Bytecode bytecode) { in NumberOfOperands() argument
702 DCHECK_LE(bytecode, Bytecode::kLast); in NumberOfOperands()
703 return kOperandCount[static_cast<size_t>(bytecode)]; in NumberOfOperands()
707 static OperandType GetOperandType(Bytecode bytecode, int i) { in GetOperandType() argument
708 DCHECK_LE(bytecode, Bytecode::kLast); in GetOperandType()
709 DCHECK_LT(i, NumberOfOperands(bytecode)); in GetOperandType()
711 return GetOperandTypes(bytecode)[i]; in GetOperandType()
716 static const OperandType* GetOperandTypes(Bytecode bytecode) { in GetOperandTypes() argument
717 DCHECK_LE(bytecode, Bytecode::kLast); in GetOperandTypes()
718 return kOperandTypes[static_cast<size_t>(bytecode)]; in GetOperandTypes()
721 static bool OperandIsScalableSignedByte(Bytecode bytecode, in OperandIsScalableSignedByte() argument
723 DCHECK_LE(bytecode, Bytecode::kLast); in OperandIsScalableSignedByte()
724 return kOperandTypeInfos[static_cast<size_t>(bytecode)][operand_index] == in OperandIsScalableSignedByte()
728 static bool OperandIsScalableUnsignedByte(Bytecode bytecode, in OperandIsScalableUnsignedByte() argument
730 DCHECK_LE(bytecode, Bytecode::kLast); in OperandIsScalableUnsignedByte()
731 return kOperandTypeInfos[static_cast<size_t>(bytecode)][operand_index] == in OperandIsScalableUnsignedByte()
735 static bool OperandIsScalable(Bytecode bytecode, int operand_index) { in OperandIsScalable() argument
736 return OperandIsScalableSignedByte(bytecode, operand_index) || in OperandIsScalable()
737 OperandIsScalableUnsignedByte(bytecode, operand_index); in OperandIsScalable()
741 static bool IsBytecodeWithScalableOperands(Bytecode bytecode);
744 static OperandSize GetOperandSize(Bytecode bytecode, int i, in GetOperandSize() argument
746 CHECK_LT(i, NumberOfOperands(bytecode)); in GetOperandSize()
747 return GetOperandSizes(bytecode, operand_scale)[i]; in GetOperandSize()
751 static const OperandSize* GetOperandSizes(Bytecode bytecode, in GetOperandSizes() argument
753 DCHECK_LE(bytecode, Bytecode::kLast); in GetOperandSizes()
759 return kOperandSizes[scale_index][static_cast<size_t>(bytecode)]; in GetOperandSizes()
764 static int GetOperandOffset(Bytecode bytecode, int i,
769 static int Size(Bytecode bytecode, OperandScale operand_scale) { in Size() argument
770 DCHECK_LE(bytecode, Bytecode::kLast); in Size()
774 return kBytecodeSizes[scale_index][static_cast<size_t>(bytecode)]; in Size()
778 static Bytecode GetDebugBreak(Bytecode bytecode);
781 static Bytecode GetJumpWithoutToBoolean(Bytecode bytecode);
785 static bool MakesCallAlongCriticalPath(Bytecode bytecode);
788 static ConvertReceiverMode GetReceiverMode(Bytecode bytecode) { in GetReceiverMode() argument
789 DCHECK(IsCallOrConstruct(bytecode) || in GetReceiverMode()
790 bytecode == Bytecode::kInvokeIntrinsic); in GetReceiverMode()
791 switch (bytecode) { in GetReceiverMode()
815 static bool IsDebugBreak(Bytecode bytecode);
831 static bool IsStarLookahead(Bytecode bytecode, OperandScale operand_scale);
878 static bool BytecodeHasHandler(Bytecode bytecode, OperandScale operand_scale);
931 const Bytecode& bytecode);