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

Unified Diff: runtime/vm/flow_graph_inliner.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/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index c01304d3f1ea29d271d5742b2b3ab9353a153a1f..c23466f189d447fd226aadc5a4a7e3221e1ec971 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -21,6 +21,7 @@ DEFINE_FLAG(bool, trace_inlining, false, "Trace inlining");
DEFINE_FLAG(charp, inlining_filter, NULL, "Inline only in named function");
DECLARE_FLAG(bool, print_flow_graph);
DECLARE_FLAG(int, deoptimization_counter_threshold);
+DECLARE_FLAG(bool, slow_assert);
Kevin Millikin (Google) 2012/10/01 10:53:25 I guess I'd rather have DECLARE_FLAG and #define S
zerny-google 2012/10/01 11:12:04 Done.
#define TRACE_INLINING(statement) \
do { \
@@ -145,9 +146,6 @@ class CallSiteInliner : public FlowGraphVisitor {
caller_graph_->InlineCall(call, callee_graph);
next_ssa_temp_index_ = caller_graph_->max_virtual_register_number();
- // Check that inlining maintains use lists.
- DEBUG_ASSERT(caller_graph_->ValidateUseLists());
-
// Remove push arguments of the call.
for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
PushArgumentInstr* push = call->ArgumentAt(i);
@@ -173,6 +171,9 @@ class CallSiteInliner : public FlowGraphVisitor {
TRACE_INLINING(OS::Print(" Success\n"));
+ // Check that inlining maintains use lists.
+ SLOW_ASSERT(caller_graph_->ValidateUseLists());
+
// Build succeeded so we restore the bailout jump.
inlined_ = true;
isolate->set_long_jump_base(base);
« runtime/platform/assert.h ('K') | « runtime/vm/flow_graph.cc ('k') | tools/slow_assert.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698