mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
58 lines
1.3 KiB
Text
58 lines
1.3 KiB
Text
{%DEFINES%}
|
|
|
|
ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data *execute_data TSRMLS_DC)
|
|
{
|
|
DCL_OPLINE
|
|
zend_bool original_in_execution;
|
|
|
|
{%HELPER_VARS%}
|
|
|
|
{%INTERNAL_LABELS%}
|
|
|
|
original_in_execution = EG(in_execution);
|
|
EG(in_execution) = 1;
|
|
|
|
LOAD_REGS();
|
|
LOAD_OPLINE();
|
|
|
|
while (1) {
|
|
{%ZEND_VM_CONTINUE_LABEL%}
|
|
#ifdef ZEND_WIN32
|
|
if (EG(timed_out)) {
|
|
zend_timeout(0);
|
|
}
|
|
#endif
|
|
|
|
{%ZEND_VM_DISPATCH%} {
|
|
{%INTERNAL_EXECUTOR%}
|
|
}
|
|
|
|
}
|
|
zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
|
|
}
|
|
|
|
ZEND_API void zend_{%EXECUTOR_NAME%}(zend_op_array *op_array, zval *return_value TSRMLS_DC)
|
|
{
|
|
zend_execute_data *execute_data;
|
|
|
|
if (EG(exception) != NULL) {
|
|
return;
|
|
}
|
|
|
|
if (EG(current_execute_data) && EG(current_execute_data)->call) {
|
|
execute_data = EG(current_execute_data)->call;
|
|
} else {
|
|
execute_data = zend_vm_stack_push_call_frame(
|
|
(zend_function*)op_array, 0, 0, EG(called_scope), Z_OBJ(EG(This)), NULL TSRMLS_CC);
|
|
}
|
|
EX(prev_execute_data) = EG(current_execute_data);
|
|
i_init_execute_data(execute_data, op_array, return_value, EG(active_symbol_table) ? VM_FRAME_TOP_CODE : VM_FRAME_TOP_FUNCTION TSRMLS_CC);
|
|
zend_{%EXECUTOR_NAME%}_ex(execute_data TSRMLS_CC);
|
|
}
|
|
|
|
{%EXTERNAL_EXECUTOR%}
|
|
|
|
void {%INITIALIZER_NAME%}(void)
|
|
{
|
|
{%EXTERNAL_LABELS%}
|
|
}
|