@@ -378,7 +378,7 @@ void zend_init_compiler_data_structures(void) /* {{{ */
378
378
379
379
CG (encoding_declared ) = 0 ;
380
380
CG (memoized_exprs ) = NULL ;
381
- CG (memoize_mode ) = 0 ;
381
+ CG (memoize_mode ) = ZEND_MEMOIZE_NONE ;
382
382
}
383
383
/* }}} */
384
384
@@ -2334,13 +2334,9 @@ static void zend_emit_jmp_null(znode *obj_node, uint32_t bp_type)
2334
2334
zend_stack_push (& CG (short_circuiting_opnums ), & jmp_null_opnum );
2335
2335
}
2336
2336
2337
- #define ZEND_MEMOIZE_NONE 0
2338
- #define ZEND_MEMOIZE_COMPILE 1
2339
- #define ZEND_MEMOIZE_FETCH 2
2340
-
2341
2337
static void zend_compile_memoized_expr (znode * result , zend_ast * expr ) /* {{{ */
2342
2338
{
2343
- int memoize_mode = CG (memoize_mode );
2339
+ const zend_memoize_mode memoize_mode = CG (memoize_mode );
2344
2340
if (memoize_mode == ZEND_MEMOIZE_COMPILE ) {
2345
2341
znode memoized_result ;
2346
2342
@@ -9124,7 +9120,7 @@ static void zend_compile_assign_coalesce(znode *result, zend_ast *ast) /* {{{ */
9124
9120
/* Remember expressions compiled during the initial BP_VAR_IS lookup,
9125
9121
* to avoid double-evaluation when we compile again with BP_VAR_W. */
9126
9122
HashTable * orig_memoized_exprs = CG (memoized_exprs );
9127
- int orig_memoize_mode = CG (memoize_mode );
9123
+ const zend_memoize_mode orig_memoize_mode = CG (memoize_mode );
9128
9124
9129
9125
zend_ensure_writable_variable (var_ast );
9130
9126
if (is_this_fetch (var_ast )) {
0 commit comments