Skip to content

Commit 3011ba5

Browse files
committed
FFI and CData are "final" classes. Their object handlers can't be called for $this.
1 parent bf4bf54 commit 3011ba5

File tree

2 files changed

+11
-25
lines changed

2 files changed

+11
-25
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10354,8 +10354,6 @@ static int zend_jit_ffi_init_call_sym(zend_jit_ctx *jit,
1035410354
const zend_ssa_op *ssa_op,
1035510355
uint32_t op1_info,
1035610356
zend_jit_addr op1_addr,
10357-
bool on_this,
10358-
bool delayed_fetch_this,
1035910357
zend_ffi_symbol *sym,
1036010358
HashTable *op1_ffi_symbols,
1036110359
zend_jit_ffi_info *ffi_info)
@@ -14863,8 +14861,6 @@ static int zend_jit_ffi_fetch_obj(zend_jit_ctx *jit,
1486314861
uint32_t op1_info,
1486414862
zend_jit_addr op1_addr,
1486514863
bool op1_indirect,
14866-
bool on_this,
14867-
bool delayed_fetch_this,
1486814864
bool op1_avoid_refcounting,
1486914865
zend_ffi_field *field,
1487014866
zend_jit_addr res_addr,
@@ -14908,8 +14904,6 @@ static int zend_jit_ffi_fetch_sym(zend_jit_ctx *jit,
1490814904
uint32_t op1_info,
1490914905
zend_jit_addr op1_addr,
1491014906
bool op1_indirect,
14911-
bool on_this,
14912-
bool delayed_fetch_this,
1491314907
bool op1_avoid_refcounting,
1491414908
zend_ffi_symbol *sym,
1491514909
zend_jit_addr res_addr,
@@ -15446,8 +15440,6 @@ static int zend_jit_ffi_assign_obj(zend_jit_ctx *jit,
1544615440
uint32_t op1_info,
1544715441
zend_jit_addr op1_addr,
1544815442
bool op1_indirect,
15449-
bool on_this,
15450-
bool delayed_fetch_this,
1545115443
zend_ffi_field *field,
1545215444
uint32_t val_info,
1545315445
zend_jit_addr val_addr,
@@ -15482,7 +15474,7 @@ static int zend_jit_ffi_assign_obj(zend_jit_ctx *jit,
1548215474

1548315475
ZEND_ASSERT(!res_addr);
1548415476

15485-
if (opline->op1_type != IS_UNUSED && !delayed_fetch_this && !op1_indirect) {
15477+
if (!op1_indirect) {
1548615478
jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
1548715479
}
1548815480

@@ -15497,8 +15489,6 @@ static int zend_jit_ffi_assign_sym(zend_jit_ctx *jit,
1549715489
uint32_t op1_info,
1549815490
zend_jit_addr op1_addr,
1549915491
bool op1_indirect,
15500-
bool on_this,
15501-
bool delayed_fetch_this,
1550215492
zend_ffi_symbol *sym,
1550315493
uint32_t val_info,
1550415494
zend_jit_addr val_addr,
@@ -15530,7 +15520,7 @@ static int zend_jit_ffi_assign_sym(zend_jit_ctx *jit,
1553015520

1553115521
ZEND_ASSERT(!res_addr);
1553215522

15533-
if (opline->op1_type != IS_UNUSED && !delayed_fetch_this && !op1_indirect) {
15523+
if (!op1_indirect) {
1553415524
jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
1553515525
}
1553615526

@@ -15900,8 +15890,6 @@ static int zend_jit_ffi_assign_obj_op(zend_jit_ctx *jit,
1590015890
uint32_t op1_info,
1590115891
zend_jit_addr op1_addr,
1590215892
bool op1_indirect,
15903-
bool on_this,
15904-
bool delayed_fetch_this,
1590515893
zend_ffi_field *field,
1590615894
uint32_t val_info,
1590715895
zend_jit_addr val_addr,
@@ -15923,7 +15911,7 @@ static int zend_jit_ffi_assign_obj_op(zend_jit_ctx *jit,
1592315911
return 0;
1592415912
}
1592515913

15926-
if (opline->op1_type != IS_UNUSED && !delayed_fetch_this && !op1_indirect) {
15914+
if (!op1_indirect) {
1592715915
jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
1592815916
}
1592915917

@@ -15938,8 +15926,6 @@ static int zend_jit_ffi_assign_sym_op(zend_jit_ctx *jit,
1593815926
uint32_t op1_info,
1593915927
zend_jit_addr op1_addr,
1594015928
bool op1_indirect,
15941-
bool on_this,
15942-
bool delayed_fetch_this,
1594315929
zend_ffi_symbol *sym,
1594415930
uint32_t val_info,
1594515931
zend_jit_addr val_addr,
@@ -15958,7 +15944,7 @@ static int zend_jit_ffi_assign_sym_op(zend_jit_ctx *jit,
1595815944
return 0;
1595915945
}
1596015946

15961-
if (opline->op1_type != IS_UNUSED && !delayed_fetch_this && !op1_indirect) {
15947+
if (!op1_indirect) {
1596215948
jit_FREE_OP(jit, opline->op1_type, opline->op1, op1_info, opline);
1596315949
}
1596415950

ext/opcache/jit/zend_jit_trace.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4931,7 +4931,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
49314931
ffi_info = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_jit_ffi_info));
49324932
}
49334933
if (!zend_jit_ffi_assign_obj_op(&ctx, opline, op_array, ssa, ssa_op,
4934-
op1_info, op1_addr, op1_indirect, on_this, delayed_fetch_this, field,
4934+
op1_info, op1_addr, op1_indirect, field,
49354935
op1_data_info, OP1_DATA_REG_ADDR(),
49364936
op1_ffi_type, ffi_info)) {
49374937
goto jit_failure;
@@ -4948,7 +4948,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
49484948
ffi_info = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_jit_ffi_info));
49494949
}
49504950
if (!zend_jit_ffi_assign_sym_op(&ctx, opline, op_array, ssa, ssa_op,
4951-
op1_info, op1_addr, op1_indirect, on_this, delayed_fetch_this, sym,
4951+
op1_info, op1_addr, op1_indirect, sym,
49524952
op1_data_info, OP1_DATA_REG_ADDR(),
49534953
op1_ffi_symbols, ffi_info)) {
49544954
goto jit_failure;
@@ -5053,7 +5053,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
50535053
ffi_info = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_jit_ffi_info));
50545054
}
50555055
if (!zend_jit_ffi_assign_obj(&ctx, opline, op_array, ssa, ssa_op,
5056-
op1_info, op1_addr, op1_indirect, on_this, delayed_fetch_this, field,
5056+
op1_info, op1_addr, op1_indirect, field,
50575057
op1_data_info, OP1_DATA_REG_ADDR(), OP1_DATA_DEF_REG_ADDR(),
50585058
(opline->result_type != IS_UNUSED) ? RES_REG_ADDR() : 0,
50595059
op1_ffi_type, op3_ffi_type, ffi_info)) {
@@ -5076,7 +5076,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
50765076
ffi_info = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_jit_ffi_info));
50775077
}
50785078
if (!zend_jit_ffi_assign_sym(&ctx, opline, op_array, ssa, ssa_op,
5079-
op1_info, op1_addr, op1_indirect, on_this, delayed_fetch_this, sym,
5079+
op1_info, op1_addr, op1_indirect, sym,
50805080
op1_data_info, OP1_DATA_REG_ADDR(), OP1_DATA_DEF_REG_ADDR(),
50815081
(opline->result_type != IS_UNUSED) ? RES_REG_ADDR() : 0,
50825082
op1_ffi_symbols, op3_ffi_type, ffi_info)) {
@@ -6254,7 +6254,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
62546254
}
62556255
if (!zend_jit_ffi_fetch_obj(&ctx, opline, op_array, ssa, ssa_op,
62566256
op1_info, op1_addr, op1_indirect,
6257-
on_this, delayed_fetch_this, avoid_refcounting, field,
6257+
avoid_refcounting, field,
62586258
RES_REG_ADDR(),
62596259
op1_ffi_type, ffi_info)) {
62606260
goto jit_failure;
@@ -6275,7 +6275,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
62756275
}
62766276
if (!zend_jit_ffi_fetch_sym(&ctx, opline, op_array, ssa, ssa_op,
62776277
op1_info, op1_addr, op1_indirect,
6278-
on_this, delayed_fetch_this, avoid_refcounting, sym,
6278+
avoid_refcounting, sym,
62796279
RES_REG_ADDR(),
62806280
op1_ffi_symbols, ffi_info)) {
62816281
goto jit_failure;
@@ -6563,7 +6563,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
65636563
}
65646564
if (!zend_jit_ffi_init_call_sym(&ctx, opline, op_array, ssa, ssa_op,
65656565
op1_info, op1_addr,
6566-
on_this, delayed_fetch_this, sym,
6566+
sym,
65676567
op1_ffi_symbols, ffi_info)) {
65686568
goto jit_failure;
65696569
}

0 commit comments

Comments
 (0)