Changeset 245409 in webkit
- Timestamp:
- May 16, 2019, 3:47:52 PM (7 years ago)
- Location:
- branches/safari-607.2.1.2-branch/Source/JavaScriptCore/bytecompiler
- Files:
-
- 2 edited
-
BytecodeGenerator.cpp (modified) (2 diffs)
-
BytecodeGenerator.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607.2.1.2-branch/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r245404 r245409 1709 1709 } 1710 1710 1711 bool BytecodeGenerator::emitEqualityOpImpl(RegisterID* dst, RegisterID* src1, RegisterID* src2) 1711 template<typename EqOp> 1712 RegisterID* BytecodeGenerator::emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2) 1712 1713 { 1713 1714 if (!canDoPeepholeOptimization()) … … 1724 1725 rewind(); 1725 1726 OpIsUndefined::emit(this, dst, op.m_value); 1726 return true;1727 return dst; 1727 1728 } 1728 1729 if (value == "boolean") { 1729 1730 rewind(); 1730 1731 OpIsBoolean::emit(this, dst, op.m_value); 1731 return true;1732 return dst; 1732 1733 } 1733 1734 if (value == "number") { 1734 1735 rewind(); 1735 1736 OpIsNumber::emit(this, dst, op.m_value); 1736 return true;1737 return dst; 1737 1738 } 1738 1739 if (value == "string") { 1739 1740 rewind(); 1740 1741 OpIsCellWithType::emit(this, dst, op.m_value, StringType); 1741 return true;1742 return dst; 1742 1743 } 1743 1744 if (value == "symbol") { 1744 1745 rewind(); 1745 1746 OpIsCellWithType::emit(this, dst, op.m_value, SymbolType); 1746 return true;1747 return dst; 1747 1748 } 1748 1749 if (Options::useBigInt() && value == "bigint") { 1749 1750 rewind(); 1750 1751 OpIsCellWithType::emit(this, dst, op.m_value, BigIntType); 1751 return true;1752 return dst; 1752 1753 } 1753 1754 if (value == "object") { 1754 1755 rewind(); 1755 1756 OpIsObjectOrNull::emit(this, dst, op.m_value); 1756 return true;1757 return dst; 1757 1758 } 1758 1759 if (value == "function") { 1759 1760 rewind(); 1760 1761 OpIsFunction::emit(this, dst, op.m_value); 1761 return true;1762 return dst; 1762 1763 } 1763 1764 } 1764 1765 } 1765 1766 1766 return false; 1767 EqOp::emit(this, dst, src1, src2); 1768 return dst; 1767 1769 } 1768 1770 -
branches/safari-607.2.1.2-branch/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r245404 r245409 712 712 713 713 template<typename EqOp> 714 RegisterID* emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2) 715 { 716 if (!emitEqualityOpImpl(dst, src1, src2)) 717 EqOp::emit(this, dst, src1, src2); 718 return dst; 719 } 720 721 bool emitEqualityOpImpl(RegisterID* dst, RegisterID* src1, RegisterID* src2); 722 714 RegisterID* emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2); 723 715 RegisterID* emitCreateThis(RegisterID* dst); 724 716 void emitTDZCheck(RegisterID* target);
Note:
See TracChangeset
for help on using the changeset viewer.