Index: src/x64/codegen-x64.cc |
=================================================================== |
--- src/x64/codegen-x64.cc (revision 3315) |
+++ src/x64/codegen-x64.cc (working copy) |
@@ -3778,6 +3778,12 @@ |
__ j(not_equal, &slow_case); |
// ConsString. |
+ // Check that the right hand side is the empty string (ie if this is really a |
+ // flat string in a cons string). If that is not the case we would rather go |
+ // to the runtime system now, to flatten the string. |
+ __ movq(temp.reg(), FieldOperand(object.reg(), ConsString::kSecondOffset)); |
+ __ CompareRoot(temp.reg(), Heap::kEmptyStringRootIndex); |
Lasse Reichstein
2009/11/17 10:08:20
Is a memory read really more efficient than an ext
|
+ __ j(not_equal, &slow_case); |
// Get the first of the two strings. |
__ movq(object.reg(), FieldOperand(object.reg(), ConsString::kFirstOffset)); |
__ jmp(&try_again_with_new_string); |