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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 517383005: VM: Clean up generated code for NoSuchMethod invocation of closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.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
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 39693)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -1196,10 +1196,9 @@
// Input parameters:
// ESP : points to return address.
// ESP + 4 : address of last argument.
-// ECX : ic-data.
// EDX : arguments descriptor array.
// Uses EAX, EBX, EDI as temporary registers.
-void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) {
+void StubCode::GenerateCallClosureNoSuchMethodStub(Assembler* assembler) {
__ EnterStubFrame();
// Load the receiver.
@@ -1210,22 +1209,16 @@
Immediate(reinterpret_cast<intptr_t>(Object::null()));
__ pushl(raw_null); // Setup space on stack for result from noSuchMethod.
__ pushl(EAX); // Receiver.
- __ pushl(ECX); // IC data array.
__ pushl(EDX); // Arguments descriptor array.
__ movl(EDX, EDI);
// EDX: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
- __ CallRuntime(kInvokeNoSuchMethodFunctionRuntimeEntry, 4);
-
- // Remove arguments.
- __ Drop(4);
- __ popl(EAX); // Get result into EAX.
-
- // Remove the stub frame as we are about to return.
- __ LeaveFrame();
- __ ret();
+ const intptr_t kNumArgs = 3;
+ __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs);
+ // noSuchMethod on closures always throws an error, so it will never return.
+ __ int3();
}
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698