Skip to content

Commit

Permalink
Repare SWITCH VM
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Apr 8, 2019
1 parent bdac9ef commit 7b8212f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Zend/zend_vm_gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
$prolog = $m[1];
out($f,$prolog."if (UNEXPECTED(execute_data == NULL)) {\n");
out($f,$prolog."\tstatic const void* labels[] = {\n");
gen_labels($f, $spec, ZEND_VM_KIND_GOTO, $prolog."\t\t", $specs);
gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_GOTO : $kind, $prolog."\t\t", $specs);
out($f,$prolog."\t};\n");
out($f,$prolog."\tzend_opcode_handlers = (const void **) labels;\n");
out($f,$prolog."\tzend_handlers_count = sizeof(labels) / sizeof(void*);\n");
Expand Down Expand Up @@ -1920,7 +1920,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,$prolog.$executor_name."_ex(NULL);\n");
} else {
out($f,$prolog."static const void *labels[] = {\n");
gen_labels($f, $spec, ZEND_VM_KIND_CALL, $prolog."\t", $specs, $switch_labels);
gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_CALL : $kind, $prolog."\t", $specs, $switch_labels);
out($f,$prolog."};\n");
out($f,$prolog."static const uint32_t specs[] = {\n");
gen_specs($f, $prolog."\t", $specs);
Expand Down

0 comments on commit 7b8212f

Please sign in to comment.