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

Side by Side Diff: runtime/vm/stub_code_x64.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_mips.cc ('k') | no next file » | 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_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 __ EnterStubFrame(); 1493 __ EnterStubFrame();
1494 __ pushq(R10); // Preserve arguments descriptor array. 1494 __ pushq(R10); // Preserve arguments descriptor array.
1495 __ pushq(RBX); // Preserve IC data object. 1495 __ pushq(RBX); // Preserve IC data object.
1496 __ pushq(raw_null); // Setup space on stack for result (target code object). 1496 __ pushq(raw_null); // Setup space on stack for result (target code object).
1497 // Push call arguments. 1497 // Push call arguments.
1498 for (intptr_t i = 0; i < num_args; i++) { 1498 for (intptr_t i = 0; i < num_args; i++) {
1499 __ movq(RCX, Address(RAX, -kWordSize * i)); 1499 __ movq(RCX, Address(RAX, -kWordSize * i));
1500 __ pushq(RCX); 1500 __ pushq(RCX);
1501 } 1501 }
1502 __ pushq(RBX); // Pass IC data object. 1502 __ pushq(RBX); // Pass IC data object.
1503 __ pushq(R10); // Pass arguments descriptor array.
1504 if (num_args == 1) { 1503 if (num_args == 1) {
1505 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry); 1504 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry);
1506 } else if (num_args == 2) { 1505 } else if (num_args == 2) {
1507 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry); 1506 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry);
1508 } else if (num_args == 3) { 1507 } else if (num_args == 3) {
1509 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry); 1508 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry);
1510 } else { 1509 } else {
1511 UNIMPLEMENTED(); 1510 UNIMPLEMENTED();
1512 } 1511 }
1513 // Remove the call arguments pushed earlier, including the IC data object 1512 // Remove the call arguments pushed earlier, including the IC data object.
1514 // and the arguments descriptor array. 1513 for (intptr_t i = 0; i < num_args + 1; i++) {
1515 for (intptr_t i = 0; i < num_args + 2; i++) {
1516 __ popq(RAX); 1514 __ popq(RAX);
1517 } 1515 }
1518 __ popq(RAX); // Pop returned code object into RAX (null if not found). 1516 __ popq(RAX); // Pop returned code object into RAX (null if not found).
1519 __ popq(RBX); // Restore IC data array. 1517 __ popq(RBX); // Restore IC data array.
1520 __ popq(R10); // Restore arguments descriptor array. 1518 __ popq(R10); // Restore arguments descriptor array.
1521 __ LeaveFrame(); 1519 __ LeaveFrame();
1522 Label call_target_function; 1520 Label call_target_function;
1523 __ cmpq(RAX, raw_null); 1521 __ cmpq(RAX, raw_null);
1524 __ j(NOT_EQUAL, &call_target_function, Assembler::kNearJump); 1522 __ j(NOT_EQUAL, &call_target_function, Assembler::kNearJump);
1525 // NoSuchMethod or closure. 1523 // NoSuchMethod or closure.
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 __ movq(right, Address(RSP, 3 * kWordSize)); 2160 __ movq(right, Address(RSP, 3 * kWordSize));
2163 GenerateIdenticalWithNumberCheckStub(assembler, left, right); 2161 GenerateIdenticalWithNumberCheckStub(assembler, left, right);
2164 __ popq(right); 2162 __ popq(right);
2165 __ popq(left); 2163 __ popq(left);
2166 __ ret(); 2164 __ ret();
2167 } 2165 }
2168 2166
2169 } // namespace dart 2167 } // namespace dart
2170 2168
2171 #endif // defined TARGET_ARCH_X64 2169 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698