summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-24 10:56:04 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-24 10:56:04 +0100
commit526344aa5ee3190b754e3678e0c71b0d7f272876 (patch)
treebc7c7c55b421a5b83ffb036643f0fea751612f04 /Zend/zend_compile.h
parent66d72377d0226521fef6601683054446565bbdc0 (diff)
downloadphp-git-526344aa5ee3190b754e3678e0c71b0d7f272876.tar.gz
Add flag to disable jumptable optimization
This is useful for coverage. While it is currently safe to just skip over the SWITCH_* opcodes, this may not be true in the future due to opcache optimizations, so it's safer to disable emission of SWITCH_* opcodes entirely.
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r--Zend/zend_compile.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index b9345e4384..47430576ec 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -1040,6 +1040,9 @@ END_EXTERN_C()
/* disable builtin special case function calls */
#define ZEND_COMPILE_NO_BUILTINS (1<<10)
+/* disable jumptable optimization for switch statements */
+#define ZEND_COMPILE_NO_JUMPTABLES (1<<11)
+
/* The default value for CG(compiler_options) */
#define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY