Lines Matching refs:f

551 function out($f, $s) {  argument
554 fputs($f,$s);
559 function out_line($f) { argument
562 fputs($f,"#line ".($line_no+1)." \"".$executor_file."\"\n");
688 function gen_code($f, $spec, $kind, $code, $op1, $op2, $name, $extra_spec=null) { argument
918 out($f, $code);
986 function gen_handler($f, $spec, $kind, $name, $op1, $op2, $use, $code, $lineno, $opcode, $extra_spe… argument
1045 out($f, "#line $lineno \"$definition_file\"\n");
1078 out($f, $code);
1084 …out($f,"static zend_always_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL {$spec_name}_INLINE_HANDLE…
1087 …out($f,"static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL {$spec_name}_HANDLER(ZEND_OPCODE_…
1090 …out($f,"static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL {$spec_name}_HANDLER(ZEND_OPCODE…
1092 …out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL {$spec_name}_HANDLER(ZEND_OPCODE_HANDLER_ARGS…
1098 out($f,"case $cur: /* $spec_name */");
1101 out($f,"case ".$name.":");
1105 out($f," {$spec_name}_LABEL: ZEND_ATTRIBUTE_UNUSED_LABEL\n");
1107 out($f,"\n");
1111 out($f,"{$spec_name}_LABEL: ZEND_VM_GUARD($spec_name);\n");
1116 gen_code($f, $spec, $kind, $code, $op1, $op2, $name, $extra_spec);
1119 …out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL {$spec_name}_HANDLER(ZEND_OPCODE_HANDLER_ARGS…
1120 out($f,"{\n");
1121 … out($f,"\tZEND_VM_TAIL_CALL({$spec_name}_INLINE_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));\n");
1122 out($f,"}\n");
1123 out($f,"\n");
1128 function gen_helper($f, $spec, $kind, $name, $op1, $op2, $param, $code, $lineno, $inline, $cold = f… argument
1140 out($f, "#line $lineno \"$definition_file\"\n");
1148 out($f, $spec_name . "_LABEL:\n");
1164 …out($f, "static$zend_attributes ZEND_OPCODE_HANDLER_RET$zend_fastcall $spec_name(ZEND_OPCODE_HANDL…
1167 …out($f, "static$zend_attributes ZEND_OPCODE_HANDLER_RET$zend_fastcall $spec_name($param ZEND_OPCOD…
1171 out($f, "$spec_name:\n");
1174 out($f, "$spec_name:\n");
1179 gen_code($f, $spec, $kind, $code, $op1, $op2, $name, $extra_spec);
1183 function gen_null_label($f, $kind, $prolog) { argument
1186 out($f,$prolog."ZEND_NULL_HANDLER,\n");
1189 out($f,$prolog."(void*)(uintptr_t)-1,\n");
1192 out($f,$prolog."(void*)&&ZEND_NULL_LABEL,\n");
1198 function gen_labels($f, $spec, $kind, $prolog, &$specs, $switch_labels = array()) { argument
1341 …$generate = function ($op1, $op2, $extra_spec = array()) use ($f, $kind, $dsc, $prefix, $prolog, $…
1350 gen_null_label($f, $kind, $prolog);
1388 out($f,"$prolog{$spec_name}_HANDLER,\n");
1391 out($f,$prolog."(void*)(uintptr_t)$switch_labels[$spec_name],\n");
1394 out($f,$prolog."(void*)&&{$spec_name}_LABEL,\n");
1401 gen_null_label($f, $kind, $prolog);
1436 out($f,$prolog."ZEND_NULL_HANDLER,\n");
1439 out($f,$prolog."(void*)(uintptr_t)-1,\n");
1442 out($f,$prolog."(void*)&&ZEND_NULL_LABEL,\n");
1456 out($f,$prolog.$dsc['alias']."_HANDLER,\n");
1459 out($f,$prolog."(void*)&&".$dsc['alias']."_LABEL,\n");
1467 out($f,$prolog.$dsc["op"]."_HANDLER,\n");
1470 out($f,$prolog."(void*)(uintptr_t)".((string)$num).",\n");
1473 out($f,$prolog."(void*)&&".$dsc["op"]."_LABEL,\n");
1480 out($f,$prolog."ZEND_NULL_HANDLER,\n");
1483 out($f,$prolog."(void*)(uintptr_t)-1,\n");
1486 out($f,$prolog."(void*)&&ZEND_NULL_LABEL,\n");
1497 out($f,$prolog."ZEND_NULL_HANDLER\n");
1500 out($f,$prolog."(void*)(uintptr_t)-1\n");
1503 out($f,$prolog."(void*)&&ZEND_NULL_LABEL\n");
1520 function gen_specs($f, $prolog, $specs) { argument
1525 out($f, "$prolog$lastdef,\n");
1528 out($f, "$prolog$def,\n");
1531 out($f, "$prolog$lastdef,\n");
1536 function gen_null_handler($f) { argument
1543 …out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)\n…
1544 out($f,"{\n");
1545 out($f,"\tUSE_OPLINE\n");
1546 out($f,"\n");
1547 out($f,"\tSAVE_OPLINE();\n");
1548 …out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_t…
1549 out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
1550 out($f,"}\n\n");
1635 $f = function($specs) use (&$f) {
1639 $next = $f($specs);
1651 return $f($specs);
1655 $f = fopen($fn, "r");
1656 if (!is_resource($f)) {
1660 while (!feof($f)) {
1661 $op = trim(fgets($f));
1666 fclose($f);
1671 function gen_executor_code($f, $spec, $kind, $prolog, &$switch_labels = array()) { argument
1691 …gen_handler($f, 1, $kind, $opcodes[$num]["op"], $op1, $op2, isset($opcodes[$num]["use"]), $opcodes…
1701 …gen_helper($f, 1, $kind, $num, $op1, $op2, $helpers[$num]["param"], $helpers[$num]["code"], $linen…
1720 …gen_handler($f, 0, $kind, $opcodes[$num]["op"], "ANY", "ANY", isset($opcodes[$num]["use"]), $opcod…
1725 …gen_helper($f, 0, $kind, $num, "ANY", "ANY", $helpers[$num]["param"], $helpers[$num]["code"], $lin…
1736 out($f, $txt);
1743 out_line($f);
1749 gen_null_handler($f);
1752 out($f,"default: ZEND_NULL_LABEL:\n");
1753 …out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_t…
1754 out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
1757 out($f,"ZEND_NULL_LABEL:\n");
1758 …out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_t…
1759 out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
1762 out($f,"\t\t\tHYBRID_CASE(HYBRID_HALT):\n");
1763 out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
1764 out($f,"\t\t\t\texecute_data = vm_stack_data.orig_execute_data;\n");
1765 out($f,"#endif\n");
1766 out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
1767 out($f,"\t\t\t\topline = vm_stack_data.orig_opline;\n");
1768 out($f,"#endif\n");
1769 out($f,"\t\t\t\treturn;\n");
1770 out($f,"\t\t\tHYBRID_DEFAULT:\n");
1771 out($f,"\t\t\t\tVM_TRACE(ZEND_NULL)\n");
1772 out($f,"\t\t\t\tZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
1773 out($f,"\t\t\t\tVM_TRACE_OP_END(ZEND_NULL)\n");
1774 out($f,"\t\t\t\tHYBRID_BREAK(); /* Never reached */\n");
1779 function skip_blanks($f, $prolog, $epilog) { argument
1781 out($f, $prolog.$epilog);
1786 function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name) { argument
1803 out($f,"#define SPEC_START_MASK 0x0000ffff\n");
1804 out($f,"#define SPEC_EXTRA_MASK 0xfffc0000\n");
1805 out($f,"#define SPEC_RULE_OP1 0x00010000\n");
1806 out($f,"#define SPEC_RULE_OP2 0x00020000\n");
1807 out($f,"#define SPEC_RULE_OP_DATA 0x00040000\n");
1808 out($f,"#define SPEC_RULE_RETVAL 0x00080000\n");
1809 out($f,"#define SPEC_RULE_QUICK_ARG 0x00100000\n");
1810 out($f,"#define SPEC_RULE_SMART_BRANCH 0x00200000\n");
1811 out($f,"#define SPEC_RULE_COMMUTATIVE 0x00800000\n");
1812 out($f,"#define SPEC_RULE_ISSET 0x01000000\n");
1813 out($f,"#define SPEC_RULE_OBSERVER 0x02000000\n");
1814 out($f,"\n");
1815 out($f,"static const uint32_t *zend_spec_handlers;\n");
1816 out($f,"static const void * const *zend_opcode_handlers;\n");
1817 out($f,"static int zend_handlers_count;\n");
1819 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
1820 out($f,"static const void * const * zend_opcode_handler_funcs;\n");
1821 out($f,"static zend_op hybrid_halt_op;\n");
1822 out($f,"#endif\n");
1824 out($f,"#if (ZEND_VM_KIND != ZEND_VM_KIND_HYBRID) || !ZEND_VM_SPEC\n");
1825 … out($f,"static const void *zend_vm_get_opcode_handler(uint8_t opcode, const zend_op* op);\n");
1826 out($f,"#endif\n\n");
1828 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
1829 …out($f,"static const void *zend_vm_get_opcode_handler_func(uint8_t opcode, const zend_op* op);\n");
1830 out($f,"#else\n");
1831 … out($f,"# define zend_vm_get_opcode_handler_func zend_vm_get_opcode_handler\n");
1832 out($f,"#endif\n\n");
1834 out($f,"#ifndef VM_TRACE\n");
1836 out($f,"# define VM_TRACE(op) ZEND_VM_GUARD(op);\n");
1838 out($f,"# define VM_TRACE(op)\n");
1840 out($f,"#endif\n");
1841 out($f,"#ifndef VM_TRACE_OP_END\n");
1842 out($f,"# define VM_TRACE_OP_END(op)\n");
1843 out($f,"#endif\n");
1844 out($f,"#ifndef VM_TRACE_START\n");
1845 out($f,"# define VM_TRACE_START()\n");
1846 out($f,"#endif\n");
1847 out($f,"#ifndef VM_TRACE_END\n");
1848 out($f,"# define VM_TRACE_END()\n");
1849 out($f,"#endif\n");
1852 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
1853 out($f,"# if defined(__GNUC__) && defined(__i386__)\n");
1854 … out($f,"# define HYBRID_JIT_GUARD() __asm__ __volatile__ (\"\"::: \"ebx\")\n");
1855 out($f,"# elif defined(__GNUC__) && defined(__x86_64__)\n");
1856 … out($f,"# define HYBRID_JIT_GUARD() __asm__ __volatile__ (\"\"::: \"rbx\",\"r12\",\"r13\")\n");
1857 out($f,"# elif defined(__GNUC__) && defined(__aarch64__)\n");
1858 …out($f,"# define HYBRID_JIT_GUARD() __asm__ __volatile__ (\"\"::: \"x19\",\"x20\",\"x21\",\"x22\"…
1859 out($f,"# else\n");
1860 out($f,"# define HYBRID_JIT_GUARD()\n");
1861 out($f,"# endif\n");
1862 … out($f,"#define HYBRID_NEXT() HYBRID_JIT_GUARD(); goto *(void**)(OPLINE->handler)\n");
1863 out($f,"#define HYBRID_SWITCH() HYBRID_NEXT();\n");
1864 out($f,"#define HYBRID_CASE(op) op ## _LABEL\n");
1865 out($f,"#define HYBRID_BREAK() HYBRID_NEXT()\n");
1866 out($f,"#define HYBRID_DEFAULT ZEND_NULL_LABEL\n");
1867 out($f,"#endif\n");
1869 out($f,"\n");
1870 out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
1871 out($f,"# define ZEND_OPCODE_HANDLER_ARGS void\n");
1872 out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU\n");
1873 out($f,"# define ZEND_OPCODE_HANDLER_ARGS_DC\n");
1874 out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC\n");
1875 out($f,"#else\n");
1876 … out($f,"# define ZEND_OPCODE_HANDLER_ARGS zend_execute_data *execute_data\n");
1877 out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU execute_data\n");
1878 … out($f,"# define ZEND_OPCODE_HANDLER_ARGS_DC , ZEND_OPCODE_HANDLER_ARGS\n");
1879 … out($f,"# define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC , ZEND_OPCODE_HANDLER_ARGS_PASSTHRU\n");
1880 out($f,"#endif\n");
1881 out($f,"\n");
1882 … out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
1883 out($f,"# define ZEND_OPCODE_HANDLER_RET void\n");
1884 out($f,"# define ZEND_VM_TAIL_CALL(call) call; return\n");
1885 out($f,"# ifdef ZEND_VM_TAIL_CALL_DISPATCH\n");
1886 …out($f,"# define ZEND_VM_CONTINUE() ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_A…
1887 out($f,"# else\n");
1888 out($f,"# define ZEND_VM_CONTINUE() return\n");
1889 out($f,"# endif\n");
1891 out($f,"# if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
1892 … out($f,"# define ZEND_VM_RETURN() opline = &hybrid_halt_op; return\n");
1893 … out($f,"# define ZEND_VM_HOT zend_always_inline ZEND_COLD ZEND_OPT_SIZE\n");
1894 … out($f,"# define ZEND_VM_COLD ZEND_COLD ZEND_OPT_SIZE\n");
1895 out($f,"# else\n");
1896 out($f,"# define ZEND_VM_RETURN() opline = NULL; return\n");
1897 out($f,"# define ZEND_VM_HOT\n");
1898 … out($f,"# define ZEND_VM_COLD ZEND_COLD ZEND_OPT_SIZE\n");
1899 out($f,"# endif\n");
1901 out($f,"# define ZEND_VM_RETURN() opline = NULL; return\n");
1902 … out($f,"# define ZEND_VM_COLD ZEND_COLD ZEND_OPT_SIZE\n");
1904 out($f,"#else\n");
1905 out($f,"# define ZEND_OPCODE_HANDLER_RET int\n");
1906 out($f,"# define ZEND_VM_TAIL_CALL(call) return call\n");
1907 out($f,"# define ZEND_VM_CONTINUE() return 0\n");
1908 out($f,"# define ZEND_VM_RETURN() return -1\n");
1910 out($f,"# define ZEND_VM_HOT\n");
1912 out($f,"# define ZEND_VM_COLD ZEND_COLD ZEND_OPT_SIZE\n");
1913 out($f,"#endif\n");
1914 out($f,"\n");
1915 …out($f,"typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_HANDLER_ARG…
1916 out($f,"\n");
1917 out($f,"#define DCL_OPLINE\n");
1918 out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
1919 out($f,"# define OPLINE opline\n");
1920 out($f,"# define USE_OPLINE\n");
1921 out($f,"# define LOAD_OPLINE() opline = EX(opline)\n");
1922 out($f,"# define LOAD_OPLINE_EX()\n");
1923 out($f,"# define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
1924 out($f,"# define SAVE_OPLINE() EX(opline) = opline\n");
1925 out($f,"# define SAVE_OPLINE_EX() SAVE_OPLINE()\n");
1926 out($f,"#else\n");
1927 out($f,"# define OPLINE EX(opline)\n");
1928 out($f,"# define USE_OPLINE const zend_op *opline = EX(opline);\n");
1929 out($f,"# define LOAD_OPLINE()\n");
1930 out($f,"# define LOAD_OPLINE_EX()\n");
1931 out($f,"# define LOAD_NEXT_OPLINE() ZEND_VM_INC_OPCODE()\n");
1932 out($f,"# define SAVE_OPLINE()\n");
1933 out($f,"# define SAVE_OPLINE_EX()\n");
1934 out($f,"#endif\n");
1935 …out($f,"#define HANDLE_EXCEPTION() ZEND_ASSERT(EG(exception)); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n…
1936 …out($f,"#define HANDLE_EXCEPTION_LEAVE() ZEND_ASSERT(EG(exception)); LOAD_OPLINE(); ZEND_VM_LEAVE(…
1937 out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG)\n");
1938 … out($f,"# define ZEND_VM_ENTER_EX() ZEND_VM_INTERRUPT_CHECK(); ZEND_VM_CONTINUE()\n");
1939 …out($f,"# define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE();…
1940 out($f,"# define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
1941 out($f,"#elif defined(ZEND_VM_IP_GLOBAL_REG)\n");
1942 out($f,"# define ZEND_VM_ENTER_EX() return 1\n");
1943 …out($f,"# define ZEND_VM_ENTER() opline = EG(current_execute_data)->opline; ZEND_VM_ENTE…
1944 out($f,"# define ZEND_VM_LEAVE() return 2\n");
1945 out($f,"#else\n");
1946 out($f,"# define ZEND_VM_ENTER_EX() return 1\n");
1947 out($f,"# define ZEND_VM_ENTER() return 1\n");
1948 out($f,"# define ZEND_VM_LEAVE() return 2\n");
1949 out($f,"#endif\n");
1950 …out($f,"#define ZEND_VM_INTERRUPT() ZEND_VM_TAIL_CALL(zend_interrupt_helper".($spec?"_SPEC":"…
1951 …out($f,"#define ZEND_VM_LOOP_INTERRUPT() zend_interrupt_helper".($spec?"_SPEC":"")."(ZEND_OPCODE_H…
1953 …out($f,"#define ZEND_VM_DISPATCH(opcode, opline) ZEND_VM_TAIL_CALL(((opcode_handler_t)zend_vm_get_…
1955 …out($f,"#define ZEND_VM_DISPATCH(opcode, opline) ZEND_VM_TAIL_CALL(((opcode_handler_t)zend_vm_get_…
1957 out($f,"\n");
1958 …out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_interrupt_helper".($spec?"_SPEC":"")."(Z…
1959 …out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS);\…
1960 out($f,"\n");
1963 out($f,"\n");
1964 out($f,"#define OPLINE opline\n");
1965 out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
1966 … out($f,"# define DCL_OPLINE register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
1967 out($f,"#else\n");
1968 out($f,"# define DCL_OPLINE const zend_op *opline;\n");
1969 out($f,"#endif\n");
1970 out($f,"#define USE_OPLINE\n");
1971 out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
1972 out($f,"# define LOAD_OPLINE_EX() LOAD_OPLINE()\n");
1973 out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
1974 out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
1975 out($f,"#define SAVE_OPLINE_EX()\n");
1976 …out($f,"#define HANDLE_EXCEPTION() ZEND_ASSERT(EG(exception)); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n…
1977 …out($f,"#define HANDLE_EXCEPTION_LEAVE() ZEND_ASSERT(EG(exception)); LOAD_OPLINE(); ZEND_VM_LEAVE(…
1978 out($f,"#define ZEND_VM_CONTINUE() goto zend_vm_continue\n");
1979 out($f,"#define ZEND_VM_RETURN() return\n");
1980 … out($f,"#define ZEND_VM_ENTER_EX() ZEND_VM_INTERRUPT_CHECK(); ZEND_VM_CONTINUE()\n");
1981 …out($f,"#define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM…
1982 out($f,"#define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
1983 …out($f,"#define ZEND_VM_INTERRUPT() goto zend_interrupt_helper".($spec?"_SPEC":"").";…
1984 …out($f,"#define ZEND_VM_LOOP_INTERRUPT() goto zend_interrupt_helper".($spec?"_SPEC":"").";…
1985 …out($f,"#define ZEND_VM_DISPATCH(opcode, opline) dispatch_handler = zend_vm_get_opcode_handler(opc…
1986 out($f,"\n");
1989 out($f,"\n");
1990 out($f,"#define OPLINE opline\n");
1991 out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
1992 … out($f,"# define DCL_OPLINE register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
1993 out($f,"#else\n");
1994 out($f,"# define DCL_OPLINE const zend_op *opline;\n");
1995 out($f,"#endif\n");
1996 out($f,"#define USE_OPLINE\n");
1997 out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
1998 out($f,"#define LOAD_OPLINE_EX() LOAD_OPLINE()\n");
1999 out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
2000 out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
2001 out($f,"#define SAVE_OPLINE_EX()\n");
2003 …out($f,"#define HANDLE_EXCEPTION() ZEND_ASSERT(EG(exception)); goto ZEND_HANDLE_EXCEPTION_SPEC_LAB…
2004 …out($f,"#define HANDLE_EXCEPTION_LEAVE() ZEND_ASSERT(EG(exception)); goto ZEND_HANDLE_EXCEPTION_SP…
2006 …out($f,"#define HANDLE_EXCEPTION() ZEND_ASSERT(EG(exception)); goto ZEND_HANDLE_EXCEPTION_LABEL\n"…
2007 …out($f,"#define HANDLE_EXCEPTION_LEAVE() ZEND_ASSERT(EG(exception)); goto ZEND_HANDLE_EXCEPTION_LA…
2009 out($f,"#define ZEND_VM_CONTINUE() goto *(void**)(OPLINE->handler)\n");
2010 out($f,"#define ZEND_VM_RETURN() return\n");
2011 … out($f,"#define ZEND_VM_ENTER_EX() ZEND_VM_INTERRUPT_CHECK(); ZEND_VM_CONTINUE()\n");
2012 …out($f,"#define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM…
2013 out($f,"#define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
2014 …out($f,"#define ZEND_VM_INTERRUPT() goto zend_interrupt_helper".($spec?"_SPEC":"").";…
2015 …out($f,"#define ZEND_VM_LOOP_INTERRUPT() goto zend_interrupt_helper".($spec?"_SPEC":"").";…
2016 …out($f,"#define ZEND_VM_DISPATCH(opcode, opline) goto *(void**)(zend_vm_get_opcode_handler(opcode,…
2017 out($f,"\n");
2021 gen_executor_code($f, $spec, ZEND_VM_KIND_CALL, $m[1]);
2022 out($f,"\n");
2023 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2024 out($f,"# undef ZEND_VM_TAIL_CALL\n");
2025 out($f,"# undef ZEND_VM_CONTINUE\n");
2026 out($f,"# undef ZEND_VM_RETURN\n");
2028 out($f,"\n");
2029 out($f,"# define ZEND_VM_TAIL_CALL(call) call; ZEND_VM_CONTINUE()\n");
2030 out($f,"# define ZEND_VM_CONTINUE() HYBRID_NEXT()\n");
2031 out($f,"# define ZEND_VM_RETURN() goto HYBRID_HALT_LABEL\n");
2033 out($f,"#endif\n\n");
2037 out($f, $m[1].$executor_name.$m[3]."\n");
2041 out($f,$m[1]."const void *dispatch_handler;\n");
2045 out($f, "#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2049 out($f,$m[1].$param.";\n");
2052 out($f, "#endif\n");
2056 out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
2057 … out($f,$m[1]."register zend_execute_data *execute_data __asm__(ZEND_VM_FP_GLOBAL_REG) = ex;\n");
2058 out($f,"#else\n");
2059 out($f,$m[1]."zend_execute_data *execute_data = ex;\n");
2060 out($f,"#endif\n");
2062 … out($f,"#if defined(ZEND_VM_IP_GLOBAL_REG) || defined(ZEND_VM_FP_GLOBAL_REG)\n");
2063 out($f,$m[1]."struct {\n");
2064 out($f,"#ifdef ZEND_VM_HYBRID_JIT_RED_ZONE_SIZE\n");
2065 … out($f,$m[1]."\tchar hybrid_jit_red_zone[ZEND_VM_HYBRID_JIT_RED_ZONE_SIZE];\n");
2066 out($f,"#endif\n");
2067 out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
2068 out($f,$m[1]."\tconst zend_op *orig_opline;\n");
2069 out($f,"#endif\n");
2070 out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
2071 out($f,$m[1]."\tzend_execute_data *orig_execute_data;\n");
2072 out($f,"#endif\n");
2073 out($f,$m[1]."} vm_stack_data;\n");
2074 out($f,"#endif\n");
2075 out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
2076 out($f,$m[1]."vm_stack_data.orig_opline = opline;\n");
2077 out($f,"#endif\n");
2078 out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
2079 out($f,$m[1]."vm_stack_data.orig_execute_data = execute_data;\n");
2080 out($f,$m[1]."execute_data = ex;\n");
2081 out($f,"#else\n");
2082 out($f,$m[1]."zend_execute_data *execute_data = ex;\n");
2083 out($f,"#endif\n");
2091 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2094 out($f,$prolog."if (UNEXPECTED(execute_data == NULL)) {\n");
2095 out($f,$prolog."\tstatic const void * const labels[] = {\n");
2096 …gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_GOTO : $kind, $prolog."\t\t", …
2097 out($f,$prolog."\t};\n");
2098 out($f,$prolog."\tzend_opcode_handlers = (const void **) labels;\n");
2099 out($f,$prolog."\tzend_handlers_count = sizeof(labels) / sizeof(void*);\n");
2101 … out($f,$prolog."\tmemset(&hybrid_halt_op, 0, sizeof(hybrid_halt_op));\n");
2102 … out($f,$prolog."\thybrid_halt_op.handler = (void*)&&HYBRID_HALT_LABEL;\n");
2103 out($f,"#ifdef ZEND_VM_HYBRID_JIT_RED_ZONE_SIZE\n");
2104 …out($f,$prolog."\tmemset(vm_stack_data.hybrid_jit_red_zone, 0, ZEND_VM_HYBRID_JIT_RED_ZONE_SIZE);\…
2105 out($f,"#endif\n");
2106 out($f,$prolog."\tif (zend_touch_vm_stack_data) {\n");
2107 out($f,$prolog."\t\tzend_touch_vm_stack_data(&vm_stack_data);\n");
2108 out($f,$prolog."\t}\n");
2109 out($f,$prolog."\tgoto HYBRID_HALT_LABEL;\n");
2111 out($f,$prolog."\treturn;\n");
2113 out($f,$prolog."}\n");
2115 out($f,"#endif\n");
2118 skip_blanks($f, $m[1], $m[3]);
2124 … out($f,"#if !defined(ZEND_VM_FP_GLOBAL_REG) || !defined(ZEND_VM_IP_GLOBAL_REG)\n");
2125 out($f,$m[1]."\tint ret;".$m[3]."\n");
2126 out($f,"#endif\n");
2129 out($f,"zend_vm_continue:".$m[3]."\n");
2131 skip_blanks($f, $m[1], $m[3]);
2138 …out($f, $m[1]."dispatch_handler = OPLINE->handler;\nzend_vm_dispatch:\n".$m[1]."switch ((int)(uint…
2141 out($f, $m[1]."goto *(void**)(OPLINE->handler);".$m[3]."\n");
2144 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2145 out($f, $m[1]."HYBRID_SWITCH()".$m[3]."\n");
2146 out($f,"#else\n");
2148 … out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
2149 … out($f, $m[1]."((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
2150 out($f, $m[1]."if (UNEXPECTED(!OPLINE))".$m[3]."\n");
2151 out($f,"#else\n");
2152 …out($f, $m[1]."if (UNEXPECTED((ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_…
2153 out($f,"#endif\n");
2155 out($f,"#endif\n");
2164 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2166 gen_executor_code($f, $spec, $kind, $m[1], $switch_labels);
2171 out($f,"#else\n");
2173 out($f,
2192 out($f,"#endif\n");
2198 gen_executor_code($f, $spec, $kind, $m[1]);
2202 out($f, $m[1].$initializer_name.$m[3]."\n");
2210 out($f,$prolog."static const uint32_t specs[] = {\n");
2211 gen_specs($f, $prolog."\t", $specs);
2212 out($f,$prolog."};\n");
2213 out($f,$prolog."zend_spec_handlers = specs;\n");
2214 out($f,$prolog.$executor_name."_ex(NULL);\n");
2216 out($f,$prolog."static const void * const labels[] = {\n");
2217 …gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_CALL : $kind, $prolog."\t", $s…
2218 out($f,$prolog."};\n");
2219 out($f,$prolog."static const uint32_t specs[] = {\n");
2220 gen_specs($f, $prolog."\t", $specs);
2221 out($f,$prolog."};\n");
2223 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2224 out($f,$prolog."zend_opcode_handler_funcs = labels;\n");
2225 out($f,$prolog."zend_spec_handlers = specs;\n");
2226 out($f,$prolog.$executor_name."_ex(NULL);\n");
2227 out($f,"#else\n");
2229 out($f,$prolog."zend_opcode_handlers = labels;\n");
2230 out($f,$prolog."zend_handlers_count = sizeof(labels) / sizeof(void*);\n");
2231 out($f,$prolog."zend_spec_handlers = specs;\n");
2233 out($f,"#endif\n");
2242 out($f, $line);
2661 …$f = fopen(__DIR__ . "/zend_vm_opcodes.c", "w+") or die("ERROR: Cannot create zend_vm_opcodes.c\n"…
2664 out($f, HEADER_TEXT);
2665 fputs($f,"#include <stdio.h>\n");
2666 fputs($f,"#include <zend.h>\n");
2667 fputs($f,"#include <zend_vm_opcodes.h>\n\n");
2669 fputs($f,"static const char *zend_vm_opcodes_names[".($max_opcode + 1)."] = {\n");
2671 fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n");
2673 fputs($f, "};\n\n");
2675 fputs($f,"static uint32_t zend_vm_opcodes_flags[".($max_opcode + 1)."] = {\n");
2677 fprintf($f, "\t0x%08x,\n", isset($opcodes[$i]["flags"]) ? $opcodes[$i]["flags"] : 0);
2679 fputs($f, "};\n\n");
2681 fputs($f, "ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(uint8_t opcode) {\n");
2682 fputs($f, "\tif (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) {\n");
2683 fputs($f, "\t\treturn NULL;\n");
2684 fputs($f, "\t}\n");
2685 fputs($f, "\treturn zend_vm_opcodes_names[opcode];\n");
2686 fputs($f, "}\n");
2688 fputs($f, "ZEND_API uint32_t ZEND_FASTCALL zend_get_opcode_flags(uint8_t opcode) {\n");
2689 fputs($f, "\tif (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) {\n");
2690 fputs($f, "\t\topcode = ZEND_NOP;\n");
2691 fputs($f, "\t}\n");
2692 fputs($f, "\treturn zend_vm_opcodes_flags[opcode];\n");
2693 fputs($f, "}\n");
2695 fputs($f, "ZEND_API uint8_t zend_get_opcode_id(const char *name, size_t length) {\n");
2696 fputs($f, "\tuint8_t opcode;\n");
2697 …fputs($f, "\tfor (opcode = 0; opcode < (sizeof(zend_vm_opcodes_names) / sizeof(zend_vm_opcodes_nam…
2698 fputs($f, "\t\tconst char *opcode_name = zend_vm_opcodes_names[opcode];\n");
2699 fputs($f, "\t\tif (opcode_name && strncmp(opcode_name, name, length) == 0) {\n");
2700 fputs($f, "\t\t\treturn opcode;\n");
2701 fputs($f, "\t\t}\n");
2702 fputs($f, "\t}\n");
2703 fputs($f, "\treturn ZEND_VM_LAST_OPCODE + 1;\n");
2704 fputs($f, "}\n");
2706 fclose($f);
2710 …$f = fopen(__DIR__ . "/zend_vm_execute.h", "w+") or die("ERROR: Cannot create zend_vm_execute.h\n"…
2714 out($f, HEADER_TEXT);
2716 out($f, "#ifdef ZEND_WIN32\n");
2718 out($f, "# pragma warning(disable : 4101)\n");
2721 out($f, "# pragma warning(once : 6235)\n");
2723 out($f, "# pragma warning(once : 6237)\n");
2725 out($f, "# pragma warning(once : 6239)\n");
2727 out($f, "# pragma warning(once : 6240)\n");
2729 out($f, "# pragma warning(once : 6285)\n");
2731 out($f, "# pragma warning(once : 6286)\n");
2733 out($f, "# pragma warning(once : 6326)\n");
2735 out($f, "#endif\n");
2738 out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n");
2740 out($f, "\t(user_opcode_handler_t)NULL,\n");
2742 out($f, "\t(user_opcode_handler_t)NULL\n};\n\n");
2744 out($f, "static uint8_t zend_user_opcodes[256] = {");
2746 if ($i % 16 == 1) out($f, "\n\t");
2747 out($f, "$i,");
2749 out($f, "255\n};\n\n");
2752 gen_executor($f, $skl, ZEND_VM_SPEC, ZEND_VM_KIND, "execute", "zend_vm_init");
2753 out($f, "\n");
2756 …out($f, "static uint32_t ZEND_FASTCALL zend_vm_get_opcode_handler_idx(uint32_t spec, const zend_op…
2757 out($f, "{\n");
2759 out($f, "\treturn spec;\n");
2761 out($f, "\tstatic const int zend_vm_decode[] = {\n");
2762 out($f, "\t\t_UNUSED_CODE, /* 0 = IS_UNUSED */\n");
2763 out($f, "\t\t_CONST_CODE, /* 1 = IS_CONST */\n");
2764 out($f, "\t\t_TMP_CODE, /* 2 = IS_TMP_VAR */\n");
2765 out($f, "\t\t_UNUSED_CODE, /* 3 */\n");
2766 out($f, "\t\t_VAR_CODE, /* 4 = IS_VAR */\n");
2767 out($f, "\t\t_UNUSED_CODE, /* 5 */\n");
2768 out($f, "\t\t_UNUSED_CODE, /* 6 */\n");
2769 out($f, "\t\t_UNUSED_CODE, /* 7 */\n");
2770 out($f, "\t\t_CV_CODE /* 8 = IS_CV */\n");
2771 out($f, "\t};\n");
2772 out($f, "\tuint32_t offset = 0;\n");
2773 … out($f, "\tif (spec & SPEC_RULE_OP1) offset = offset * 5 + zend_vm_decode[op->op1_type];\n");
2774 … out($f, "\tif (spec & SPEC_RULE_OP2) offset = offset * 5 + zend_vm_decode[op->op2_type];\n");
2784 out($f, "\tif (spec & SPEC_EXTRA_MASK) {\n");
2787 out($f, "\t\t{$else}if (spec & SPEC_RULE_RETVAL) {\n");
2788 out($f, "\t\t\toffset = offset * 2 + (op->result_type != IS_UNUSED);\n");
2789 out($f, "\t\t\tif ((spec & SPEC_RULE_OBSERVER) && ZEND_OBSERVER_ENABLED) {\n");
2790 out($f, "\t\t\t\toffset += 2;\n");
2791 out($f, "\t\t\t}\n");
2795 out($f, "\t\t{$else}if (spec & SPEC_RULE_QUICK_ARG) {\n");
2796 out($f, "\t\t\toffset = offset * 2 + (op->op2.num <= MAX_ARG_FLAG_NUM);\n");
2800 out($f, "\t\t{$else}if (spec & SPEC_RULE_OP_DATA) {\n");
2801 out($f, "\t\t\toffset = offset * 5 + zend_vm_decode[(op + 1)->op1_type];\n");
2805 out($f, "\t\t{$else}if (spec & SPEC_RULE_ISSET) {\n");
2806 out($f, "\t\t\toffset = offset * 2 + (op->extended_value & ZEND_ISEMPTY);\n");
2810 out($f, "\t\t{$else}if (spec & SPEC_RULE_SMART_BRANCH) {\n");
2811 out($f, "\t\t\toffset = offset * 3;\n");
2812 out($f, "\t\t\tif (op->result_type == (IS_SMART_BRANCH_JMPZ|IS_TMP_VAR)) {\n");
2813 out($f, "\t\t\t\toffset += 1;\n");
2814 … out($f, "\t\t\t} else if (op->result_type == (IS_SMART_BRANCH_JMPNZ|IS_TMP_VAR)) {\n");
2815 out($f, "\t\t\t\toffset += 2;\n");
2816 out($f, "\t\t\t}\n");
2820 out($f, "\t\t{$else}if (spec & SPEC_RULE_OBSERVER) {\n");
2821 out($f, "\t\t\toffset = offset * 2;\n");
2822 out($f, "\t\t\tif (ZEND_OBSERVER_ENABLED) {\n");
2823 out($f, "\t\t\t\toffset += 1;\n");
2824 out($f, "\t\t\t}\n");
2828 out($f, "\t\t}\n");
2830 out($f, "\t}\n");
2832 out($f, "\treturn (spec & SPEC_START_MASK) + offset;\n");
2834 out($f, "}\n\n");
2835 out($f, "#if (ZEND_VM_KIND != ZEND_VM_KIND_HYBRID) || !ZEND_VM_SPEC\n");
2836 out($f, "static const void *zend_vm_get_opcode_handler(uint8_t opcode, const zend_op* op)\n");
2837 out($f, "{\n");
2839 out($f, "\treturn zend_opcode_handlers[zend_vm_get_opcode_handler_idx(opcode, op)];\n");
2841 …out($f, "\treturn zend_opcode_handlers[zend_vm_get_opcode_handler_idx(zend_spec_handlers[opcode], …
2843 out($f, "}\n");
2844 out($f, "#endif\n\n");
2848 out($f, "#if ZEND_VM_KIND == ZEND_VM_KIND_HYBRID\n");
2849 … out($f,"static const void *zend_vm_get_opcode_handler_func(uint8_t opcode, const zend_op* op)\n");
2850 out($f, "{\n");
2851 out($f, "\tuint32_t spec = zend_spec_handlers[opcode];\n");
2853 out($f, "\treturn zend_opcode_handler_funcs[spec];\n");
2855 … out($f, "\treturn zend_opcode_handler_funcs[zend_vm_get_opcode_handler_idx(spec, op)];\n");
2857 out($f, "}\n\n");
2858 out($f, "#endif\n\n");
2862 out($f, "ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler(zend_op* op)\n");
2863 out($f, "{\n");
2864 out($f, "\tuint8_t opcode = zend_user_opcodes[op->opcode];\n");
2866 … out($f, "\top->handler = zend_opcode_handlers[zend_vm_get_opcode_handler_idx(opcode, op)];\n");
2868 out($f, "\n");
2869 out($f, "\tif (zend_spec_handlers[op->opcode] & SPEC_RULE_COMMUTATIVE) {\n");
2870 out($f, "\t\tif (op->op1_type < op->op2_type) {\n");
2871 out($f, "\t\t\tzend_swap_operands(op);\n");
2872 out($f, "\t\t}\n");
2873 out($f, "\t}\n");
2874 …out($f, "\top->handler = zend_opcode_handlers[zend_vm_get_opcode_handler_idx(zend_spec_handlers[op…
2876 out($f, "}\n\n");
2879 …out($f, "ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t op1_info,…
2880 out($f, "{\n");
2881 out($f, "\tuint8_t opcode = zend_user_opcodes[op->opcode];\n");
2883 … out($f, "\top->handler = zend_opcode_handlers[zend_vm_get_opcode_handler_idx(opcode, op)];\n");
2885 out($f, "\tuint32_t spec = zend_spec_handlers[opcode];\n");
2887 out($f, "\tswitch (opcode) {\n");
2891 out($f, "\t\tcase $orig_op:\n");
2893 out($f, "\t\t\tif (op->op1_type < op->op2_type) {\n");
2894 out($f, "\t\t\t\tzend_swap_operands(op);\n");
2895 out($f, "\t\t\t}\n");
2901 out($f, "\t\t\tif $condition {\n");
2904 out($f, "\t\t\t} else if $condition {\n");
2908 … out($f, "\t\t\t\tif (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {\n");
2909 out($f, "\t\t\t\t\tbreak;\n");
2910 out($f, "\t\t\t\t}\n");
2912 out($f, "\t\t\t\tspec = {$spec_dsc['spec_code']};\n");
2914 out($f, "\t\t\t\tif (op->op1_type < op->op2_type) {\n");
2915 out($f, "\t\t\t\t\tzend_swap_operands(op);\n");
2916 out($f, "\t\t\t\t}\n");
2920 out($f, "\t\t\t}\n");
2922 out($f, "\t\t\tbreak;\n");
2931 out($f, "\t\tcase $orig_op:\n");
2936 out($f, "\t\t\tif (op->op1_type < op->op2_type) {\n");
2937 out($f, "\t\t\t\tzend_swap_operands(op);\n");
2938 out($f, "\t\t\t}\n");
2939 out($f, "\t\t\tbreak;\n");
2940 out($f, "\t\tcase ZEND_USER_OPCODE:\n");
2941 out($f, "\t\t\tif (zend_spec_handlers[op->opcode] & SPEC_RULE_COMMUTATIVE) {\n");
2942 out($f, "\t\t\t\tif (op->op1_type < op->op2_type) {\n");
2943 out($f, "\t\t\t\t\tzend_swap_operands(op);\n");
2944 out($f, "\t\t\t\t}\n");
2945 out($f, "\t\t\t}\n");
2946 out($f, "\t\t\tbreak;\n");
2948 out($f, "\t\tdefault:\n");
2949 out($f, "\t\t\tbreak;\n");
2950 out($f, "\t}\n");
2952 … out($f, "\top->handler = zend_opcode_handlers[zend_vm_get_opcode_handler_idx(spec, op)];\n");
2954 out($f, "}\n\n");
2958 out($f, "ZEND_API int ZEND_FASTCALL zend_vm_call_opcode_handler(zend_execute_data* ex)\n");
2959 out($f, "{\n");
2961 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2962 out($f, "\topcode_handler_t handler;\n");
2963 out($f,"#endif\n");
2965 out($f, "\tint ret;\n");
2966 out($f, "#ifdef ZEND_VM_IP_GLOBAL_REG\n");
2967 out($f, "\tconst zend_op *orig_opline = opline;\n");
2968 out($f, "#endif\n");
2969 out($f, "#ifdef ZEND_VM_FP_GLOBAL_REG\n");
2970 out($f, "\tzend_execute_data *orig_execute_data = execute_data;\n");
2971 out($f, "\texecute_data = ex;\n");
2972 out($f, "#else\n");
2973 out($f, "\tzend_execute_data *execute_data = ex;\n");
2974 out($f, "#endif\n");
2975 out($f, "\n");
2976 out($f, "\tLOAD_OPLINE();\n");
2977 out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
2979 out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
2980 …out($f, "\thandler = (opcode_handler_t)zend_vm_get_opcode_handler_func(zend_user_opcodes[opline->o…
2981 out($f, "\thandler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
2982 out($f, "\tif (EXPECTED(opline != &hybrid_halt_op)) {\n");
2983 out($f,"#else\n");
2985 out($f, "\t((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
2987 out($f, "\tif (EXPECTED(opline)) {\n");
2988 out($f,"#endif\n");
2990 out($f, "\tif (EXPECTED(opline)) {\n");
2992 … out($f, "\t\tret = execute_data != ex ? (int)(execute_data->prev_execute_data != ex) + 1 : 0;\n");
2993 out($f, "\t\tSAVE_OPLINE();\n");
2994 out($f, "\t} else {\n");
2995 out($f, "\t\tret = -1;\n");
2996 out($f, "\t}\n");
2997 out($f, "#else\n");
2998 … out($f, "\tret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
2999 out($f, "\tSAVE_OPLINE();\n");
3000 out($f, "#endif\n");
3001 out($f, "#ifdef ZEND_VM_FP_GLOBAL_REG\n");
3002 out($f, "\texecute_data = orig_execute_data;\n");
3003 out($f, "#endif\n");
3004 out($f, "#ifdef ZEND_VM_IP_GLOBAL_REG\n");
3005 out($f, "\topline = orig_opline;\n");
3006 out($f, "#endif\n");
3007 out($f, "\treturn ret;\n");
3008 out($f, "}\n\n");
3010 out($f, "ZEND_API int ZEND_FASTCALL zend_vm_call_opcode_handler(zend_execute_data* ex)\n");
3011 out($f, "{\n");
3012 …out($f, "\tzend_error_noreturn(E_CORE_ERROR, \"zend_vm_call_opcode_handler() is not supported\");\…
3013 out($f, "\treturn 0;\n");
3014 out($f, "}\n\n");
3017 fclose($f);