| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3118 __ CallExternalReference(miss, 4); | 3118 __ CallExternalReference(miss, 4); |
| 3119 | 3119 |
| 3120 // Move result to edi and exit the internal frame. | 3120 // Move result to edi and exit the internal frame. |
| 3121 __ Mov(x1, x0); | 3121 __ Mov(x1, x0); |
| 3122 } | 3122 } |
| 3123 } | 3123 } |
| 3124 | 3124 |
| 3125 | 3125 |
| 3126 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { | 3126 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
| 3127 // If the receiver is a smi trigger the non-string case. | 3127 // If the receiver is a smi trigger the non-string case. |
| 3128 __ JumpIfSmi(object_, receiver_not_string_); | 3128 if (check_mode_ == RECEIVER_IS_UNKNOWN) { |
| 3129 __ JumpIfSmi(object_, receiver_not_string_); |
| 3129 | 3130 |
| 3130 // Fetch the instance type of the receiver into result register. | 3131 // Fetch the instance type of the receiver into result register. |
| 3131 __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); | 3132 __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); |
| 3132 __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); | 3133 __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); |
| 3133 | 3134 |
| 3134 // If the receiver is not a string trigger the non-string case. | 3135 // If the receiver is not a string trigger the non-string case. |
| 3135 __ TestAndBranchIfAnySet(result_, kIsNotStringMask, receiver_not_string_); | 3136 __ TestAndBranchIfAnySet(result_, kIsNotStringMask, receiver_not_string_); |
| 3137 } |
| 3136 | 3138 |
| 3137 // If the index is non-smi trigger the non-smi case. | 3139 // If the index is non-smi trigger the non-smi case. |
| 3138 __ JumpIfNotSmi(index_, &index_not_smi_); | 3140 __ JumpIfNotSmi(index_, &index_not_smi_); |
| 3139 | 3141 |
| 3140 __ Bind(&got_smi_index_); | 3142 __ Bind(&got_smi_index_); |
| 3141 // Check for index out of range. | 3143 // Check for index out of range. |
| 3142 __ Ldrsw(result_, UntagSmiFieldMemOperand(object_, String::kLengthOffset)); | 3144 __ Ldrsw(result_, UntagSmiFieldMemOperand(object_, String::kLengthOffset)); |
| 3143 __ Cmp(result_, Operand::UntagSmi(index_)); | 3145 __ Cmp(result_, Operand::UntagSmi(index_)); |
| 3144 __ B(ls, index_out_of_range_); | 3146 __ B(ls, index_out_of_range_); |
| 3145 | 3147 |
| (...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5088 MemOperand(fp, 6 * kPointerSize), | 5090 MemOperand(fp, 6 * kPointerSize), |
| 5089 NULL); | 5091 NULL); |
| 5090 } | 5092 } |
| 5091 | 5093 |
| 5092 | 5094 |
| 5093 #undef __ | 5095 #undef __ |
| 5094 | 5096 |
| 5095 } } // namespace v8::internal | 5097 } } // namespace v8::internal |
| 5096 | 5098 |
| 5097 #endif // V8_TARGET_ARCH_ARM64 | 5099 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |