| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 } | 1378 } |
| 1379 | 1379 |
| 1380 | 1380 |
| 1381 static void Generate_PushAppliedArguments(MacroAssembler* masm, | 1381 static void Generate_PushAppliedArguments(MacroAssembler* masm, |
| 1382 const int argumentsOffset, | 1382 const int argumentsOffset, |
| 1383 const int indexOffset, | 1383 const int indexOffset, |
| 1384 const int limitOffset) { | 1384 const int limitOffset) { |
| 1385 Label entry, loop; | 1385 Label entry, loop; |
| 1386 Register receiver = LoadDescriptor::ReceiverRegister(); | 1386 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 1387 Register key = LoadDescriptor::NameRegister(); | 1387 Register key = LoadDescriptor::NameRegister(); |
| 1388 Register slot = LoadDescriptor::SlotRegister(); |
| 1389 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
| 1388 | 1390 |
| 1389 __ ldr(key, MemOperand(fp, indexOffset)); | 1391 __ ldr(key, MemOperand(fp, indexOffset)); |
| 1390 __ b(&entry); | 1392 __ b(&entry); |
| 1391 | 1393 |
| 1392 // Load the current argument from the arguments array. | 1394 // Load the current argument from the arguments array. |
| 1393 __ bind(&loop); | 1395 __ bind(&loop); |
| 1394 __ ldr(receiver, MemOperand(fp, argumentsOffset)); | 1396 __ ldr(receiver, MemOperand(fp, argumentsOffset)); |
| 1395 | 1397 |
| 1396 // Use inline caching to speed up access to arguments. | 1398 // Use inline caching to speed up access to arguments. |
| 1397 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); | 1399 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); |
| 1400 Handle<TypeFeedbackVector> feedback_vector = |
| 1401 masm->isolate()->factory()->NewTypeFeedbackVector(&spec); |
| 1402 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 1403 __ mov(slot, Operand(Smi::FromInt(index))); |
| 1404 __ Move(vector, feedback_vector); |
| 1405 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode(); |
| 1398 __ Call(ic, RelocInfo::CODE_TARGET); | 1406 __ Call(ic, RelocInfo::CODE_TARGET); |
| 1399 | 1407 |
| 1400 // Push the nth argument. | 1408 // Push the nth argument. |
| 1401 __ push(r0); | 1409 __ push(r0); |
| 1402 | 1410 |
| 1403 __ ldr(key, MemOperand(fp, indexOffset)); | 1411 __ ldr(key, MemOperand(fp, indexOffset)); |
| 1404 __ add(key, key, Operand(1 << kSmiTagSize)); | 1412 __ add(key, key, Operand(1 << kSmiTagSize)); |
| 1405 __ str(key, MemOperand(fp, indexOffset)); | 1413 __ str(key, MemOperand(fp, indexOffset)); |
| 1406 | 1414 |
| 1407 // Test if the copy loop has finished copying all the elements from the | 1415 // Test if the copy loop has finished copying all the elements from the |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1803 } | 1811 } |
| 1804 } | 1812 } |
| 1805 | 1813 |
| 1806 | 1814 |
| 1807 #undef __ | 1815 #undef __ |
| 1808 | 1816 |
| 1809 } // namespace internal | 1817 } // namespace internal |
| 1810 } // namespace v8 | 1818 } // namespace v8 |
| 1811 | 1819 |
| 1812 #endif // V8_TARGET_ARCH_ARM | 1820 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |