Skip to content

Commit 6eedfb9

Browse files
committed
Fixed direct threaded executor (php zend_vm_gen.php --with-vm-kind=GOTO)
1 parent 91bddbe commit 6eedfb9

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Zend/zend_vm_def.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4764,10 +4764,11 @@ ZEND_VM_HANDLER(144, ZEND_ADD_INTERFACE, ANY, CONST)
47644764

47654765
ZEND_VM_HANDLER(154, ZEND_ADD_TRAIT, ANY, ANY)
47664766
{
4767-
zend_op *opline = EX(opline);
4767+
USE_OPLINE
47684768
zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
47694769
zend_class_entry *trait;
47704770

4771+
SAVE_OPLINE();
47714772
if (CACHED_PTR(opline->op2.literal->cache_slot)) {
47724773
trait = CACHED_PTR(opline->op2.literal->cache_slot);
47734774
} else {
@@ -4793,11 +4794,12 @@ ZEND_VM_HANDLER(154, ZEND_ADD_TRAIT, ANY, ANY)
47934794

47944795
ZEND_VM_HANDLER(155, ZEND_BIND_TRAITS, ANY, ANY)
47954796
{
4796-
zend_op *opline = EX(opline);
4797+
USE_OPLINE
47974798
zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
47984799

4800+
SAVE_OPLINE();
47994801
zend_do_bind_traits(ce TSRMLS_CC);
4800-
4802+
CHECK_EXCEPTION();
48014803
ZEND_VM_NEXT_OPCODE();
48024804
}
48034805

Zend/zend_vm_execute.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,10 +990,11 @@ static int ZEND_FASTCALL ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
990990

991991
static int ZEND_FASTCALL ZEND_ADD_TRAIT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
992992
{
993-
zend_op *opline = EX(opline);
993+
USE_OPLINE
994994
zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
995995
zend_class_entry *trait;
996996

997+
SAVE_OPLINE();
997998
if (CACHED_PTR(opline->op2.literal->cache_slot)) {
998999
trait = CACHED_PTR(opline->op2.literal->cache_slot);
9991000
} else {
@@ -1019,11 +1020,12 @@ static int ZEND_FASTCALL ZEND_ADD_TRAIT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
10191020

10201021
static int ZEND_FASTCALL ZEND_BIND_TRAITS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
10211022
{
1022-
zend_op *opline = EX(opline);
1023+
USE_OPLINE
10231024
zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
10241025

1026+
SAVE_OPLINE();
10251027
zend_do_bind_traits(ce TSRMLS_CC);
1026-
1028+
CHECK_EXCEPTION();
10271029
ZEND_VM_NEXT_OPCODE();
10281030
}
10291031

0 commit comments

Comments
 (0)