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/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 | 1174 |
1175 __ Bind(&no_descriptors); | 1175 __ Bind(&no_descriptors); |
1176 __ Drop(1); | 1176 __ Drop(1); |
1177 __ B(&exit); | 1177 __ B(&exit); |
1178 | 1178 |
1179 // We got a fixed array in register x0. Iterate through that. | 1179 // We got a fixed array in register x0. Iterate through that. |
1180 __ Bind(&fixed_array); | 1180 __ Bind(&fixed_array); |
1181 | 1181 |
1182 __ LoadObject(x1, FeedbackVector()); | 1182 __ LoadObject(x1, FeedbackVector()); |
1183 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1183 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
1184 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(slot.ToInt()))); | 1184 int vector_index = FeedbackVector()->GetIndex(slot); |
| 1185 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(vector_index))); |
1185 | 1186 |
1186 __ Mov(x1, Smi::FromInt(1)); // Smi indicates slow check. | 1187 __ Mov(x1, Smi::FromInt(1)); // Smi indicates slow check. |
1187 __ Peek(x10, 0); // Get enumerated object. | 1188 __ Peek(x10, 0); // Get enumerated object. |
1188 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 1189 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
1189 // TODO(all): similar check was done already. Can we avoid it here? | 1190 // TODO(all): similar check was done already. Can we avoid it here? |
1190 __ CompareObjectType(x10, x11, x12, LAST_JS_PROXY_TYPE); | 1191 __ CompareObjectType(x10, x11, x12, LAST_JS_PROXY_TYPE); |
1191 DCHECK(Smi::FromInt(0) == 0); | 1192 DCHECK(Smi::FromInt(0) == 0); |
1192 __ CzeroX(x1, le); // Zero indicates proxy. | 1193 __ CzeroX(x1, le); // Zero indicates proxy. |
1193 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset)); | 1194 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset)); |
1194 // Smi and array, fixed array length (as smi) and initial index. | 1195 // Smi and array, fixed array length (as smi) and initial index. |
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2552 VisitForStackValue(args->at(i)); | 2553 VisitForStackValue(args->at(i)); |
2553 } | 2554 } |
2554 } | 2555 } |
2555 // Record source position of the IC call. | 2556 // Record source position of the IC call. |
2556 SetSourcePosition(expr->position()); | 2557 SetSourcePosition(expr->position()); |
2557 | 2558 |
2558 Handle<Code> ic = CallIC::initialize_stub( | 2559 Handle<Code> ic = CallIC::initialize_stub( |
2559 isolate(), arg_count, call_type); | 2560 isolate(), arg_count, call_type); |
2560 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); | 2561 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); |
2561 __ Peek(x1, (arg_count + 1) * kXRegSize); | 2562 __ Peek(x1, (arg_count + 1) * kXRegSize); |
2562 // Don't assign a type feedback id to the IC, since type feedback is provided | 2563 CallIC(ic, TypeFeedbackId(expr->CallFeedbackSlot().ToInt())); |
2563 // by the vector above. | |
2564 CallIC(ic); | |
2565 | 2564 |
2566 RecordJSReturnSite(expr); | 2565 RecordJSReturnSite(expr); |
2567 // Restore context register. | 2566 // Restore context register. |
2568 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2567 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2569 context()->DropAndPlug(1, x0); | 2568 context()->DropAndPlug(1, x0); |
2570 } | 2569 } |
2571 | 2570 |
2572 | 2571 |
2573 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { | 2572 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
2574 ASM_LOCATION("FullCodeGenerator::EmitResolvePossiblyDirectEval"); | 2573 ASM_LOCATION("FullCodeGenerator::EmitResolvePossiblyDirectEval"); |
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5181 return previous_; | 5180 return previous_; |
5182 } | 5181 } |
5183 | 5182 |
5184 | 5183 |
5185 #undef __ | 5184 #undef __ |
5186 | 5185 |
5187 | 5186 |
5188 } } // namespace v8::internal | 5187 } } // namespace v8::internal |
5189 | 5188 |
5190 #endif // V8_TARGET_ARCH_ARM64 | 5189 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |