@@ -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
@@ -2370,13 +2370,9 @@ static void zend_emit_jmp_null(znode *obj_node, uint32_t bp_type)
2370
2370
zend_stack_push (& CG (short_circuiting_opnums ), & jmp_null_opnum );
2371
2371
}
2372
2372
2373
- #define ZEND_MEMOIZE_NONE 0
2374
- #define ZEND_MEMOIZE_COMPILE 1
2375
- #define ZEND_MEMOIZE_FETCH 2
2376
-
2377
2373
static void zend_compile_memoized_expr (znode * result , zend_ast * expr ) /* {{{ */
2378
2374
{
2379
- int memoize_mode = CG (memoize_mode );
2375
+ const zend_memoize_mode memoize_mode = CG (memoize_mode );
2380
2376
if (memoize_mode == ZEND_MEMOIZE_COMPILE ) {
2381
2377
znode memoized_result ;
2382
2378
@@ -9164,7 +9160,7 @@ static void zend_compile_assign_coalesce(znode *result, zend_ast *ast) /* {{{ */
9164
9160
/* Remember expressions compiled during the initial BP_VAR_IS lookup,
9165
9161
* to avoid double-evaluation when we compile again with BP_VAR_W. */
9166
9162
HashTable * orig_memoized_exprs = CG (memoized_exprs );
9167
- int orig_memoize_mode = CG (memoize_mode );
9163
+ const zend_memoize_mode orig_memoize_mode = CG (memoize_mode );
9168
9164
9169
9165
zend_ensure_writable_variable (var_ast );
9170
9166
if (is_this_fetch (var_ast )) {
0 commit comments