From: Dmitry Stogov Date: Wed, 10 Jul 2019 09:41:19 +0000 (+0300) Subject: Reduce cost for GC references to strings and resources in JIT X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db02d7ae757b8084b425544a34ea0598e7c2ab04;p=php Reduce cost for GC references to strings and resources in JIT --- diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 4c896b581f..9f37c95770 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -1296,6 +1296,10 @@ static void* dasm_labels[zend_lb_MAX]; | IF_NOT_ZVAL_FLAGS addr, IS_TYPE_REFCOUNTED, label |.endmacro +|.macro IF_NOT_ZVAL_COLLECTABLE, addr, label +| IF_NOT_ZVAL_FLAGS addr, IS_TYPE_COLLECTABLE, label +|.endmacro + |.macro GC_ADDREF, zv | add dword [zv], 1 |.endmacro @@ -1441,7 +1445,7 @@ static void* dasm_labels[zend_lb_MAX]; || if ((op_info) & MAY_BE_REF) { || zend_jit_addr ref_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, offsetof(zend_reference, val)); | IF_NOT_ZVAL_TYPE addr, IS_REFERENCE, >1 -| IF_NOT_ZVAL_REFCOUNTED ref_addr, >4 +| IF_NOT_ZVAL_COLLECTABLE ref_addr, >4 | GET_ZVAL_PTR FCARG1a, ref_addr |1: || }