Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 28663ab556887274c4fdee9a13542473a760de59..0828eb1a8c34da848658e3191266f33838aa9e96 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -5720,6 +5720,13 @@ void StringAddStub::Generate(MacroAssembler* masm) { |
// edi: second instance type. |
__ test(ecx, Immediate(kAsciiDataHintMask)); |
__ j(not_zero, &ascii_data); |
+ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); |
+ __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); |
+ __ xor_(edi, ecx); |
+ STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0); |
+ __ and_(edi, kOneByteStringTag | kAsciiDataHintTag); |
+ __ cmp(edi, kOneByteStringTag | kAsciiDataHintTag); |
+ __ j(equal, &ascii_data); |
// Allocate a two byte cons string. |
__ AllocateTwoByteConsString(ecx, edi, no_reg, &call_runtime); |
__ jmp(&allocated); |