Skip to content

Commit 050294b

Browse files
committed
More fixes
1 parent 867398e commit 050294b

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

Zend/Optimizer/optimize_func_calls.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
226226
* the DO opcode is used, allowing to optimize calls to
227227
* ZEND_ACC_NODISCARD functions. */
228228
if (opline->opcode != ZEND_CALLABLE_CONVERT) {
229-
// FIXME: Maintain BP_VAR_FUNC_ARG semantics when appropriate.
230-
opline->opcode = zend_get_call_op(fcall, call_stack[call].func, !RESULT_UNUSED(opline), BP_VAR_R);
229+
opline->opcode = zend_get_call_op(fcall, call_stack[call].func, !RESULT_UNUSED(opline));
231230
}
232231

233232
if ((ZEND_OPTIMIZER_PASS_16 & ctx->optimization_level)

Zend/zend_compile.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3939,7 +3939,7 @@ static uint32_t zend_compile_args(
39393939
}
39403940
/* }}} */
39413941

3942-
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, const zend_function *fbc, bool result_used, uint32_t type) /* {{{ */
3942+
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, const zend_function *fbc, bool result_used) /* {{{ */
39433943
{
39443944
uint32_t no_discard = result_used ? 0 : ZEND_ACC_NODISCARD;
39453945

@@ -4022,8 +4022,7 @@ static bool zend_compile_call_common(znode *result, zend_ast *args_ast, const ze
40224022
* know if the result is used. Deoptimize #[\NoDiscard]
40234023
* calls to be sure. The optimizer will fix this up.
40244024
*/
4025-
false,
4026-
type
4025+
false
40274026
);
40284027
opline = zend_emit_op(result, call_op, NULL, NULL);
40294028

Zend/zend_compile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ ZEND_API bool zend_is_compiling(void);
10051005
ZEND_API char *zend_make_compiled_string_description(const char *name);
10061006
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers);
10071007
uint32_t zend_get_class_fetch_type(const zend_string *name);
1008-
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, const zend_function *fbc, bool result_used, uint32_t type);
1008+
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, const zend_function *fbc, bool result_used);
10091009
ZEND_API bool zend_is_smart_branch(const zend_op *opline);
10101010

10111011
typedef bool (*zend_auto_global_callback)(zend_string *name);

Zend/zend_vm_def.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4265,7 +4265,6 @@ ZEND_VM_HOT_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY, SPEC(RETVAL,OBSERVER))
42654265
}
42664266
ZEND_ASSERT(opline->result_type != IS_TMP_VAR || !Z_ISREF_P(ret));
42674267
#endif
4268-
42694268
ZEND_OBSERVER_FCALL_END(call, EG(exception) ? NULL : ret);
42704269
ZEND_VM_FCALL_INTERRUPT_CHECK(call);
42714270

@@ -4395,7 +4394,6 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL,OBSERVER))
43954394
}
43964395
ZEND_ASSERT(opline->result_type != IS_TMP_VAR || !Z_ISREF_P(ret));
43974396
#endif
4398-
43994397
ZEND_OBSERVER_FCALL_END(call, EG(exception) ? NULL : ret);
44004398
ZEND_VM_FCALL_INTERRUPT_CHECK(call);
44014399

Zend/zend_vm_execute.h

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)