662SpeculatedType speculationFromString(const char* speculation)
663{
664 if (!strncmp(speculation, "SpecNone", strlen("SpecNone")))
665 return SpecNone;
666 if (!strncmp(speculation, "SpecFinalObject", strlen("SpecFinalObject")))
667 return SpecFinalObject;
668 if (!strncmp(speculation, "SpecArray", strlen("SpecArray")))
669 return SpecArray;
670 if (!strncmp(speculation, "SpecFunction", strlen("SpecFunction")))
671 return SpecFunction;
672 if (!strncmp(speculation, "SpecInt8Array", strlen("SpecInt8Array")))
673 return SpecInt8Array;
674 if (!strncmp(speculation, "SpecInt16Array", strlen("SpecInt16Array")))
675 return SpecInt16Array;
676 if (!strncmp(speculation, "SpecInt32Array", strlen("SpecInt32Array")))
677 return SpecInt32Array;
678 if (!strncmp(speculation, "SpecUint8Array", strlen("SpecUint8Array")))
679 return SpecUint8Array;
680 if (!strncmp(speculation, "SpecUint8ClampedArray", strlen("SpecUint8ClampedArray")))
681 return SpecUint8ClampedArray;
682 if (!strncmp(speculation, "SpecUint16Array", strlen("SpecUint16Array")))
683 return SpecUint16Array;
684 if (!strncmp(speculation, "SpecUint32Array", strlen("SpecUint32Array")))
685 return SpecUint32Array;
686 if (!strncmp(speculation, "SpecFloat32Array", strlen("SpecFloat32Array")))
687 return SpecFloat32Array;
688 if (!strncmp(speculation, "SpecFloat64Array", strlen("SpecFloat64Array")))
689 return SpecFloat64Array;
690 if (!strncmp(speculation, "SpecTypedArrayView", strlen("SpecTypedArrayView")))
691 return SpecTypedArrayView;
692 if (!strncmp(speculation, "SpecDirectArguments", strlen("SpecDirectArguments")))
693 return SpecDirectArguments;
694 if (!strncmp(speculation, "SpecScopedArguments", strlen("SpecScopedArguments")))
695 return SpecScopedArguments;
696 if (!strncmp(speculation, "SpecStringObject", strlen("SpecStringObject")))
697 return SpecStringObject;
698 if (!strncmp(speculation, "SpecRegExpObject", strlen("SpecRegExpObject")))
699 return SpecRegExpObject;
700 if (!strncmp(speculation, "SpecMapObject", strlen("SpecMapObject")))
701 return SpecMapObject;
702 if (!strncmp(speculation, "SpecSetObject", strlen("SpecSetObject")))
703 return SpecSetObject;
704 if (!strncmp(speculation, "SpecProxyObject", strlen("SpecProxyObject")))
705 return SpecProxyObject;
706 if (!strncmp(speculation, "SpecDerivedArray", strlen("SpecDerivedArray")))
707 return SpecDerivedArray;
708 if (!strncmp(speculation, "SpecObjectOther", strlen("SpecObjectOther")))
709 return SpecObjectOther;
710 if (!strncmp(speculation, "SpecObject", strlen("SpecObject")))
711 return SpecObject;
712 if (!strncmp(speculation, "SpecStringIdent", strlen("SpecStringIdent")))
713 return SpecStringIdent;
714 if (!strncmp(speculation, "SpecStringVar", strlen("SpecStringVar")))
715 return SpecStringVar;
716 if (!strncmp(speculation, "SpecString", strlen("SpecString")))
717 return SpecString;
718 if (!strncmp(speculation, "SpecSymbol", strlen("SpecSymbol")))
719 return SpecSymbol;
720 if (!strncmp(speculation, "SpecCellOther", strlen("SpecCellOther")))
721 return SpecCellOther;
722 if (!strncmp(speculation, "SpecCell", strlen("SpecCell")))
723 return SpecCell;
724 if (!strncmp(speculation, "SpecBoolInt32", strlen("SpecBoolInt32")))
725 return SpecBoolInt32;
726 if (!strncmp(speculation, "SpecNonBoolInt32", strlen("SpecNonBoolInt32")))
727 return SpecNonBoolInt32;
728 if (!strncmp(speculation, "SpecInt32Only", strlen("SpecInt32Only")))
729 return SpecInt32Only;
730 if (!strncmp(speculation, "SpecInt52Only", strlen("SpecInt52Only")))
731 return SpecInt52Only;
732 if (!strncmp(speculation, "SpecAnyInt", strlen("SpecAnyInt")))
733 return SpecAnyInt;
734 if (!strncmp(speculation, "SpecAnyIntAsDouble", strlen("SpecAnyIntAsDouble")))
735 return SpecAnyIntAsDouble;
736 if (!strncmp(speculation, "SpecNonIntAsDouble", strlen("SpecNonIntAsDouble")))
737 return SpecNonIntAsDouble;
738 if (!strncmp(speculation, "SpecDoubleReal", strlen("SpecDoubleReal")))
739 return SpecDoubleReal;
740 if (!strncmp(speculation, "SpecDoublePureNaN", strlen("SpecDoublePureNaN")))
741 return SpecDoublePureNaN;
742 if (!strncmp(speculation, "SpecDoubleImpureNaN", strlen("SpecDoubleImpureNaN")))
743 return SpecDoubleImpureNaN;
744 if (!strncmp(speculation, "SpecDoubleNaN", strlen("SpecDoubleNaN")))
745 return SpecDoubleNaN;
746 if (!strncmp(speculation, "SpecBytecodeDouble", strlen("SpecBytecodeDouble")))
747 return SpecBytecodeDouble;
748 if (!strncmp(speculation, "SpecFullDouble", strlen("SpecFullDouble")))
749 return SpecFullDouble;
750 if (!strncmp(speculation, "SpecBytecodeRealNumber", strlen("SpecBytecodeRealNumber")))
751 return SpecBytecodeRealNumber;
752 if (!strncmp(speculation, "SpecFullRealNumber", strlen("SpecFullRealNumber")))
753 return SpecFullRealNumber;
754 if (!strncmp(speculation, "SpecBytecodeNumber", strlen("SpecBytecodeNumber")))
755 return SpecBytecodeNumber;
756 if (!strncmp(speculation, "SpecFullNumber", strlen("SpecFullNumber")))
757 return SpecFullNumber;
758 if (!strncmp(speculation, "SpecBoolean", strlen("SpecBoolean")))
759 return SpecBoolean;
760 if (!strncmp(speculation, "SpecOther", strlen("SpecOther")))
761 return SpecOther;
762 if (!strncmp(speculation, "SpecMisc", strlen("SpecMisc")))
763 return SpecMisc;
764 if (!strncmp(speculation, "SpecHeapTop", strlen("SpecHeapTop")))
765 return SpecHeapTop;
766 if (!strncmp(speculation, "SpecPrimitive", strlen("SpecPrimitive")))
767 return SpecPrimitive;
768 if (!strncmp(speculation, "SpecEmpty", strlen("SpecEmpty")))
769 return SpecEmpty;
770 if (!strncmp(speculation, "SpecBytecodeTop", strlen("SpecBytecodeTop")))
771 return SpecBytecodeTop;
772 if (!strncmp(speculation, "SpecFullTop", strlen("SpecFullTop")))
773 return SpecFullTop;
774 if (!strncmp(speculation, "SpecCellCheck", strlen("SpecCellCheck")))
775 return SpecCellCheck;
776 RELEASE_ASSERT_NOT_REACHED();
777}
778