summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-24 10:58:24 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-24 10:58:24 +0100
commit1d984cc707fed6f23224a5f72c0e8e5a0cc9fc24 (patch)
tree11da27c7f88b4d76cbf0a3447d6923972f638373 /Zend/zend_compile.c
parent04723f21017c6ecd4c8d449d2801c2c79c7ecabd (diff)
parente0f97ae7ec89bdfef163e4b76b895ffab84dedba (diff)
downloadphp-git-1d984cc707fed6f23224a5f72c0e8e5a0cc9fc24.tar.gz
Merge branch 'PHP-7.3'
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index a6fe6954b7..ebefacf523 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4732,6 +4732,10 @@ static zend_uchar determine_switch_jumptable_type(zend_ast_list *cases) {
}
static zend_bool should_use_jumptable(zend_ast_list *cases, zend_uchar jumptable_type) {
+ if (CG(compiler_options) & ZEND_COMPILE_NO_JUMPTABLES) {
+ return 0;
+ }
+
/* Thresholds are chosen based on when the average switch time for equidistributed
* input becomes smaller when using the jumptable optimization. */
if (jumptable_type == IS_LONG) {