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 | 5 |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 } | 1392 } |
1393 | 1393 |
1394 | 1394 |
1395 static void Generate_PushAppliedArguments(MacroAssembler* masm, | 1395 static void Generate_PushAppliedArguments(MacroAssembler* masm, |
1396 const int argumentsOffset, | 1396 const int argumentsOffset, |
1397 const int indexOffset, | 1397 const int indexOffset, |
1398 const int limitOffset) { | 1398 const int limitOffset) { |
1399 Label entry, loop; | 1399 Label entry, loop; |
1400 Register receiver = LoadDescriptor::ReceiverRegister(); | 1400 Register receiver = LoadDescriptor::ReceiverRegister(); |
1401 Register key = LoadDescriptor::NameRegister(); | 1401 Register key = LoadDescriptor::NameRegister(); |
| 1402 Register slot = LoadDescriptor::SlotRegister(); |
| 1403 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
1402 | 1404 |
1403 __ lw(key, MemOperand(fp, indexOffset)); | 1405 __ lw(key, MemOperand(fp, indexOffset)); |
1404 __ Branch(&entry); | 1406 __ Branch(&entry); |
1405 | 1407 |
1406 // Load the current argument from the arguments array. | 1408 // Load the current argument from the arguments array. |
1407 __ bind(&loop); | 1409 __ bind(&loop); |
1408 __ lw(receiver, MemOperand(fp, argumentsOffset)); | 1410 __ lw(receiver, MemOperand(fp, argumentsOffset)); |
1409 | 1411 |
1410 // Use inline caching to speed up access to arguments. | 1412 // Use inline caching to speed up access to arguments. |
1411 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); | 1413 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); |
| 1414 Handle<TypeFeedbackVector> feedback_vector = |
| 1415 masm->isolate()->factory()->NewTypeFeedbackVector(&spec); |
| 1416 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 1417 __ li(slot, Operand(Smi::FromInt(index))); |
| 1418 __ li(vector, feedback_vector); |
| 1419 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode(); |
1412 __ Call(ic, RelocInfo::CODE_TARGET); | 1420 __ Call(ic, RelocInfo::CODE_TARGET); |
1413 | 1421 |
1414 __ push(v0); | 1422 __ push(v0); |
1415 | 1423 |
1416 // Use inline caching to access the arguments. | 1424 // Use inline caching to access the arguments. |
1417 __ lw(key, MemOperand(fp, indexOffset)); | 1425 __ lw(key, MemOperand(fp, indexOffset)); |
1418 __ Addu(key, key, Operand(1 << kSmiTagSize)); | 1426 __ Addu(key, key, Operand(1 << kSmiTagSize)); |
1419 __ sw(key, MemOperand(fp, indexOffset)); | 1427 __ sw(key, MemOperand(fp, indexOffset)); |
1420 | 1428 |
1421 // Test if the copy loop has finished copying all the elements from the | 1429 // Test if the copy loop has finished copying all the elements from the |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1830 } | 1838 } |
1831 } | 1839 } |
1832 | 1840 |
1833 | 1841 |
1834 #undef __ | 1842 #undef __ |
1835 | 1843 |
1836 } // namespace internal | 1844 } // namespace internal |
1837 } // namespace v8 | 1845 } // namespace v8 |
1838 | 1846 |
1839 #endif // V8_TARGET_ARCH_MIPS | 1847 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |