Skip to content

Commit

Permalink
Remove #undefs from vm_gen
Browse files Browse the repository at this point in the history
Possibly these were needed for VM_EXPORT, but they don't serve a
purpose now.
  • Loading branch information
nikic committed Jul 7, 2020
1 parent 002c264 commit fb91611
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
9 changes: 0 additions & 9 deletions Zend/zend_vm_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,6 @@ static const void *zend_vm_get_opcode_handler_func(zend_uchar opcode, const zend

typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS);

#undef OPLINE
#undef DCL_OPLINE
#undef USE_OPLINE
#undef LOAD_OPLINE
#undef LOAD_OPLINE_EX
#undef SAVE_OPLINE
#undef SAVE_OPLINE_EX
#define DCL_OPLINE
#ifdef ZEND_VM_IP_GLOBAL_REG
# define OPLINE opline
Expand All @@ -416,8 +409,6 @@ typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_H
# define SAVE_OPLINE()
# define SAVE_OPLINE_EX()
#endif
#undef HANDLE_EXCEPTION
#undef HANDLE_EXCEPTION_LEAVE
#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()
#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()
#if defined(ZEND_VM_FP_GLOBAL_REG)
Expand Down
29 changes: 0 additions & 29 deletions Zend/zend_vm_gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -1879,13 +1879,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"\n");
out($f,"typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS);\n");
out($f,"\n");
out($f,"#undef OPLINE\n");
out($f,"#undef DCL_OPLINE\n");
out($f,"#undef USE_OPLINE\n");
out($f,"#undef LOAD_OPLINE\n");
out($f,"#undef LOAD_OPLINE_EX\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#undef SAVE_OPLINE_EX\n");
out($f,"#define DCL_OPLINE\n");
out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
out($f,"# define OPLINE opline\n");
Expand All @@ -1904,8 +1897,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"# define SAVE_OPLINE()\n");
out($f,"# define SAVE_OPLINE_EX()\n");
out($f,"#endif\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG)\n");
Expand Down Expand Up @@ -1935,14 +1926,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
break;
case ZEND_VM_KIND_SWITCH:
out($f,"\n");
out($f,"#undef OPLINE\n");
out($f,"#undef DCL_OPLINE\n");
out($f,"#undef USE_OPLINE\n");
out($f,"#undef LOAD_OPLINE\n");
out($f,"#undef LOAD_OPLINE_EX\n");
out($f,"#undef LOAD_NEXT_OPLINE\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#undef SAVE_OPLINE_EX\n");
out($f,"#define OPLINE opline\n");
out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
out($f,"# define DCL_OPLINE register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
Expand All @@ -1955,8 +1938,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
out($f,"#define SAVE_OPLINE_EX()\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
out($f,"#define ZEND_VM_CONTINUE() goto zend_vm_continue\n");
Expand All @@ -1971,14 +1952,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
break;
case ZEND_VM_KIND_GOTO:
out($f,"\n");
out($f,"#undef OPLINE\n");
out($f,"#undef DCL_OPLINE\n");
out($f,"#undef USE_OPLINE\n");
out($f,"#undef LOAD_OPLINE\n");
out($f,"#undef LOAD_OPLINE_EX\n");
out($f,"#undef LOAD_NEXT_OPLINE\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#undef SAVE_OPLINE_EX\n");
out($f,"#define OPLINE opline\n");
out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
out($f,"# define DCL_OPLINE register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
Expand All @@ -1991,8 +1964,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
out($f,"#define SAVE_OPLINE_EX()\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
if (ZEND_VM_SPEC) {
out($f,"#define HANDLE_EXCEPTION() goto ZEND_HANDLE_EXCEPTION_SPEC_LABEL\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() goto ZEND_HANDLE_EXCEPTION_SPEC_LABEL\n");
Expand Down

0 comments on commit fb91611

Please sign in to comment.