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

Unified Diff: src/codegen-ia32.cc

Issue 8873: Allow three runtime call attempts before throwing an out of... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 | « src/codegen-arm.cc ('k') | src/handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 636)
+++ src/codegen-ia32.cc (working copy)
@@ -4955,7 +4955,8 @@
Label throw_out_of_memory_exception;
Label throw_normal_exception;
-#ifdef DEBUG
+ // Call into the runtime system. Collect garbage before the call if
+ // running with --gc-greedy set.
if (FLAG_gc_greedy) {
Failure* failure = Failure::RetryAfterGC(0);
__ mov(Operand(eax), Immediate(reinterpret_cast<int32_t>(failure)));
@@ -4964,14 +4965,17 @@
&throw_out_of_memory_exception,
frame_type,
FLAG_gc_greedy);
-#else
+
+ // Do space-specific GC and retry runtime call.
GenerateCore(masm,
&throw_normal_exception,
&throw_out_of_memory_exception,
frame_type,
- false);
-#endif
+ true);
+ // Do full GC and retry runtime call one final time.
+ Failure* failure = Failure::InternalError();
+ __ mov(Operand(eax), Immediate(reinterpret_cast<int32_t>(failure)));
GenerateCore(masm,
&throw_normal_exception,
&throw_out_of_memory_exception,
« no previous file with comments | « src/codegen-arm.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698