| 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_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 ParameterCount expected(0); | 1404 ParameterCount expected(0); |
| 1405 __ InvokeCode(a3, expected, expected, JUMP_FUNCTION, NullCallWrapper()); | 1405 __ InvokeCode(a3, expected, expected, JUMP_FUNCTION, NullCallWrapper()); |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 | 1408 |
| 1409 static void Generate_PushAppliedArguments(MacroAssembler* masm, | 1409 static void Generate_PushAppliedArguments(MacroAssembler* masm, |
| 1410 const int argumentsOffset, | 1410 const int argumentsOffset, |
| 1411 const int indexOffset, | 1411 const int indexOffset, |
| 1412 const int limitOffset) { | 1412 const int limitOffset) { |
| 1413 Label entry, loop; | 1413 Label entry, loop; |
| 1414 __ ld(a0, MemOperand(fp, indexOffset)); | 1414 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 1415 Register key = LoadDescriptor::NameRegister(); |
| 1416 |
| 1417 __ ld(key, MemOperand(fp, indexOffset)); |
| 1415 __ Branch(&entry); | 1418 __ Branch(&entry); |
| 1416 | 1419 |
| 1417 // Load the current argument from the arguments array and push it to the | 1420 // Load the current argument from the arguments array. |
| 1418 // stack. | |
| 1419 // a0: current argument index | |
| 1420 __ bind(&loop); | 1421 __ bind(&loop); |
| 1421 __ ld(a1, MemOperand(fp, argumentsOffset)); | 1422 __ ld(receiver, MemOperand(fp, argumentsOffset)); |
| 1422 __ Push(a1, a0); | |
| 1423 | 1423 |
| 1424 // Call the runtime to access the property in the arguments array. | 1424 // Use inline caching to speed up access to arguments. |
| 1425 __ CallRuntime(Runtime::kGetProperty, 2); | 1425 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); |
| 1426 __ Call(ic, RelocInfo::CODE_TARGET); |
| 1427 |
| 1426 __ push(v0); | 1428 __ push(v0); |
| 1427 | 1429 |
| 1428 // Use inline caching to access the arguments. | 1430 // Use inline caching to access the arguments. |
| 1429 __ ld(a0, MemOperand(fp, indexOffset)); | 1431 __ ld(key, MemOperand(fp, indexOffset)); |
| 1430 __ Daddu(a0, a0, Operand(Smi::FromInt(1))); | 1432 __ Daddu(key, key, Operand(Smi::FromInt(1))); |
| 1431 __ sd(a0, MemOperand(fp, indexOffset)); | 1433 __ sd(key, MemOperand(fp, indexOffset)); |
| 1432 | 1434 |
| 1433 // Test if the copy loop has finished copying all the elements from the | 1435 // Test if the copy loop has finished copying all the elements from the |
| 1434 // arguments object. | 1436 // arguments object. |
| 1435 __ bind(&entry); | 1437 __ bind(&entry); |
| 1436 __ ld(a1, MemOperand(fp, limitOffset)); | 1438 __ ld(a1, MemOperand(fp, limitOffset)); |
| 1437 __ Branch(&loop, ne, a0, Operand(a1)); | 1439 __ Branch(&loop, ne, key, Operand(a1)); |
| 1438 | 1440 |
| 1439 // On exit, the pushed arguments count is in a0, untagged | 1441 // On exit, the pushed arguments count is in a0, untagged |
| 1442 __ mov(a0, key); |
| 1440 __ SmiUntag(a0); | 1443 __ SmiUntag(a0); |
| 1441 } | 1444 } |
| 1442 | 1445 |
| 1443 | 1446 |
| 1444 // Used by FunctionApply and ReflectApply | 1447 // Used by FunctionApply and ReflectApply |
| 1445 static void Generate_ApplyHelper(MacroAssembler* masm, bool targetIsArgument) { | 1448 static void Generate_ApplyHelper(MacroAssembler* masm, bool targetIsArgument) { |
| 1446 const int kFormalParameters = targetIsArgument ? 3 : 2; | 1449 const int kFormalParameters = targetIsArgument ? 3 : 2; |
| 1447 const int kStackSize = kFormalParameters + 1; | 1450 const int kStackSize = kFormalParameters + 1; |
| 1448 | 1451 |
| 1449 { | 1452 { |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1821 __ break_(0xCC); | 1824 __ break_(0xCC); |
| 1822 } | 1825 } |
| 1823 } | 1826 } |
| 1824 | 1827 |
| 1825 | 1828 |
| 1826 #undef __ | 1829 #undef __ |
| 1827 | 1830 |
| 1828 } } // namespace v8::internal | 1831 } } // namespace v8::internal |
| 1829 | 1832 |
| 1830 #endif // V8_TARGET_ARCH_MIPS64 | 1833 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |