Disable EXTRA_CHECKS in Release

This patch causes V8 to disable EXTRA_CHECKS when building in release. You can
still enable the checks in release using a GYP flag.

This patch speeds up Dromeo's dom-traverse by around 4%.

Review URL: https://codereview.chromium.org/11275324
Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d9ba8ed8
...@@ -70,9 +70,6 @@ ...@@ -70,9 +70,6 @@
'v8_enable_disassembler%': 0, 'v8_enable_disassembler%': 0,
# Enable extra checks in API functions and other strategic places.
'v8_enable_extra_checks%': 1,
'v8_enable_gdbjit%': 0, 'v8_enable_gdbjit%': 0,
'v8_object_print%': 0, 'v8_object_print%': 0,
...@@ -114,9 +111,6 @@ ...@@ -114,9 +111,6 @@
['v8_enable_disassembler==1', { ['v8_enable_disassembler==1', {
'defines': ['ENABLE_DISASSEMBLER',], 'defines': ['ENABLE_DISASSEMBLER',],
}], }],
['v8_enable_extra_checks==1', {
'defines': ['ENABLE_EXTRA_CHECKS',],
}],
['v8_enable_gdbjit==1', { ['v8_enable_gdbjit==1', {
'defines': ['ENABLE_GDB_JIT_INTERFACE',], 'defines': ['ENABLE_GDB_JIT_INTERFACE',],
}], }],
...@@ -336,6 +330,9 @@ ...@@ -336,6 +330,9 @@
], # conditions ], # conditions
'configurations': { 'configurations': {
'Debug': { 'Debug': {
'variables': {
'v8_enable_extra_checks%': 1,
},
'defines': [ 'defines': [
'DEBUG', 'DEBUG',
'ENABLE_DISASSEMBLER', 'ENABLE_DISASSEMBLER',
...@@ -360,6 +357,9 @@ ...@@ -360,6 +357,9 @@
}, },
}, },
'conditions': [ 'conditions': [
['v8_enable_extra_checks==1', {
'defines': ['ENABLE_EXTRA_CHECKS',],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
'-Wnon-virtual-dtor', '-Woverloaded-virtual' ], '-Wnon-virtual-dtor', '-Woverloaded-virtual' ],
...@@ -381,7 +381,13 @@ ...@@ -381,7 +381,13 @@
], ],
}, # Debug }, # Debug
'Release': { 'Release': {
'variables': {
'v8_enable_extra_checks%': 0,
},
'conditions': [ 'conditions': [
['v8_enable_extra_checks==1', {
'defines': ['ENABLE_EXTRA_CHECKS',],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
or OS=="android"', { or OS=="android"', {
'cflags!': [ 'cflags!': [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment