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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 224723017: Fix bug in closure call stub. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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_arm.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 34775)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -741,9 +741,11 @@
// EAX: Function.
// EDX: Arguments descriptor array.
- __ movl(ECX, FieldAddress(EBX, Code::instructions_offset()));
- __ addl(ECX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
- __ jmp(ECX);
+ // ECX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
+ __ xorl(ECX, ECX);
+ __ movl(EBX, FieldAddress(EBX, Code::instructions_offset()));
+ __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+ __ jmp(EBX);
__ Bind(&not_closure);
// Call runtime to attempt to resolve and invoke a call method on a
« 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