From 31c3b0c7cc38453763e8f8d33baa214de906d60f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 8 Oct 2019 17:08:59 +0300 Subject: [PATCH] Fixed Zend/tests/bug70785.phpt on builds wothout global regesters --- Zend/zend_execute.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a860c08560..14e52b390c 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4253,7 +4253,9 @@ static zend_never_inline int ZEND_FASTCALL zend_quick_check_constant( OPLINE = opline; \ ZEND_VM_CONTINUE() #define ZEND_VM_SMART_BRANCH(_result, _check) do { \ - if (EXPECTED((opline+1)->opcode == ZEND_JMPZ)) { \ + if ((_check) && UNEXPECTED(EG(exception))) { \ + OPLINE = EX(opline); \ + } else if (EXPECTED((opline+1)->opcode == ZEND_JMPZ)) { \ if (_result) { \ ZEND_VM_SET_NEXT_OPCODE(opline + 2); \ } else { \ @@ -4269,9 +4271,6 @@ static zend_never_inline int ZEND_FASTCALL zend_quick_check_constant( ZVAL_BOOL(EX_VAR(opline->result.var), _result); \ ZEND_VM_SET_NEXT_OPCODE(opline + 1); \ } \ - if ((_check) && UNEXPECTED(EG(exception))) { \ - OPLINE = EX(opline); \ - } \ ZEND_VM_CONTINUE(); \ } while (0) #define ZEND_VM_SMART_BRANCH_JMPZ(_result, _check) do { \ -- 2.50.1