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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 11438017: Pass IC data and arguments descriptor to IC miss runtime functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 289f1c04fbb900ff40f715f6b92e2948b47b8dda..c56dc4b6f47a2ba73bc444bb35d32772c11d4391 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -286,11 +286,15 @@ void StubCode::GenerateInstanceFunctionLookupStub(Assembler* assembler) {
// First resolve the function to get the function object.
__ pushl(raw_null); // Setup space on stack for return value.
- __ pushl(EAX); // Push receiver.
+ __ pushl(EAX); // Pass receiver.
+ __ pushl(ECX); // Pass IC data object.
+ __ pushl(EDX); // Pass arguments descriptor array.
__ CallRuntime(kResolveCompileInstanceFunctionRuntimeEntry);
- __ popl(EAX); // Remove receiver pushed earlier.
+ __ popl(EAX); // Remove arguments pushed earlier.
+ __ popl(EAX);
+ __ popl(EAX);
__ popl(ECX); // Pop returned code object into ECX.
- // Pop preserved values
+ // Pop preserved values.
__ popl(EDX); // Restore ic-data.
__ popl(EAX); // Restore receiver.
__ popl(EDI); // Restore arguments descriptor array.
@@ -1640,13 +1644,15 @@ void StubCode::GenerateNArgsCheckInlineCacheStub(Assembler* assembler,
// calling into the runtime.
AssemblerMacros::EnterStubFrame(assembler);
__ pushl(EDX); // Preserve arguments descriptor array.
- __ pushl(ECX); // Preserve IC data array
+ __ pushl(ECX); // Preserve IC data object.
__ pushl(raw_null); // Setup space on stack for result (target code object).
// Push call arguments.
for (intptr_t i = 0; i < num_args; i++) {
- __ movl(EDX, Address(EAX, -kWordSize * i));
- __ pushl(EDX);
+ __ movl(EBX, Address(EAX, -kWordSize * i));
+ __ pushl(EBX);
}
+ __ pushl(ECX); // Pass IC data object.
+ __ pushl(EDX); // Pass arguments descriptor array.
if (num_args == 1) {
__ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry);
} else if (num_args == 2) {
@@ -1656,8 +1662,9 @@ void StubCode::GenerateNArgsCheckInlineCacheStub(Assembler* assembler,
} else {
UNIMPLEMENTED();
}
- // Remove call arguments pushed earlier.
- for (intptr_t i = 0; i < num_args; i++) {
+ // Remove the call arguments pushed earlier, including the IC data object
+ // and the arguments descriptor array.
+ for (intptr_t i = 0; i < num_args + 2; i++) {
__ popl(EAX);
}
__ popl(EAX); // Pop returned code object into EAX (null if not found).
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698