diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2016-04-20 11:06:52 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2016-04-20 11:06:52 +0300 |
| commit | f4848014837f8c1d577cc5b0d5d29f658b42369f (patch) | |
| tree | f4f59b4f86c0425a0d1165ec46657c34a0eb3539 /Zend/zend_execute.c | |
| parent | 538d4524527bd429364de0b6212029de14e6c9ef (diff) | |
| download | php-git-f4848014837f8c1d577cc5b0d5d29f658b42369f.tar.gz | |
Reduced amount of code generated for interrupt handling.
Improved ZEND_VM_INTERRUPT_CHECK() placement (always perform checks after opcode handler completion, when instruction pointer value is alredy changed to the next opcode).
Diffstat (limited to 'Zend/zend_execute.c')
| -rw-r--r-- | Zend/zend_execute.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index f14434bff9..6ba72b324e 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2101,9 +2101,15 @@ void zend_free_compiled_variables(zend_execute_data *execute_data) /* {{{ */ /* }}} */ #ifdef ZEND_WIN32 +static zend_never_inline ZEND_COLD ZEND_NORETURN void ZEND_FASTCALL zend_interrupt(void) /* {{{ */ +{ + zend_timeout(0); +} +/* }}} */ + # define ZEND_VM_INTERRUPT_CHECK() do { \ - if (EG(timed_out)) { \ - zend_timeout(0); \ + if (UNEXPECTED(EG(timed_out))) { \ + zend_interrupt(); \ } \ } while (0) #else @@ -2198,7 +2204,6 @@ static zend_always_inline void i_init_func_execute_data(zend_execute_data *execu EX_LOAD_LITERALS(op_array); EG(current_execute_data) = execute_data; - ZEND_VM_INTERRUPT_CHECK(); } /* }}} */ @@ -2235,7 +2240,6 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu EX_LOAD_LITERALS(op_array); EG(current_execute_data) = execute_data; - ZEND_VM_INTERRUPT_CHECK(); } /* }}} */ @@ -2326,7 +2330,6 @@ static zend_always_inline void i_init_execute_data(zend_execute_data *execute_da EX_LOAD_LITERALS(op_array); EG(current_execute_data) = execute_data; - ZEND_VM_INTERRUPT_CHECK(); } /* }}} */ |
