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

Unified Diff: src/deoptimizer.cc

Issue 11617018: Fixed resizing of deopt table (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index c4dae93b62fe111ab3f6dbfb7b3da6ff1d8479a4..407351fdfd18482a11f4cff0f9358b068f8f10ce 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -1487,8 +1487,9 @@ void Deoptimizer::EnsureCodeForDeoptimizationEntry(BailoutType type,
? data->eager_deoptimization_entry_code_entries_
: data->lazy_deoptimization_entry_code_entries_;
if (max_entry_id < entry_count) return;
- entry_count = Min(Max(entry_count * 2, Deoptimizer::kMinNumberOfEntries),
- Deoptimizer::kMaxNumberOfEntries);
+ entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries);
+ while (max_entry_id >= entry_count) entry_count *= 2;
palmer 2012/12/18 20:33:41 Risk of integer overflow? And why not use unsigned
Sven Panne 2012/12/19 07:34:58 Regarding typing: See above. Regarding overflow: C
+ ASSERT(entry_count <= Deoptimizer::kMaxNumberOfEntries);
MacroAssembler masm(Isolate::Current(), NULL, 16 * KB);
masm.set_emit_debug_code(false);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698