mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
Use EX_NUM_TO_VAR() in more places
Not sure why I missed these before.
This commit is contained in:
parent
1949a26aac
commit
5a90392c6a
@ -505,7 +505,7 @@ static int lookup_cv(zend_string *name) /* {{{ */{
|
||||
while (i < op_array->last_var) {
|
||||
if (ZSTR_H(op_array->vars[i]) == hash_value
|
||||
&& zend_string_equals(op_array->vars[i], name)) {
|
||||
return (int)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, i);
|
||||
return EX_NUM_TO_VAR(i);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@ -517,7 +517,7 @@ static int lookup_cv(zend_string *name) /* {{{ */{
|
||||
}
|
||||
|
||||
op_array->vars[i] = zend_string_copy(name);
|
||||
return (int)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, i);
|
||||
return EX_NUM_TO_VAR(i);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -593,7 +593,7 @@ static void emit_live_range_raw(
|
||||
|
||||
ZEND_ASSERT(start < end);
|
||||
range = &op_array->live_range[op_array->last_live_range - 1];
|
||||
range->var = (uint32_t) (intptr_t) ZEND_CALL_VAR_NUM(NULL, op_array->last_var + var_num);
|
||||
range->var = EX_NUM_TO_VAR(op_array->last_var + var_num);
|
||||
range->var |= kind;
|
||||
range->start = start;
|
||||
range->end = end;
|
||||
@ -698,8 +698,7 @@ static void emit_live_range(
|
||||
/* COPY_TMP has a split live-range: One from the definition until the use in
|
||||
* "null" branch, and another from the start of the "non-null" branch to the
|
||||
* FREE opcode. */
|
||||
uint32_t rt_var_num =
|
||||
(uint32_t) (intptr_t) ZEND_CALL_VAR_NUM(NULL, op_array->last_var + var_num);
|
||||
uint32_t rt_var_num = EX_NUM_TO_VAR(op_array->last_var + var_num);
|
||||
zend_op *block_start_op = use_opline;
|
||||
|
||||
if (needs_live_range && !needs_live_range(op_array, orig_def_opline)) {
|
||||
|
@ -416,7 +416,7 @@ static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) {
|
||||
|
||||
if (free_var >= 0) {
|
||||
opline->opcode = ZEND_FREE;
|
||||
opline->op1.var = (uintptr_t) ZEND_CALL_VAR_NUM(NULL, ssa->vars[free_var].var);
|
||||
opline->op1.var = EX_NUM_TO_VAR(ssa->vars[free_var].var);
|
||||
opline->op1_type = free_var_type;
|
||||
|
||||
ssa_op->op1_use = free_var;
|
||||
|
Loading…
Reference in New Issue
Block a user