Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index a12e92eab6f6cd3f3e257b6f8ccfe61bb5ad38ae..8e6fc4496a09bdb371fecac9dbfbe09a438cb101 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -2739,14 +2739,16 @@ void InstanceofStub::Generate(MacroAssembler* masm) { |
void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
// If the receiver is a smi trigger the non-string case. |
- __ JumpIfSmi(object_, receiver_not_string_); |
- |
- // Fetch the instance type of the receiver into result register. |
- __ movp(result_, FieldOperand(object_, HeapObject::kMapOffset)); |
- __ movzxbl(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); |
- // If the receiver is not a string trigger the non-string case. |
- __ testb(result_, Immediate(kIsNotStringMask)); |
- __ j(not_zero, receiver_not_string_); |
+ if (check_mode_ == RECEIVER_IS_UNKNOWN) { |
+ __ JumpIfSmi(object_, receiver_not_string_); |
+ |
+ // Fetch the instance type of the receiver into result register. |
+ __ movp(result_, FieldOperand(object_, HeapObject::kMapOffset)); |
+ __ movzxbl(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); |
+ // If the receiver is not a string trigger the non-string case. |
+ __ testb(result_, Immediate(kIsNotStringMask)); |
+ __ j(not_zero, receiver_not_string_); |
+ } |
// If the index is non-smi trigger the non-smi case. |
__ JumpIfNotSmi(index_, &index_not_smi_); |