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

Side by Side Diff: runtime/vm/stub_code_ia32.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_arm.cc ('k') | runtime/vm/stub_code_mips.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_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 __ EnterStubFrame(); 1512 __ EnterStubFrame();
1513 __ pushl(EDX); // Preserve arguments descriptor array. 1513 __ pushl(EDX); // Preserve arguments descriptor array.
1514 __ pushl(ECX); // Preserve IC data object. 1514 __ pushl(ECX); // Preserve IC data object.
1515 __ pushl(raw_null); // Setup space on stack for result (target code object). 1515 __ pushl(raw_null); // Setup space on stack for result (target code object).
1516 // Push call arguments. 1516 // Push call arguments.
1517 for (intptr_t i = 0; i < num_args; i++) { 1517 for (intptr_t i = 0; i < num_args; i++) {
1518 __ movl(EBX, Address(EAX, -kWordSize * i)); 1518 __ movl(EBX, Address(EAX, -kWordSize * i));
1519 __ pushl(EBX); 1519 __ pushl(EBX);
1520 } 1520 }
1521 __ pushl(ECX); // Pass IC data object. 1521 __ pushl(ECX); // Pass IC data object.
1522 __ pushl(EDX); // Pass arguments descriptor array.
1523 if (num_args == 1) { 1522 if (num_args == 1) {
1524 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry); 1523 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry);
1525 } else if (num_args == 2) { 1524 } else if (num_args == 2) {
1526 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry); 1525 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry);
1527 } else if (num_args == 3) { 1526 } else if (num_args == 3) {
1528 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry); 1527 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry);
1529 } else { 1528 } else {
1530 UNIMPLEMENTED(); 1529 UNIMPLEMENTED();
1531 } 1530 }
1532 // Remove the call arguments pushed earlier, including the IC data object 1531 // Remove the call arguments pushed earlier, including the IC data object.
1533 // and the arguments descriptor array. 1532 for (intptr_t i = 0; i < num_args + 1; i++) {
1534 for (intptr_t i = 0; i < num_args + 2; i++) {
1535 __ popl(EAX); 1533 __ popl(EAX);
1536 } 1534 }
1537 __ popl(EAX); // Pop returned code object into EAX (null if not found). 1535 __ popl(EAX); // Pop returned code object into EAX (null if not found).
1538 __ popl(ECX); // Restore IC data array. 1536 __ popl(ECX); // Restore IC data array.
1539 __ popl(EDX); // Restore arguments descriptor array. 1537 __ popl(EDX); // Restore arguments descriptor array.
1540 __ LeaveFrame(); 1538 __ LeaveFrame();
1541 Label call_target_function; 1539 Label call_target_function;
1542 __ cmpl(EAX, raw_null); 1540 __ cmpl(EAX, raw_null);
1543 __ j(NOT_EQUAL, &call_target_function, Assembler::kNearJump); 1541 __ j(NOT_EQUAL, &call_target_function, Assembler::kNearJump);
1544 // NoSuchMethod or closure. 1542 // NoSuchMethod or closure.
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 2201 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
2204 __ popl(temp); 2202 __ popl(temp);
2205 __ popl(right); 2203 __ popl(right);
2206 __ popl(left); 2204 __ popl(left);
2207 __ ret(); 2205 __ ret();
2208 } 2206 }
2209 2207
2210 } // namespace dart 2208 } // namespace dart
2211 2209
2212 #endif // defined TARGET_ARCH_IA32 2210 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698