mirror of
https://github.com/php/php-src.git
synced 2024-12-24 09:18:17 +08:00
249c2323f4
This is disabled by default yet, but may be enabled compiling zend_execute.c with -DHAVE_GCC_GLOBAL_REGS. Only tested on Linux x86 and x86_64 with GCC 4.9.2.
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
{%DEFINES%}
|
|
|
|
ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data *ex)
|
|
{
|
|
DCL_OPLINE
|
|
|
|
{%HELPER_VARS%}
|
|
|
|
{%INTERNAL_LABELS%}
|
|
|
|
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)
|
|
{
|
|
zend_execute_data *execute_data;
|
|
|
|
if (EG(exception) != NULL) {
|
|
return;
|
|
}
|
|
|
|
execute_data = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_CODE,
|
|
(zend_function*)op_array, 0, EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL, EG(current_execute_data) ? Z_OBJ(EG(current_execute_data)->This) : NULL, NULL);
|
|
if (EG(current_execute_data)) {
|
|
execute_data->symbol_table = zend_rebuild_symbol_table();
|
|
} else {
|
|
execute_data->symbol_table = &EG(symbol_table);
|
|
}
|
|
EX(prev_execute_data) = EG(current_execute_data);
|
|
i_init_execute_data(execute_data, op_array, return_value);
|
|
zend_{%EXECUTOR_NAME%}_ex(execute_data);
|
|
}
|
|
|
|
{%EXTERNAL_EXECUTOR%}
|
|
|
|
void {%INITIALIZER_NAME%}(void)
|
|
{
|
|
{%EXTERNAL_LABELS%}
|
|
}
|