Skip to content

Instantly share code, notes, and snippets.

@laruence
Created October 30, 2017 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laruence/9990ce5f9f3b30dd98dbff4f59109232 to your computer and use it in GitHub Desktop.
Save laruence/9990ce5f9f3b30dd98dbff4f59109232 to your computer and use it in GitHub Desktop.
typeinfo.diff
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index e108b7a..6a560f6 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -3018,6 +3018,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
tmp |= t1 & (MAY_BE_RC1|MAY_BE_RCN);
}
}
+#if 0 /* Infer typeinfo by usage ??? */
j = ssa_vars[ssa_ops[i].result_def].use_chain;
while (j >= 0) {
switch (op_array->opcodes[j].opcode) {
@@ -3083,6 +3084,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
}
j = zend_ssa_next_use(ssa_ops, ssa_ops[i].result_def, j);
}
+#endif
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment