Fix DIM_OBJ specialization in zend_vm_get_opcode_handler_func

DIM_OBJ also specializes over ASSIGN_STATIC_PROP nowadays.
This commit is contained in:
Nikita Popov 2019-02-07 10:04:54 +01:00
parent edb7ef4f8c
commit 1a4ffcd2b4
2 changed files with 10 additions and 6 deletions

View file

@ -72891,8 +72891,8 @@ static const void* ZEND_FASTCALL zend_vm_get_opcode_handler_ex(uint32_t spec, co
offset += 1;
} else if (op->extended_value == ZEND_ASSIGN_OBJ) {
offset += 2;
} else if (op->extended_value == ZEND_ASSIGN_STATIC_PROP) {
offset += 3;
} else if (op->extended_value == ZEND_ASSIGN_STATIC_PROP) {
offset += 3;
}
} else if (spec & SPEC_RULE_ISSET) {
offset = offset * 2 + (op->extended_value & ZEND_ISEMPTY);
@ -72946,11 +72946,13 @@ static const void *zend_vm_get_opcode_handler_func(zend_uchar opcode, const zend
}
}
else if (spec & SPEC_RULE_DIM_OBJ) {
offset = offset * 3;
offset = offset * 4;
if (op->extended_value == ZEND_ASSIGN_DIM) {
offset += 1;
} else if (op->extended_value == ZEND_ASSIGN_OBJ) {
offset += 2;
} else if (op->extended_value == ZEND_ASSIGN_STATIC_PROP) {
offset += 3;
}
}
else if (spec & SPEC_RULE_ISSET) offset = offset * 2 + (op->extended_value & ZEND_ISEMPTY);

View file

@ -2772,8 +2772,8 @@ function gen_vm($def, $skel) {
out($f, "\t\t\t\toffset += 1;\n");
out($f, "\t\t\t} else if (op->extended_value == ZEND_ASSIGN_OBJ) {\n");
out($f, "\t\t\t\toffset += 2;\n");
out($f, "\t\t} else if (op->extended_value == ZEND_ASSIGN_STATIC_PROP) {\n");
out($f, "\t\t\toffset += 3;\n");
out($f, "\t\t\t} else if (op->extended_value == ZEND_ASSIGN_STATIC_PROP) {\n");
out($f, "\t\t\t\toffset += 3;\n");
out($f, "\t\t\t}\n");
$else = "} else ";
}
@ -2870,11 +2870,13 @@ function gen_vm($def, $skel) {
}
if (isset($used_extra_spec["DIM_OBJ"])) {
out($f, "\t\t{$else}if (spec & SPEC_RULE_DIM_OBJ) {\n");
out($f, "\t\t\toffset = offset * 3;\n");
out($f, "\t\t\toffset = offset * 4;\n");
out($f, "\t\t\tif (op->extended_value == ZEND_ASSIGN_DIM) {\n");
out($f, "\t\t\t\toffset += 1;\n");
out($f, "\t\t\t} else if (op->extended_value == ZEND_ASSIGN_OBJ) {\n");
out($f, "\t\t\t\toffset += 2;\n");
out($f, "\t\t\t} else if (op->extended_value == ZEND_ASSIGN_STATIC_PROP) {\n");
out($f, "\t\t\t\toffset += 3;\n");
out($f, "\t\t\t}\n");
out($f, "\t\t}\n");
$else = "else ";