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

Unified Diff: src/ia32/deoptimizer-ia32.cc

Issue 7084032: Add asserts and state tracking to ensure that we do not call (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 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
Index: src/ia32/deoptimizer-ia32.cc
===================================================================
--- src/ia32/deoptimizer-ia32.cc (revision 8110)
+++ src/ia32/deoptimizer-ia32.cc (working copy)
@@ -650,7 +650,14 @@
__ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta.
__ mov(Operand(esp, 5 * kPointerSize),
Immediate(ExternalReference::isolate_address()));
- __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
+ {
+ // The new deoptimizer function cannot cause a GC so it's OK to call it
+ // without having a real frame on the stack. This scoped object will
+ // avoid an assert caused by the frame not being in place when we call into
+ // C++.
+ FrameScope scope(masm(), StackFrame::NONE);
+ __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
+ }
// Preserve deoptimizer object in register eax and get the input
// frame descriptor pointer.
@@ -698,8 +705,15 @@
__ push(eax);
__ PrepareCallCFunction(1, ebx);
__ mov(Operand(esp, 0 * kPointerSize), eax);
- __ CallCFunction(
- ExternalReference::compute_output_frames_function(isolate), 1);
+ {
+ // The compute output frames function cannot cause a GC so it's OK to call
+ // it without having a real frame on the stack. This scoped object will
+ // avoid an assert caused by the frame not being in place when we call into
+ // C++.
+ FrameScope scope(masm(), StackFrame::NONE);
+ __ CallCFunction(
+ ExternalReference::compute_output_frames_function(isolate), 1);
+ }
__ pop(eax);
// Replace the current frame with the output frames.

Powered by Google App Engine
This is Rietveld 408576698