| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 __ jmp(&loop); | 1117 __ jmp(&loop); |
| 1118 | 1118 |
| 1119 __ bind(&no_descriptors); | 1119 __ bind(&no_descriptors); |
| 1120 __ Drop(1); | 1120 __ Drop(1); |
| 1121 __ jmp(&exit); | 1121 __ jmp(&exit); |
| 1122 | 1122 |
| 1123 // We got a fixed array in register r0. Iterate through that. | 1123 // We got a fixed array in register r0. Iterate through that. |
| 1124 Label non_proxy; | 1124 Label non_proxy; |
| 1125 __ bind(&fixed_array); | 1125 __ bind(&fixed_array); |
| 1126 | 1126 |
| 1127 __ Move(r1, FeedbackVector()); | 1127 __ EmitLoadTypeFeedbackVector(r1); |
| 1128 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1128 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
| 1129 int vector_index = FeedbackVector()->GetIndex(slot); | 1129 int vector_index = SmiFromSlot(slot)->value(); |
| 1130 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index))); | 1130 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index))); |
| 1131 | 1131 |
| 1132 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check | 1132 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check |
| 1133 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object | 1133 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object |
| 1134 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 1134 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
| 1135 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE); | 1135 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE); |
| 1136 __ b(gt, &non_proxy); | 1136 __ b(gt, &non_proxy); |
| 1137 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy | 1137 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy |
| 1138 __ bind(&non_proxy); | 1138 __ bind(&non_proxy); |
| 1139 __ Push(r1, r0); // Smi and array | 1139 __ Push(r1, r0); // Smi and array |
| (...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3178 | 3178 |
| 3179 // Call the construct call builtin that handles allocation and | 3179 // Call the construct call builtin that handles allocation and |
| 3180 // constructor invocation. | 3180 // constructor invocation. |
| 3181 SetConstructCallPosition(expr); | 3181 SetConstructCallPosition(expr); |
| 3182 | 3182 |
| 3183 // Load function and argument count into r1 and r0. | 3183 // Load function and argument count into r1 and r0. |
| 3184 __ mov(r0, Operand(arg_count)); | 3184 __ mov(r0, Operand(arg_count)); |
| 3185 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); | 3185 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); |
| 3186 | 3186 |
| 3187 // Record call targets in unoptimized code. | 3187 // Record call targets in unoptimized code. |
| 3188 __ Move(r2, FeedbackVector()); | 3188 __ EmitLoadTypeFeedbackVector(r2); |
| 3189 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3189 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 3190 | 3190 |
| 3191 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3191 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 3192 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3192 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3193 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3193 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3194 // Restore context register. | 3194 // Restore context register. |
| 3195 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3195 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3196 context()->Plug(r0); | 3196 context()->Plug(r0); |
| 3197 } | 3197 } |
| 3198 | 3198 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3218 | 3218 |
| 3219 // Load original constructor into r4. | 3219 // Load original constructor into r4. |
| 3220 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3220 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 3221 __ mov(r4, result_register()); | 3221 __ mov(r4, result_register()); |
| 3222 | 3222 |
| 3223 // Load function and argument count into r1 and r0. | 3223 // Load function and argument count into r1 and r0. |
| 3224 __ mov(r0, Operand(arg_count)); | 3224 __ mov(r0, Operand(arg_count)); |
| 3225 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); | 3225 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); |
| 3226 | 3226 |
| 3227 // Record call targets in unoptimized code. | 3227 // Record call targets in unoptimized code. |
| 3228 __ Move(r2, FeedbackVector()); | 3228 __ EmitLoadTypeFeedbackVector(r2); |
| 3229 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3229 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
| 3230 | 3230 |
| 3231 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3231 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
| 3232 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3232 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3233 | 3233 |
| 3234 RecordJSReturnSite(expr); | 3234 RecordJSReturnSite(expr); |
| 3235 | 3235 |
| 3236 // Restore context register. | 3236 // Restore context register. |
| 3237 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3237 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3238 context()->Plug(r0); | 3238 context()->Plug(r0); |
| (...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5253 DCHECK(interrupt_address == | 5253 DCHECK(interrupt_address == |
| 5254 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5254 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5255 return OSR_AFTER_STACK_CHECK; | 5255 return OSR_AFTER_STACK_CHECK; |
| 5256 } | 5256 } |
| 5257 | 5257 |
| 5258 | 5258 |
| 5259 } // namespace internal | 5259 } // namespace internal |
| 5260 } // namespace v8 | 5260 } // namespace v8 |
| 5261 | 5261 |
| 5262 #endif // V8_TARGET_ARCH_ARM | 5262 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |