Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index f3fb6ac63ddb8f8fc3aed96cd8524cfd2471ca4f..9056772324e5fb98606d5f4d1be30efbe3e4b369 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -3125,14 +3125,16 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) { |
void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
// If the receiver is a smi trigger the non-string case. |
- __ JumpIfSmi(object_, receiver_not_string_); |
+ if (check_mode_ == RECEIVER_IS_UNKNOWN) { |
+ __ JumpIfSmi(object_, receiver_not_string_); |
- // Fetch the instance type of the receiver into result register. |
- __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); |
- __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); |
+ // Fetch the instance type of the receiver into result register. |
+ __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); |
+ __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); |
- // If the receiver is not a string trigger the non-string case. |
- __ TestAndBranchIfAnySet(result_, kIsNotStringMask, receiver_not_string_); |
+ // If the receiver is not a string trigger the non-string case. |
+ __ TestAndBranchIfAnySet(result_, kIsNotStringMask, receiver_not_string_); |
+ } |
// If the index is non-smi trigger the non-smi case. |
__ JumpIfNotSmi(index_, &index_not_smi_); |