Compare commits

...
7 changed files with 42 additions and 11 deletions

No files matched your search

-3
View File
@@ -1,8 +1,5 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.0.1RC1
26 Nov 2020, PHP 8.0.0
- BZ2:
+1 -1
View File
@@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice.
dnl ----------------------------------------------------------------------------
AC_PREREQ([2.68])
AC_INIT([PHP],[8.0.0-dev],[https://bugs.php.net],[php],[https://www.php.net])
AC_INIT([PHP],[8.0.0],[https://bugs.php.net],[php],[https://www.php.net])
AC_CONFIG_SRCDIR([main/php_version.h])
AC_CONFIG_AUX_DIR([build])
AC_PRESERVE_HELP_ORDER
+1 -1
View File
@@ -491,7 +491,7 @@ static int zend_jit_disasm_init(void)
REGISTER_HELPER(zend_jit_pre_dec_obj_helper);
REGISTER_HELPER(zend_jit_post_inc_obj_helper);
REGISTER_HELPER(zend_jit_post_dec_obj_helper);
#if (PHP_VERSION_ID <= 80000) && (SIZEOF_SIZE_T == 4)
#if (PHP_VERSION_ID <= 80100) && (SIZEOF_SIZE_T == 4)
REGISTER_HELPER(zval_jit_update_constant_ex);
#endif
REGISTER_HELPER(zend_jit_free_trampoline_helper);
+1 -1
View File
@@ -2639,7 +2639,7 @@ static void ZEND_FASTCALL zend_jit_post_dec_obj_helper(zend_object *zobj, zend_s
}
}
#if (PHP_VERSION_ID <= 80000) && (SIZEOF_SIZE_T == 4)
#if (PHP_VERSION_ID <= 80100) && (SIZEOF_SIZE_T == 4)
static zend_result ZEND_FASTCALL zval_jit_update_constant_ex(zval *p, zend_class_entry *scope)
{
if (Z_TYPE_P(p) == IS_CONSTANT_AST) {
+10 -1
View File
@@ -3245,6 +3245,9 @@ static int zend_jit_trace_deoptimization(dasm_State **Dst,
} else if (reg == ZREG_THIS) {
if (polymorphic_side_trace) {
ssa->var_info[i].delayed_fetch_this = 1;
if (stack) {
SET_STACK_REG(stack, i, ZREG_THIS);
}
} else if (!zend_jit_load_this(Dst, EX_NUM_TO_VAR(i))) {
return 0;
}
@@ -3460,6 +3463,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
const zend_op *opline, *orig_opline;
const zend_ssa_op *ssa_op, *orig_ssa_op;
int used_stack;
uint32_t frame_flags = 0;
JIT_G(current_trace) = trace_buffer;
@@ -3749,6 +3753,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
p++;
}
frame_flags = 0;
switch (opline->opcode) {
case ZEND_INIT_FCALL:
case ZEND_INIT_FCALL_BY_NAME:
@@ -4513,6 +4519,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
case ZEND_INIT_FCALL:
case ZEND_INIT_FCALL_BY_NAME:
case ZEND_INIT_NS_FCALL_BY_NAME:
frame_flags = TRACE_FRAME_MASK_NESTED;
if (!zend_jit_init_fcall(&dasm_state, opline, op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->call_level, p + 1, used_stack < 0)) {
goto jit_failure;
}
@@ -5491,6 +5498,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this;
}
}
frame_flags = TRACE_FRAME_MASK_NESTED;
if (!zend_jit_init_method_call(&dasm_state, opline,
op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1,
op_array, ssa, ssa_op, frame->call_level,
@@ -5505,6 +5513,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
}
op2_info = OP2_INFO();
CHECK_OP2_TRACE_TYPE();
frame_flags = TRACE_FRAME_MASK_NESTED;
if (!zend_jit_init_closure_call(&dasm_state, opline, op_array_ssa->cfg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->call_level, p + 1, used_stack < 0)) {
goto jit_failure;
}
@@ -5946,7 +5955,7 @@ done:
}
call = top;
TRACE_FRAME_INIT(call, p->func, TRACE_FRAME_MASK_NESTED, num_args);
TRACE_FRAME_INIT(call, p->func, frame_flags, num_args);
call->prev = frame->call;
if (!(p->info & ZEND_JIT_TRACE_FAKE_INIT_CALL)) {
TRACE_FRAME_SET_LAST_SEND_BY_VAL(call);
+27 -2
View File
@@ -4162,6 +4162,22 @@ static int zend_jit_inc_dec(dasm_State **Dst, const zend_op *opline, uint32_t op
return 1;
}
static int zend_jit_opline_uses_reg(const zend_op *opline, int8_t reg)
{
if ((opline+1)->opcode == ZEND_OP_DATA
&& ((opline+1)->op1_type & (IS_VAR|IS_TMP_VAR|IS_CV))
&& JIT_G(current_frame)->stack[EX_VAR_TO_NUM((opline+1)->op1.var)].reg == reg) {
return 1;
}
return
((opline->result_type & (IS_VAR|IS_TMP_VAR|IS_CV)) &&
JIT_G(current_frame)->stack[EX_VAR_TO_NUM(opline->result.var)].reg == reg) ||
((opline->op1_type & (IS_VAR|IS_TMP_VAR|IS_CV)) &&
JIT_G(current_frame)->stack[EX_VAR_TO_NUM(opline->op1.var)].reg == reg) ||
((opline->op2_type & (IS_VAR|IS_TMP_VAR|IS_CV)) &&
JIT_G(current_frame)->stack[EX_VAR_TO_NUM(opline->op2.var)].reg == reg);
}
static int zend_jit_math_long_long(dasm_State **Dst,
const zend_op *opline,
zend_uchar opcode,
@@ -4176,7 +4192,13 @@ static int zend_jit_math_long_long(dasm_State **Dst,
zend_reg result_reg;
if (Z_MODE(res_addr) == IS_REG && (res_info & MAY_BE_LONG)) {
result_reg = Z_REG(res_addr);
if (may_overflow && (res_info & MAY_BE_GUARD)
&& JIT_G(current_frame)
&& zend_jit_opline_uses_reg(opline, Z_REG(res_addr))) {
result_reg = ZREG_R0;
} else {
result_reg = Z_REG(res_addr);
}
} else if (Z_MODE(op1_addr) == IS_REG && Z_LAST_USE(op1_addr)) {
result_reg = Z_REG(op1_addr);
} else if (Z_REG(res_addr) != ZREG_R0) {
@@ -4247,6 +4269,9 @@ static int zend_jit_math_long_long(dasm_State **Dst,
const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
if ((res_info & MAY_BE_ANY) == MAY_BE_LONG) {
| jo &exit_addr
if (Z_MODE(res_addr) == IS_REG && result_reg != Z_REG(res_addr)) {
| mov Ra(Z_REG(res_addr)), Ra(result_reg)
}
} else if ((res_info & MAY_BE_ANY) == MAY_BE_DOUBLE) {
| jno &exit_addr
} else {
@@ -12493,7 +12518,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen
| .if X64
| EXT_CALL zval_update_constant_ex, r0
| .else
||#if (PHP_VERSION_ID <= 80000)
||#if (PHP_VERSION_ID < 80100) && (SIZEOF_SIZE_T == 4)
| EXT_CALL zval_jit_update_constant_ex, r0
||#else
| EXT_CALL zval_update_constant_ex, r0
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 8
#define PHP_MINOR_VERSION 0
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "8.0.0-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "8.0.0"
#define PHP_VERSION_ID 80000