Revision: 3747
Author: [email protected]
Date: Fri Jan 29 06:48:14 2010
Log: Enable assertions and debugging code in the release
build in the experimental issue555 branch.

Enable --verify-heap and --debug-code by default
on the branch too.
Review URL: http://codereview.chromium.org/554131
http://code.google.com/p/v8/source/detail?r=3747

Modified:
 /branches/experimental/issue555/SConstruct
 /branches/experimental/issue555/src/SConscript
 /branches/experimental/issue555/src/flag-definitions.h
 /branches/experimental/issue555/src/heap.cc
 /branches/experimental/issue555/src/objects.cc
 /branches/experimental/issue555/tools/gyp/v8.gyp

=======================================
--- /branches/experimental/issue555/SConstruct  Thu Jan 14 07:28:53 2010
+++ /branches/experimental/issue555/SConstruct  Fri Jan 29 06:48:14 2010
@@ -113,7 +113,8 @@
   'gcc': {
     'all': {
       'CCFLAGS':      ['$DIALECTFLAGS', '$WARNINGFLAGS'],
-      'CXXFLAGS':     ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'],
+      'CXXFLAGS':     ['$CCFLAGS', '-fno-rtti', '-fno-exceptions',
+                       '-fno-strict-aliasing'],
     },
     'visibility:hidden': {
       # Use visibility=default to disable this.
@@ -129,9 +130,10 @@
     'mode:release': {
       'CCFLAGS':      ['-O3', '-fomit-frame-pointer', '-fdata-sections',
                        '-ffunction-sections'],
+      'CPPDEFINES':   ['DEBUG'],
       'os:android': {
         'CCFLAGS':    ['-mthumb', '-Os'],
-        'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
+        'CPPDEFINES': ['SK_RELEASE']
       }
     },
     'os:linux': {
@@ -231,6 +233,7 @@
     },
     'mode:release': {
       'CCFLAGS':      ['/O2'],
+      'CPPDEFINES':   ['_DEBUG', 'DEBUG'],
       'LINKFLAGS':    ['/OPT:REF', '/OPT:ICF'],
       'msvcrt:static': {
         'CCFLAGS': ['/MT']
@@ -377,7 +380,7 @@
       'LINKFLAGS':    ANDROID_LINKFLAGS,
       'LIBS':         ['log', 'c', 'stdc++', 'm'],
       'mode:release': {
-        'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
+        'CPPDEFINES': ['SK_RELEASE']
       }
     },
   },
@@ -436,7 +439,7 @@
       'LINKFLAGS':    ANDROID_LINKFLAGS,
       'LIBS':         ['log', 'c', 'stdc++', 'm'],
       'mode:release': {
-        'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
+        'CPPDEFINES': ['SK_RELEASE']
       }
     },
     'arch:ia32': {
=======================================
--- /branches/experimental/issue555/src/SConscript      Wed Dec 16 07:36:05 2009
+++ /branches/experimental/issue555/src/SConscript      Fri Jan 29 06:48:14 2010
@@ -104,6 +104,10 @@
     version.cc
     virtual-frame.cc
     zone.cc
+
+    objects-debug.cc
+    prettyprinter.cc
+    regexp-macro-assembler-tracer.cc
     """),
   'arch:arm': Split("""
     arm/builtins-arm.cc
@@ -171,9 +175,7 @@
   'os:nullos':  ['platform-nullos.cc'],
   'os:win32':   ['platform-win32.cc'],
   'mode:release': [],
-  'mode:debug': [
-    'objects-debug.cc', 'prettyprinter.cc', 'regexp-macro-assembler-tracer.cc'
-  ]
+  'mode:debug': []
 }


=======================================
--- /branches/experimental/issue555/src/flag-definitions.h Mon Jan 25 03:02:06 2010 +++ /branches/experimental/issue555/src/flag-definitions.h Fri Jan 29 06:48:14 2010
@@ -97,7 +97,7 @@
 #define FLAG FLAG_FULL

 // assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc
-DEFINE_bool(debug_code, false,
+DEFINE_bool(debug_code, true,
             "generate extra code (comments, assertions) for debugging")
 DEFINE_bool(emit_branch_hints, false, "emit branch hints")
 DEFINE_bool(push_pop_elimination, true,
@@ -308,7 +308,7 @@
 DEFINE_bool(gc_verbose, false, "print stuff during garbage collection")
DEFINE_bool(heap_stats, false, "report heap statistics before and after GC")
 DEFINE_bool(code_stats, false, "report code statistics after GC")
-DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC")
+DEFINE_bool(verify_heap, true, "verify heap pointers before and after GC")
 DEFINE_bool(print_handles, false, "report handles after GC")
 DEFINE_bool(print_global_handles, false, "report global handles after GC")
 DEFINE_bool(print_rset, false, "print remembered sets before GC")
=======================================
--- /branches/experimental/issue555/src/heap.cc Mon Jan 25 03:02:06 2010
+++ /branches/experimental/issue555/src/heap.cc Fri Jan 29 06:48:14 2010
@@ -3940,8 +3940,9 @@
   void VisitPointers(Object** start, Object** end) {
     // Copy all HeapObject pointers in [start, end)
     for (Object** p = start; p < end; p++) {
-      if ((*p)->IsHeapObject())
+      if ((*p)->IsHeapObject()) {
         UnmarkObjectRecursively(p);
+      }
     }
   }
 };
=======================================
--- /branches/experimental/issue555/src/objects.cc      Thu Jan 28 04:19:48 2010
+++ /branches/experimental/issue555/src/objects.cc      Fri Jan 29 06:48:14 2010
@@ -8326,9 +8326,8 @@
   // trace.
 #if defined(_MSC_VER)
   __asm int 3;
-#else
-  OS::Abort();
 #endif
+  OS::Abort();
 }

 } }  // namespace v8::internal
=======================================
--- /branches/experimental/issue555/tools/gyp/v8.gyp Thu Jan 14 07:28:53 2010 +++ /branches/experimental/issue555/tools/gyp/v8.gyp Fri Jan 29 06:48:14 2010
@@ -77,6 +77,10 @@
         },
       },
       'Release': {
+        'defines': [
+          'DEBUG',
+          '_DEBUG'
+        ],
         'conditions': [
           ['OS=="linux"', {
             'cflags!': [

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

Reply via email to