Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: runtime/vm/stub_code_mips.cc

Issue 19547003: Cleanup: remove argument descriptor parameter when calling inline cache miss handler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 // arguments descriptor array and then compute address on the stack). 1648 // arguments descriptor array and then compute address on the stack).
1649 // T1: argument_count - 1 (smi). 1649 // T1: argument_count - 1 (smi).
1650 __ sll(T1, T1, 1); // T1 is Smi. 1650 __ sll(T1, T1, 1); // T1 is Smi.
1651 __ addu(T1, SP, T1); 1651 __ addu(T1, SP, T1);
1652 // T1: address of receiver. 1652 // T1: address of receiver.
1653 // Create a stub frame as we are pushing some objects on the stack before 1653 // Create a stub frame as we are pushing some objects on the stack before
1654 // calling into the runtime. 1654 // calling into the runtime.
1655 __ EnterStubFrame(); 1655 __ EnterStubFrame();
1656 // Preserve IC data object and arguments descriptor array and 1656 // Preserve IC data object and arguments descriptor array and
1657 // setup space on stack for result (target code object). 1657 // setup space on stack for result (target code object).
1658 int num_slots = num_args + 5; 1658 int num_slots = num_args + 4;
1659 __ addiu(SP, SP, Immediate(-num_slots * kWordSize)); 1659 __ addiu(SP, SP, Immediate(-num_slots * kWordSize));
1660 __ sw(S5, Address(SP, (num_slots - 1) * kWordSize)); 1660 __ sw(S5, Address(SP, (num_slots - 1) * kWordSize));
1661 __ sw(S4, Address(SP, (num_slots - 2) * kWordSize)); 1661 __ sw(S4, Address(SP, (num_slots - 2) * kWordSize));
1662 __ LoadImmediate(TMP, reinterpret_cast<intptr_t>(Object::null())); 1662 __ LoadImmediate(TMP, reinterpret_cast<intptr_t>(Object::null()));
1663 __ sw(TMP, Address(SP, (num_slots - 3) * kWordSize)); 1663 __ sw(TMP, Address(SP, (num_slots - 3) * kWordSize));
1664 // Push call arguments. 1664 // Push call arguments.
1665 for (intptr_t i = 0; i < num_args; i++) { 1665 for (intptr_t i = 0; i < num_args; i++) {
1666 __ lw(TMP1, Address(T1, -i * kWordSize)); 1666 __ lw(TMP1, Address(T1, -i * kWordSize));
1667 __ sw(TMP1, Address(SP, (num_slots - i - 4) * kWordSize)); 1667 __ sw(TMP1, Address(SP, (num_slots - i - 4) * kWordSize));
1668 } 1668 }
1669 // Pass IC data object and arguments descriptor array. 1669 // Pass IC data object.
1670 __ sw(S5, Address(SP, (num_slots - num_args - 4) * kWordSize)); 1670 __ sw(S5, Address(SP, (num_slots - num_args - 4) * kWordSize));
1671 __ sw(S4, Address(SP, (num_slots - num_args - 5) * kWordSize));
1672 1671
1673 if (num_args == 1) { 1672 if (num_args == 1) {
1674 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry); 1673 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry);
1675 } else if (num_args == 2) { 1674 } else if (num_args == 2) {
1676 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry); 1675 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry);
1677 } else if (num_args == 3) { 1676 } else if (num_args == 3) {
1678 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry); 1677 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry);
1679 } else { 1678 } else {
1680 UNIMPLEMENTED(); 1679 UNIMPLEMENTED();
1681 } 1680 }
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 __ lw(left, Address(SP, 1 * kWordSize)); 2372 __ lw(left, Address(SP, 1 * kWordSize));
2374 __ lw(temp2, Address(SP, 2 * kWordSize)); 2373 __ lw(temp2, Address(SP, 2 * kWordSize));
2375 __ lw(temp1, Address(SP, 3 * kWordSize)); 2374 __ lw(temp1, Address(SP, 3 * kWordSize));
2376 __ Ret(); 2375 __ Ret();
2377 __ delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize)); 2376 __ delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize));
2378 } 2377 }
2379 2378
2380 } // namespace dart 2379 } // namespace dart
2381 2380
2382 #endif // defined TARGET_ARCH_MIPS 2381 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698