@@ -17357,7 +17357,6 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SIMPLE
17357
17357
ZEND_VM_NEXT_OPCODE();
17358
17358
}
17359
17359
17360
-
17361
17360
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SIMPLE_SPEC_VAR_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
17362
17361
{
17363
17362
USE_OPLINE
@@ -17386,7 +17385,6 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SIMPLE
17386
17385
ZEND_VM_NEXT_OPCODE();
17387
17386
}
17388
17387
17389
-
17390
17388
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
17391
17389
{
17392
17390
USE_OPLINE
@@ -24209,6 +24207,110 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND
24209
24207
ZEND_VM_RETURN();
24210
24208
}
24211
24209
24210
+ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
24211
+ {
24212
+ USE_OPLINE
24213
+ zval *array;
24214
+ zval *value, *variable_ptr;
24215
+ uint32_t value_type;
24216
+ HashTable *fe_ht;
24217
+ HashPosition pos;
24218
+ Bucket *p;
24219
+
24220
+ array = EX_VAR(opline->op1.var);
24221
+ SAVE_OPLINE();
24222
+ fe_ht = Z_ARRVAL_P(array);
24223
+ pos = Z_FE_POS_P(array);
24224
+ p = fe_ht->arData + pos;
24225
+ while (1) {
24226
+ if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
24227
+ /* reached end of iteration */
24228
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
24229
+ ZEND_VM_CONTINUE();
24230
+ }
24231
+ value = &p->val;
24232
+ value_type = Z_TYPE_INFO_P(value);
24233
+ if (EXPECTED(value_type != IS_UNDEF)) {
24234
+ if (UNEXPECTED(value_type == IS_INDIRECT)) {
24235
+ value = Z_INDIRECT_P(value);
24236
+ value_type = Z_TYPE_INFO_P(value);
24237
+ if (EXPECTED(value_type != IS_UNDEF)) {
24238
+ break;
24239
+ }
24240
+ } else {
24241
+ break;
24242
+ }
24243
+ }
24244
+ pos++;
24245
+ p++;
24246
+ }
24247
+ Z_FE_POS_P(array) = pos + 1;
24248
+ if (0) {
24249
+ if (!p->key) {
24250
+ ZVAL_LONG(EX_VAR(opline->result.var), p->h);
24251
+ } else {
24252
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), p->key);
24253
+ }
24254
+ }
24255
+
24256
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC);
24257
+ zend_assign_to_variable(variable_ptr, value, IS_CV);
24258
+ ZEND_VM_NEXT_OPCODE();
24259
+ }
24260
+
24261
+
24262
+ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
24263
+ {
24264
+ USE_OPLINE
24265
+ zval *array;
24266
+ zval *value, *variable_ptr;
24267
+ uint32_t value_type;
24268
+ HashTable *fe_ht;
24269
+ HashPosition pos;
24270
+ Bucket *p;
24271
+
24272
+ array = EX_VAR(opline->op1.var);
24273
+ SAVE_OPLINE();
24274
+ fe_ht = Z_ARRVAL_P(array);
24275
+ pos = Z_FE_POS_P(array);
24276
+ p = fe_ht->arData + pos;
24277
+ while (1) {
24278
+ if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
24279
+ /* reached end of iteration */
24280
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
24281
+ ZEND_VM_CONTINUE();
24282
+ }
24283
+ value = &p->val;
24284
+ value_type = Z_TYPE_INFO_P(value);
24285
+ if (EXPECTED(value_type != IS_UNDEF)) {
24286
+ if (UNEXPECTED(value_type == IS_INDIRECT)) {
24287
+ value = Z_INDIRECT_P(value);
24288
+ value_type = Z_TYPE_INFO_P(value);
24289
+ if (EXPECTED(value_type != IS_UNDEF)) {
24290
+ break;
24291
+ }
24292
+ } else {
24293
+ break;
24294
+ }
24295
+ }
24296
+ pos++;
24297
+ p++;
24298
+ }
24299
+ Z_FE_POS_P(array) = pos + 1;
24300
+ if (1) {
24301
+ if (!p->key) {
24302
+ ZVAL_LONG(EX_VAR(opline->result.var), p->h);
24303
+ } else {
24304
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), p->key);
24305
+ }
24306
+ }
24307
+
24308
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC);
24309
+ zend_assign_to_variable(variable_ptr, value, IS_CV);
24310
+ ZEND_VM_NEXT_OPCODE();
24311
+ }
24312
+
24313
+
24212
24314
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
24213
24315
{
24214
24316
USE_OPLINE
@@ -34152,7 +34254,6 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SIMPLE
34152
34254
ZEND_VM_NEXT_OPCODE();
34153
34255
}
34154
34256
34155
-
34156
34257
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
34157
34258
{
34158
34259
USE_OPLINE
@@ -34181,7 +34282,6 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SIMPLE
34181
34282
ZEND_VM_NEXT_OPCODE();
34182
34283
}
34183
34284
34184
-
34185
34285
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
34186
34286
{
34187
34287
USE_OPLINE
@@ -58905,6 +59005,56 @@ ZEND_API void execute_ex(zend_execute_data *ex)
58905
59005
(void*)&&ZEND_NULL_LABEL,
58906
59006
(void*)&&ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_LABEL,
58907
59007
(void*)&&ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_QUICK_LABEL,
59008
+ (void*)&&ZEND_NULL_LABEL,
59009
+ (void*)&&ZEND_NULL_LABEL,
59010
+ (void*)&&ZEND_NULL_LABEL,
59011
+ (void*)&&ZEND_NULL_LABEL,
59012
+ (void*)&&ZEND_NULL_LABEL,
59013
+ (void*)&&ZEND_NULL_LABEL,
59014
+ (void*)&&ZEND_NULL_LABEL,
59015
+ (void*)&&ZEND_NULL_LABEL,
59016
+ (void*)&&ZEND_NULL_LABEL,
59017
+ (void*)&&ZEND_NULL_LABEL,
59018
+ (void*)&&ZEND_NULL_LABEL,
59019
+ (void*)&&ZEND_NULL_LABEL,
59020
+ (void*)&&ZEND_NULL_LABEL,
59021
+ (void*)&&ZEND_NULL_LABEL,
59022
+ (void*)&&ZEND_NULL_LABEL,
59023
+ (void*)&&ZEND_NULL_LABEL,
59024
+ (void*)&&ZEND_NULL_LABEL,
59025
+ (void*)&&ZEND_NULL_LABEL,
59026
+ (void*)&&ZEND_NULL_LABEL,
59027
+ (void*)&&ZEND_NULL_LABEL,
59028
+ (void*)&&ZEND_NULL_LABEL,
59029
+ (void*)&&ZEND_NULL_LABEL,
59030
+ (void*)&&ZEND_NULL_LABEL,
59031
+ (void*)&&ZEND_NULL_LABEL,
59032
+ (void*)&&ZEND_NULL_LABEL,
59033
+ (void*)&&ZEND_NULL_LABEL,
59034
+ (void*)&&ZEND_NULL_LABEL,
59035
+ (void*)&&ZEND_NULL_LABEL,
59036
+ (void*)&&ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED_LABEL,
59037
+ (void*)&&ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED_LABEL,
59038
+ (void*)&&ZEND_NULL_LABEL,
59039
+ (void*)&&ZEND_NULL_LABEL,
59040
+ (void*)&&ZEND_NULL_LABEL,
59041
+ (void*)&&ZEND_NULL_LABEL,
59042
+ (void*)&&ZEND_NULL_LABEL,
59043
+ (void*)&&ZEND_NULL_LABEL,
59044
+ (void*)&&ZEND_NULL_LABEL,
59045
+ (void*)&&ZEND_NULL_LABEL,
59046
+ (void*)&&ZEND_NULL_LABEL,
59047
+ (void*)&&ZEND_NULL_LABEL,
59048
+ (void*)&&ZEND_NULL_LABEL,
59049
+ (void*)&&ZEND_NULL_LABEL,
59050
+ (void*)&&ZEND_NULL_LABEL,
59051
+ (void*)&&ZEND_NULL_LABEL,
59052
+ (void*)&&ZEND_NULL_LABEL,
59053
+ (void*)&&ZEND_NULL_LABEL,
59054
+ (void*)&&ZEND_NULL_LABEL,
59055
+ (void*)&&ZEND_NULL_LABEL,
59056
+ (void*)&&ZEND_NULL_LABEL,
59057
+ (void*)&&ZEND_NULL_LABEL,
58908
59058
(void*)&&ZEND_NULL_LABEL
58909
59059
};
58910
59060
zend_opcode_handlers = (const void **) labels;
@@ -60583,6 +60733,12 @@ ZEND_API void execute_ex(zend_execute_data *ex)
60583
60733
HYBRID_CASE(ZEND_YIELD_SPEC_VAR_CV):
60584
60734
ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
60585
60735
HYBRID_BREAK();
60736
+ HYBRID_CASE(ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED):
60737
+ ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
60738
+ HYBRID_BREAK();
60739
+ HYBRID_CASE(ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED):
60740
+ ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
60741
+ HYBRID_BREAK();
60586
60742
HYBRID_CASE(ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR):
60587
60743
ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
60588
60744
HYBRID_BREAK();
@@ -67783,6 +67939,56 @@ void zend_init_opcodes_handlers(void)
67783
67939
ZEND_NULL_HANDLER,
67784
67940
ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_HANDLER,
67785
67941
ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_QUICK_HANDLER,
67942
+ ZEND_NULL_HANDLER,
67943
+ ZEND_NULL_HANDLER,
67944
+ ZEND_NULL_HANDLER,
67945
+ ZEND_NULL_HANDLER,
67946
+ ZEND_NULL_HANDLER,
67947
+ ZEND_NULL_HANDLER,
67948
+ ZEND_NULL_HANDLER,
67949
+ ZEND_NULL_HANDLER,
67950
+ ZEND_NULL_HANDLER,
67951
+ ZEND_NULL_HANDLER,
67952
+ ZEND_NULL_HANDLER,
67953
+ ZEND_NULL_HANDLER,
67954
+ ZEND_NULL_HANDLER,
67955
+ ZEND_NULL_HANDLER,
67956
+ ZEND_NULL_HANDLER,
67957
+ ZEND_NULL_HANDLER,
67958
+ ZEND_NULL_HANDLER,
67959
+ ZEND_NULL_HANDLER,
67960
+ ZEND_NULL_HANDLER,
67961
+ ZEND_NULL_HANDLER,
67962
+ ZEND_NULL_HANDLER,
67963
+ ZEND_NULL_HANDLER,
67964
+ ZEND_NULL_HANDLER,
67965
+ ZEND_NULL_HANDLER,
67966
+ ZEND_NULL_HANDLER,
67967
+ ZEND_NULL_HANDLER,
67968
+ ZEND_NULL_HANDLER,
67969
+ ZEND_NULL_HANDLER,
67970
+ ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED_HANDLER,
67971
+ ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED_HANDLER,
67972
+ ZEND_NULL_HANDLER,
67973
+ ZEND_NULL_HANDLER,
67974
+ ZEND_NULL_HANDLER,
67975
+ ZEND_NULL_HANDLER,
67976
+ ZEND_NULL_HANDLER,
67977
+ ZEND_NULL_HANDLER,
67978
+ ZEND_NULL_HANDLER,
67979
+ ZEND_NULL_HANDLER,
67980
+ ZEND_NULL_HANDLER,
67981
+ ZEND_NULL_HANDLER,
67982
+ ZEND_NULL_HANDLER,
67983
+ ZEND_NULL_HANDLER,
67984
+ ZEND_NULL_HANDLER,
67985
+ ZEND_NULL_HANDLER,
67986
+ ZEND_NULL_HANDLER,
67987
+ ZEND_NULL_HANDLER,
67988
+ ZEND_NULL_HANDLER,
67989
+ ZEND_NULL_HANDLER,
67990
+ ZEND_NULL_HANDLER,
67991
+ ZEND_NULL_HANDLER,
67786
67992
ZEND_NULL_HANDLER
67787
67993
};
67788
67994
static const uint32_t specs[] = {
@@ -67886,7 +68092,7 @@ void zend_init_opcodes_handlers(void)
67886
68092
2257 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67887
68093
2282 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67888
68094
2307 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67889
- 4821 ,
68095
+ 4871 ,
67890
68096
2332,
67891
68097
2333,
67892
68098
2334,
@@ -67971,7 +68177,7 @@ void zend_init_opcodes_handlers(void)
67971
68177
3531 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67972
68178
3556 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67973
68179
3581 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67974
- 4821 ,
68180
+ 4871 ,
67975
68181
3606 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67976
68182
3631 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67977
68183
3656 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
@@ -67982,7 +68188,7 @@ void zend_init_opcodes_handlers(void)
67982
68188
3781 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67983
68189
3806 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67984
68190
3831 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
67985
- 4821
68191
+ 4871
67986
68192
};
67987
68193
#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)
67988
68194
zend_opcode_handler_funcs = labels;
@@ -68356,6 +68562,11 @@ ZEND_API void zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t op1_info, uint
68356
68562
spec = 4811 | SPEC_RULE_OP1 | SPEC_RULE_QUICK_ARG;
68357
68563
}
68358
68564
break;
68565
+ case ZEND_FE_FETCH_R:
68566
+ if (op->op2_type == IS_CV && (op1_info & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) {
68567
+ spec = 4821 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_RETVAL;
68568
+ }
68569
+ break;
68359
68570
case ZEND_FETCH_DIM_R:
68360
68571
if (!(op2_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))) {
68361
68572
spec = 4781 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
0 commit comments