Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index 401db6b3fbfc6af98c7f0e3eee01997106eb3127..7a9c12e2d2f95b037af33b2c3e950f866cfddd03 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -1578,6 +1578,9 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) { |
// Call runtime on identical objects. Otherwise return equal. |
__ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rcx); |
__ j(above_equal, ¬_identical, Label::kNear); |
+ // Call runtime on identical symbols since we need to throw a TypeError. |
+ __ CmpObjectType(rax, SYMBOL_TYPE, rcx); |
+ __ j(equal, ¬_identical, Label::kNear); |
} |
__ Set(rax, EQUAL); |
__ ret(0); |