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

Unified Diff: src/full-codegen.cc

Issue 11745027: Replaced a bailout ID assertion with quadratic time complexity by a linear one. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 12 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/full-codegen.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index faf111fa410a94215b9e9638f8b01e6c29f48437..b49337ac37ce32730035539a4eecf149d42e362e 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -448,18 +448,8 @@ void FullCodeGenerator::PrepareForBailoutForId(BailoutId id, State state) {
StateField::encode(state) | PcField::encode(masm_->pc_offset());
ASSERT(Smi::IsValid(pc_and_state));
BailoutEntry entry = { id, pc_and_state };
-#ifdef DEBUG
- if (FLAG_enable_slow_asserts) {
- // Assert that we don't have multiple bailout entries for the same node.
- for (int i = 0; i < bailout_entries_.length(); i++) {
- if (bailout_entries_.at(i).id == entry.id) {
- AstPrinter printer;
- PrintF("%s", printer.PrintProgram(info_->function()));
- UNREACHABLE();
- }
- }
- }
-#endif // DEBUG
+ ASSERT(!prepared_bailout_ids_.Contains(id.ToInt()));
+ prepared_bailout_ids_.Add(id.ToInt(), zone());
bailout_entries_.Add(entry, zone());
}
« no previous file with comments | « src/full-codegen.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698