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/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug.h" | 10 #include "src/debug.h" |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 } | 1381 } |
1382 | 1382 |
1383 | 1383 |
1384 static void Generate_PushAppliedArguments(MacroAssembler* masm, | 1384 static void Generate_PushAppliedArguments(MacroAssembler* masm, |
1385 const int argumentsOffset, | 1385 const int argumentsOffset, |
1386 const int indexOffset, | 1386 const int indexOffset, |
1387 const int limitOffset) { | 1387 const int limitOffset) { |
1388 Label entry, loop; | 1388 Label entry, loop; |
1389 Register receiver = LoadDescriptor::ReceiverRegister(); | 1389 Register receiver = LoadDescriptor::ReceiverRegister(); |
1390 Register key = LoadDescriptor::NameRegister(); | 1390 Register key = LoadDescriptor::NameRegister(); |
| 1391 Register slot = LoadDescriptor::SlotRegister(); |
| 1392 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
1391 | 1393 |
1392 __ Ldr(key, MemOperand(fp, indexOffset)); | 1394 __ Ldr(key, MemOperand(fp, indexOffset)); |
1393 __ B(&entry); | 1395 __ B(&entry); |
1394 | 1396 |
1395 // Load the current argument from the arguments array. | 1397 // Load the current argument from the arguments array. |
1396 __ Bind(&loop); | 1398 __ Bind(&loop); |
1397 __ Ldr(receiver, MemOperand(fp, argumentsOffset)); | 1399 __ Ldr(receiver, MemOperand(fp, argumentsOffset)); |
1398 | 1400 |
1399 // Use inline caching to speed up access to arguments. | 1401 // Use inline caching to speed up access to arguments. |
1400 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); | 1402 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); |
| 1403 Handle<TypeFeedbackVector> feedback_vector = |
| 1404 masm->isolate()->factory()->NewTypeFeedbackVector(&spec); |
| 1405 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 1406 __ Mov(slot, Smi::FromInt(index)); |
| 1407 __ Mov(vector, feedback_vector); |
| 1408 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode(); |
1401 __ Call(ic, RelocInfo::CODE_TARGET); | 1409 __ Call(ic, RelocInfo::CODE_TARGET); |
1402 | 1410 |
1403 // Push the nth argument. | 1411 // Push the nth argument. |
1404 __ Push(x0); | 1412 __ Push(x0); |
1405 | 1413 |
1406 __ Ldr(key, MemOperand(fp, indexOffset)); | 1414 __ Ldr(key, MemOperand(fp, indexOffset)); |
1407 __ Add(key, key, Smi::FromInt(1)); | 1415 __ Add(key, key, Smi::FromInt(1)); |
1408 __ Str(key, MemOperand(fp, indexOffset)); | 1416 __ Str(key, MemOperand(fp, indexOffset)); |
1409 | 1417 |
1410 // Test if the copy loop has finished copying all the elements from the | 1418 // Test if the copy loop has finished copying all the elements from the |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 } | 1840 } |
1833 } | 1841 } |
1834 | 1842 |
1835 | 1843 |
1836 #undef __ | 1844 #undef __ |
1837 | 1845 |
1838 } // namespace internal | 1846 } // namespace internal |
1839 } // namespace v8 | 1847 } // namespace v8 |
1840 | 1848 |
1841 #endif // V8_TARGET_ARCH_ARM | 1849 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |