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

Unified Diff: runtime/vm/compiler.cc

Issue 11014013: Added slow_assert macro and flag for slow development assertions in the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index d462881fee0e42a6bd6c5c80b6260677ed23481b..1b9a1247c5a7dfe49c0667c50c89e3ac33152380 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -5,6 +5,8 @@
#include "vm/compiler.h"
#include "vm/assembler.h"
+
+#include "vm/assert.h"
#include "vm/ast_printer.h"
#include "vm/code_generator.h"
#include "vm/code_patcher.h"
@@ -47,6 +49,7 @@ DEFINE_FLAG(int, deoptimization_counter_threshold, 5,
" certain optimizations");
DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining");
DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis");
+DEFINE_FLAG(bool, slow_assert, false, "Enable slow assertions");
Kevin Millikin (Google) 2012/10/01 11:38:26 Let's spell it "slow_asserts".
zerny-google 2012/10/01 11:50:36 Done.
DECLARE_FLAG(bool, print_flow_graph);
@@ -180,8 +183,6 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
if (FLAG_use_inlining) {
FlowGraphInliner inliner(flow_graph);
inliner.Inline();
- // Verify that the use lists are still valid.
- DEBUG_ASSERT(flow_graph->ValidateUseLists());
}
// Propagate types and eliminate more type tests.
@@ -191,7 +192,7 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
}
// Verify that the use lists are still valid.
- DEBUG_ASSERT(flow_graph->ValidateUseLists());
+ SLOW_ASSERT(flow_graph->ValidateUseLists());
// Propagate sminess from CheckSmi to phis.
optimizer.PropagateSminess();
« no previous file with comments | « runtime/platform/assert.h ('k') | runtime/vm/flow_graph.cc » ('j') | runtime/vm/flow_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698