Reviewers: Kevin Millikin,

Description:
Put a slow assert under the enable_slow_asserts flag.

Otherwise really large functions take too long to compile
in debug mode.

Please review this at http://codereview.chromium.org/9212040/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/full-codegen.cc


Index: src/full-codegen.cc
===================================================================
--- src/full-codegen.cc (revision 10479)
+++ src/full-codegen.cc (working copy)
@@ -370,12 +370,14 @@
       StateField::encode(state) | PcField::encode(masm_->pc_offset());
   BailoutEntry entry = { id, pc_and_state };
 #ifdef DEBUG
-  // 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();
+  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


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to