Skip to content

Commit 7b8212f

Browse files
committed
Repare SWITCH VM
1 parent bdac9ef commit 7b8212f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_vm_gen.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
18051805
$prolog = $m[1];
18061806
out($f,$prolog."if (UNEXPECTED(execute_data == NULL)) {\n");
18071807
out($f,$prolog."\tstatic const void* labels[] = {\n");
1808-
gen_labels($f, $spec, ZEND_VM_KIND_GOTO, $prolog."\t\t", $specs);
1808+
gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_GOTO : $kind, $prolog."\t\t", $specs);
18091809
out($f,$prolog."\t};\n");
18101810
out($f,$prolog."\tzend_opcode_handlers = (const void **) labels;\n");
18111811
out($f,$prolog."\tzend_handlers_count = sizeof(labels) / sizeof(void*);\n");
@@ -1920,7 +1920,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
19201920
out($f,$prolog.$executor_name."_ex(NULL);\n");
19211921
} else {
19221922
out($f,$prolog."static const void *labels[] = {\n");
1923-
gen_labels($f, $spec, ZEND_VM_KIND_CALL, $prolog."\t", $specs, $switch_labels);
1923+
gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_CALL : $kind, $prolog."\t", $specs, $switch_labels);
19241924
out($f,$prolog."};\n");
19251925
out($f,$prolog."static const uint32_t specs[] = {\n");
19261926
gen_specs($f, $prolog."\t", $specs);

0 commit comments

Comments
 (0)