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