summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-03-17 15:23:52 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-03-17 15:23:52 +0100
commit41a86a72c432ea4618ca7c63f29522249139292a (patch)
treeac2766418778ada652b35927544799697f20f228
parent023039fbfc055779447ebda3c90299731a10c5ea (diff)
downloadphp-git-41a86a72c432ea4618ca7c63f29522249139292a.tar.gz
Clean up a few more places
-rw-r--r--ext/opcache/Optimizer/escape_analysis.c2
-rw-r--r--ext/opcache/Optimizer/sccp.c5
-rw-r--r--ext/opcache/Optimizer/zend_inference.c6
3 files changed, 0 insertions, 13 deletions
diff --git a/ext/opcache/Optimizer/escape_analysis.c b/ext/opcache/Optimizer/escape_analysis.c
index b27e12ec4d..a5577d5995 100644
--- a/ext/opcache/Optimizer/escape_analysis.c
+++ b/ext/opcache/Optimizer/escape_analysis.c
@@ -216,8 +216,6 @@ static int is_allocation_def(zend_op_array *op_array, zend_ssa *ssa, int def, in
}
break;
case ZEND_ASSIGN_DIM:
- case ZEND_ASSIGN_OBJ:
- case ZEND_ASSIGN_OBJ_REF:
if (OP1_INFO() & (MAY_BE_UNDEF | MAY_BE_NULL | MAY_BE_FALSE)) {
/* implicit object/array allocation */
return 1;
diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c
index e72a38f43f..fd83424f09 100644
--- a/ext/opcache/Optimizer/sccp.c
+++ b/ext/opcache/Optimizer/sccp.c
@@ -1201,11 +1201,6 @@ static void sccp_visit_instr(scdf_ctx *scdf, zend_op *opline, zend_ssa_op *ssa_o
return;
}
- /* If $a in $a->foo=$c is UNDEF, treat it like NULL. There is no warning. */
- if ((var_info->type & MAY_BE_ANY) == 0) {
- op1 = &EG(uninitialized_zval);
- }
-
if (IS_BOT(op1)) {
SET_RESULT_BOT(result);
SET_RESULT_BOT(op1);
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index 8c80c29e25..fda7989424 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -2554,12 +2554,6 @@ static zend_always_inline int _zend_update_type_info(
tmp |= MAY_BE_NULL;
}
} else if (opline->opcode == ZEND_ASSIGN_OBJ_OP) {
- if (orig & (MAY_BE_ANY - (MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT))) {
- /* null and false (and empty string) are implicitly converted to object,
- * anything else results in a null return value. */
- tmp |= MAY_BE_NULL;
- }
-
/* The return value must also satisfy the property type */
if (prop_info) {
tmp &= zend_fetch_prop_type(script, prop_info, NULL);