diff options
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r-- | Zend/zend_vm_execute.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 1e888d7b6a..5ece46b0fd 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -59177,6 +59177,38 @@ ZEND_API void zend_deserialize_opcode_handler(zend_op *op) op->handler = zend_opcode_handlers[(zend_uintptr_t)op->handler]; } +ZEND_API const void *zend_get_real_opcode_handler(const zend_op *op) +{ +#if ZEND_VM_KIND == ZEND_VM_KIND_CALL + return op->handler; +#elif ZEND_VM_KIND == ZEND_VM_KIND_HYBRID + zval *zv; + + if (!zend_handlers_table) { + init_opcode_serialiser(); + } + zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler); + ZEND_ASSERT(zv != NULL); + return zend_opcode_real_handlers[Z_LVAL_P(zv)]; +#else + return NULL; +#endif +} + +ZEND_API const zend_op *zend_get_real_exit_op(void) +{ +#if ZEND_VM_KIND == ZEND_VM_KIND_HYBRID + return &hybrid_return_op; +#else + return NULL; +#endif +} + +ZEND_API int zend_vm_kind(void) +{ + return ZEND_VM_KIND; +} + static const void *zend_vm_get_opcode_handler_ex(uint32_t spec, const zend_op* op) { static const int zend_vm_decode[] = { |