@@ -379,7 +379,7 @@ void zend_init_compiler_data_structures(void) /* {{{ */
379
379
380
380
CG (encoding_declared ) = 0 ;
381
381
CG (memoized_exprs ) = NULL ;
382
- CG (memoize_mode ) = 0 ;
382
+ CG (memoize_mode ) = ZEND_MEMOIZE_NONE ;
383
383
}
384
384
/* }}} */
385
385
@@ -2426,13 +2426,9 @@ static void zend_emit_jmp_null(znode *obj_node, uint32_t bp_type)
2426
2426
zend_stack_push (& CG (short_circuiting_opnums ), & jmp_null_opnum );
2427
2427
}
2428
2428
2429
- #define ZEND_MEMOIZE_NONE 0
2430
- #define ZEND_MEMOIZE_COMPILE 1
2431
- #define ZEND_MEMOIZE_FETCH 2
2432
-
2433
2429
static void zend_compile_memoized_expr (znode * result , zend_ast * expr ) /* {{{ */
2434
2430
{
2435
- int memoize_mode = CG (memoize_mode );
2431
+ const zend_memoize_mode memoize_mode = CG (memoize_mode );
2436
2432
if (memoize_mode == ZEND_MEMOIZE_COMPILE ) {
2437
2433
znode memoized_result ;
2438
2434
@@ -9184,7 +9180,7 @@ static void zend_compile_assign_coalesce(znode *result, zend_ast *ast) /* {{{ */
9184
9180
/* Remember expressions compiled during the initial BP_VAR_IS lookup,
9185
9181
* to avoid double-evaluation when we compile again with BP_VAR_W. */
9186
9182
HashTable * orig_memoized_exprs = CG (memoized_exprs );
9187
- int orig_memoize_mode = CG (memoize_mode );
9183
+ const zend_memoize_mode orig_memoize_mode = CG (memoize_mode );
9188
9184
9189
9185
zend_ensure_writable_variable (var_ast );
9190
9186
if (is_this_fetch (var_ast )) {
0 commit comments