Skip to content

Commit c6bc5d6

Browse files
committed
Move znode back to compile header
1 parent 5397d84 commit c6bc5d6

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

Zend/zend_ast.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -213,37 +213,6 @@ typedef struct _zend_ast_decl {
213213
zend_ast *child[5];
214214
} zend_ast_decl;
215215

216-
typedef union _znode_op {
217-
uint32_t constant;
218-
uint32_t var;
219-
uint32_t num;
220-
uint32_t opline_num; /* Needs to be signed */
221-
#if ZEND_USE_ABS_JMP_ADDR
222-
zend_op *jmp_addr;
223-
#else
224-
uint32_t jmp_offset;
225-
#endif
226-
#if ZEND_USE_ABS_CONST_ADDR
227-
zval *zv;
228-
#endif
229-
} znode_op;
230-
231-
typedef struct _znode { /* used only during compilation */
232-
uint8_t op_type;
233-
uint8_t flag;
234-
union {
235-
znode_op op;
236-
zval constant; /* replaced by literal/zv */
237-
} u;
238-
} znode;
239-
240-
typedef struct _zend_ast_znode {
241-
zend_ast_kind kind;
242-
zend_ast_attr attr;
243-
uint32_t lineno;
244-
znode node;
245-
} zend_ast_znode;
246-
247216
typedef void (*zend_ast_process_t)(zend_ast *ast);
248217
extern ZEND_API zend_ast_process_t zend_ast_process;
249218

@@ -392,10 +361,6 @@ static zend_always_inline uint32_t zend_ast_get_lineno(zend_ast *ast) {
392361
}
393362
}
394363

395-
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
396-
return &((zend_ast_znode *) ast)->node;
397-
}
398-
399364
static zend_always_inline zend_ast *zend_ast_create_binary_op(uint32_t opcode, zend_ast *op0, zend_ast *op1) {
400365
return zend_ast_create_ex(ZEND_AST_BINARY_OP, opcode, op0, op1);
401366
}

Zend/zend_compile.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,41 @@ typedef struct _zend_op zend_op;
6363
# define ZEND_USE_ABS_CONST_ADDR 0
6464
#endif
6565

66+
typedef union _znode_op {
67+
uint32_t constant;
68+
uint32_t var;
69+
uint32_t num;
70+
uint32_t opline_num; /* Needs to be signed */
71+
#if ZEND_USE_ABS_JMP_ADDR
72+
zend_op *jmp_addr;
73+
#else
74+
uint32_t jmp_offset;
75+
#endif
76+
#if ZEND_USE_ABS_CONST_ADDR
77+
zval *zv;
78+
#endif
79+
} znode_op;
80+
81+
typedef struct _znode { /* used only during compilation */
82+
uint8_t op_type;
83+
uint8_t flag;
84+
union {
85+
znode_op op;
86+
zval constant; /* replaced by literal/zv */
87+
} u;
88+
} znode;
89+
90+
typedef struct _zend_ast_znode {
91+
zend_ast_kind kind;
92+
zend_ast_attr attr;
93+
uint32_t lineno;
94+
znode node;
95+
} zend_ast_znode;
96+
97+
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
98+
return &((zend_ast_znode *) ast)->node;
99+
}
100+
66101
typedef struct _zend_declarables {
67102
zend_long ticks;
68103
} zend_declarables;

0 commit comments

Comments
 (0)