1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00
Commit Graph

124048 Commits

Author SHA1 Message Date
Hao Sun 191fb2a364 Updates for commits between 121a0f7 and 12dcf34
1. Pre-allocated bytes are missing in function
zend_jit_assign_const_stub().

2. 'w' register should be used for macro SET_ZVAL_TYPE_INFO.

3. 'w' register should be used to load "num_args" in function
zend_jit_do_fcall().

4. Remove the local path name in test case recv_002.phpt

5. One option is disabled temporarily in [1] and several test cases
would fail, e.g. shift_right_003.phpt. I suppose new execution paths are
touched. We will support them in the near future.

[1] https://github.com/php/php-src/commit/63d673d
2021-05-18 15:32:26 +03:00
Dmitry Stogov 4e291d8d83 Support for DOUBLE math 2021-05-18 15:32:26 +03:00
Dmitry Stogov 621830e46e Support for most cases of BOOL/BOOL_NOT/JMPZNZ/JMP[N]Z_EX 2021-05-18 15:32:26 +03:00
Dmitry Stogov ecee82c4ff Support for passing extra arguments.
Fixed ext/opcache/tests/jit/recv_001.phpt
2021-05-18 15:32:26 +03:00
Dmitry Stogov 73d5f43d8c Support for RECV/RECV_INIT 2021-05-18 15:32:26 +03:00
Dmitry Stogov 67b03e4a00 Support for bitwise operations with non-integer arguments 2021-05-18 15:32:26 +03:00
Dmitry Stogov b0c488a237 Support for bitwise operations with the same operands ($a ^ $a) 2021-05-18 15:32:26 +03:00
Dmitry Stogov f1c89c3900 Support for IS_LONG SUB and XOR. 2021-05-18 15:32:26 +03:00
Dmitry Stogov 63d674525b Support for missed case in zend_jit_tail_handler().
Fixed ext/opcache/tests/jit/ignored_opcodes.phpt
2021-05-18 15:32:26 +03:00
Dmitry Stogov 5d5c165a7b Support for most "uncommon" ASSIGN cases 2021-05-18 15:32:26 +03:00
Dmitry Stogov b12340fc46 Added tests for ASSIGN 2021-05-18 15:32:26 +03:00
Dmitry Stogov c12157700a Trmporary disable PROFITABILITY_CHECKS for better test coverage 2021-05-18 15:32:26 +03:00
Dmitry Stogov f24a8a2a24 Avoid useless "flags" byte extraction (it was inspired by unsuitable x86
specific optimization)
2021-05-18 15:32:25 +03:00
Dmitry Stogov ea15f90833 Use NIY_STUB instead of NIY in stubs 2021-05-18 15:32:25 +03:00
Dmitry Stogov 72981bf004 Replace "brk #0" with "NIY" (Not Implemented Yet) macro 2021-05-18 15:32:25 +03:00
Hao Sun 3bbc9fdfaf Support failed JIT test case: reg_alloc_002.phpt
Opcodes FE_RESET_R and FE_FETCH_R are met for the first time. Updates in
funtions zend_jit_fe_reset() and zend_jit_fe_fetch() are made to support
them.

Besides, one new path is covered in function zend_jit_inc_dec() for
opcode POST_INC.
2021-05-18 15:32:25 +03:00
Hao Sun c8c4132811 Support failed JIT test case: reg_alloc_003.phpt
Opcodes for $test are:

  BB0:
  0000 #1.CV0($char_code) [rc1, rcn, any] = RECV 1

  BB1:
  0001 #2.T1 [rc1, ...] = BW_AND #1.CV0($char_code) ...
  0002 #3.T2 [bool] RANGE[0..1] = BOOL_NOT #2.T1 [rc1, ...]
  0003 #4.T1 [bool] RANGE[0..1] = IS_EQUAL #1.CV0($char_code) ...
  0004 JMPZ #4.T1 [bool] RANGE[0..1] BB3
  ...

New path is covered in function zend_jit_long_math_helper() for opcode
BW_AND.

New path is covered in function zend_jit_bool_jmpznz() for opcode
BOOL_NOT.

Major changes lie in functions zend_jit_cmp(), zend_jit_cmp_slow() and
zend_jit_check_exception_undef_result() to support opocdes IS_EQUAL and
JMPZ.
2021-05-18 15:32:25 +03:00
Hao Sun f133644796 Support failed JIT test case: jmpz_ex_001.phpt
Opcodes for $Test::method are:

  BB0:
  0000 #0.T0 [rcn, any] = FETCH_OBJ_R THIS string("prop")
  0001 #1.T0 [bool] RANGE[0..1] = JMPZ_EX #0.T0 [rcn, any] BB3

  BB1:
  0002 #2.T1 [rcn, any] = FETCH_OBJ_R THIS string("prop")
  0003 INIT_METHOD_CALL 0 #2.T1 [rcn, any] string("method2")
  0004 #3.V1 [ref, rc1, rcn, any] = DO_FCALL
  ...

New path is covered in functions zend_jit_fetch_obj() and
zend_jit_zval_copy_deref() for FETCH_OBJ_R THIS opcode.

New path is covered in function zend_jit_init_method_call() for opcode
INIT_METHOD_CALL.

Major chagnes lie in function zend_jit_bool_jmpznz() to support opcode
JMPZ_EX.

Note that macro ZVAL_DTOR_FUNC is updated to remove the hard-coded use
of REG0.
2021-05-18 15:32:25 +03:00
Hao Sun 0a975548b0 Support failed JIT test case: jmpz_001.phpt
Opcode SEND_VAR_EX used in $test and opcode ZEND_SEND_VAR_NO_REF_EX used
in $main cover two new branches in function zend_jit_send_var()
respectively.

The updates in function zend_jit_bool_jmpznz() are made to support
opcode JMPNZ_EX used in $test.
2021-05-18 15:32:25 +03:00
Hao Sun 7309d5a705 Support failed JIT test case: send_var_ex_001.phpt
Opcodes for function $evaluate are:

  BB0:
  0000 ASSIGN_OBJ THIS string("evalParameters")
  0001 OP_DATA array(...)
  0002 INIT_NS_FCALL_BY_NAME 2 string("A\extract")
  0003 CHECK_FUNC_ARG 1
  0004 V1 = FETCH_OBJ_FUNC_ARG (ref) THIS string("evalParameters")
  0005 SEND_FUNC_ARG V1 1
  0006 T1 = FETCH_CONSTANT (unqualified-in-namespace) ...
  0007 SEND_VAL_EX T1 2
  0008 DO_FCALL_BY_NAME
  ...

Major changes are made in function zend_jit_fetch_constant() to support
FETCH_CONSTANT opcode.

Besdies, cold code is touched in functions zend_jit_check_func_arg() and
zend_jit_send_var() for opcodes CHECK_FUNC_ARG and SEND_FUNC_ARG
respectively.
2021-05-18 15:32:25 +03:00
Hao Sun 4c872ba24a Support failed JIT test case: send_val_001.phpt
Updates in function zend_jit_type_check() are made to support TYPE_CHECK
opcode for statement "is_array($type)".

New path is touched in function zend_jit_concat_helper() to support
opcode CONCAT for statement "$type ."ops"".

Besides, one new path is covered in function zend_jit_return() when
leaving.
2021-05-18 15:32:25 +03:00
Hao Sun f11b4407fb Support failed JIT test case: send_ref_001.phpt
Part of generated opcodes for $foo are:

  ...
  BB1:
  0002 INIT_FCALL 1 96 string("foo")
  0003 #5.V1 [rcn, object (instanceof A)] = FETCH_THIS
  0004 SEND_REF #5.V1 [rcn, object (instanceof A)] 1
  0005 DO_UCALL

Updates in functions zend_jit_fetch_this() and zend_jit_load_this() are
made to support FETCH_THIS opcode.

One new path is covered in function zend_jit_send_ref()  by SEND_REF
opcode.
2021-05-18 15:32:25 +03:00
Hao Sun bb67754722 Support failed JIT test case: mod_001.phpt
Instructions 'cqo' + 'idiv' are used in x86 to conduct MOD operation.
Specific registers RDX:RAX are used.

We use instructions 'sdiv' + 'msub' to accomplish the equivalent
functionality[1], and there is no such contrain on registers.

Similary to left/right shift operations in the previous patches,
boundary values, i.e. the second operand is 0 or -1, are handled.

[1]
https://stackoverflow.com/questions/35351470/obtaining-remainder-using-single-aarch64-instruction
2021-05-18 15:32:25 +03:00
Hao Sun bddad32201 Support failed JIT test case: shift_right_003.phpt
The following opcodes would be generated:

  ...
  BB1:
  0003 JMP BB3

  BB2:
  0004 INIT_FCALL 1 96 string("chr")
  0005 #10.T3 [long] = SR #3.CV0($int) [long] #7.CV2($i) ...
  0006 #11.T4 [long] RANGE[0..127] = BW_AND #10.T3 [long] ...
  0007 #12.T3 [long] RANGE[128..255] = BW_OR #11.T4 [long] ...
  0008 SEND_VAL #12.T3 [long] RANGE[128..255] 1
  0009 #13.V3 [ref, rc1, rcn, any] = DO_ICALL
  0010 ASSIGN_OP (CONCAT) #6.CV1($out) [rc1, rcn, string]
  0011 ADD #7.CV2($i)... int(7) #7.CV2($i) ... -> #15.CV2($i) ...

  BB3:
  0012 #8.T4 [long] = SR #3.CV0($int) #7.CV2($i) [long, double]
  0013 #9.T3 [bool] RANGE[0..1] = IS_SMALLER int(128) #8.T4
  0014 JMPNZ #9.T3 [bool] RANGE[0..1] BB2
  ...

Main changes are:
1. SR opcode covers new path in function zend_jit_long_math_helper().
2. BW_AND and BW_OR opcodes are supported. See macro LONG_OP.
3. Function zend_jit_concat_helper() is added to support ASSIGN_OP
opcode. Speficically, CONCAT and FAST_CONCAT is supported for statements
"$out .= ...".
4. New path is covered in function zend_jit_cmp_long_long() by
IS_SMALLER opcode.
5. New path is covered in macros ZVAL_PTR_DTOR and ZVAL_DTOR_FUNC when
leaving.
2021-05-18 15:32:25 +03:00
Hao Sun 2f7f11d06f Support failed JIT test case: shift_right_001.phpt
Similar to left shift, it's trivial to support right shift.

Note that bot shift_right_001.phpt and shift_right_002.phpt can pass
with this patch.
2021-05-18 15:32:25 +03:00
Hao Sun 17d0be85ee Support failed JIT test case: shift_left_002.phpt
This patch handles the case where the second operand is constant.
2021-05-18 15:32:24 +03:00
Hao Sun 1d4fdbd4e9 Support failed JIT test case: shift_left_001.phpt
This patch supports SL opcode. The range of the second operand is
checked against 0 and 64. If the second operand is negative, exception
would be raised. If the second operand is >= 64, the result is 0.

Besides, new path in macro ZVAL_COPY_VLAUE is covered for RETURN opcode.
2021-05-18 15:32:24 +03:00
Hao Sun a5f7af2b2a Support failed JIT test case: cmp_003.phpt
This test case is a big one. This patch mainly handles
smart_branch_opcode cases in function zend_jit_cmp_double_common().

Note that I failed to construct test cases to verify whether the missing
NaN check in x86 is buggy or not. One TODO is left to remind us when the
relevant code is touched.
2021-05-18 15:32:24 +03:00
Hao Sun f8a275d685 Support failed JIT test case: cmp_004.phpt
The following opcodes would be generated for $foo:

  0000 #2.CV0($test) [bool] RANGE[0..1] = RECV 1
  0001 #3.CV1($x) [long] RANGE[MIN..MAX] = RECV 2
  0002 JMPZ #2.CV0($test) [bool] RANGE[0..1] BB4
  0003 #4.T2 [bool] ... = IS_SMALLER_OR_EQUAL int(1) #3.CV1($x) ...
  0004 JMP BB5
  ...

The updates in function zend_jit_verify_arg_type() are made to support
RECV opcode.

The updates in function zend_jit_bool_jmpznz() are made to support JMPZ
opcode.

New path is covered in functions zend_jit_cmp() and
zend_jit_cmp_long_long() for IS_SMALLER_OR_EQUAL opcode.
2021-05-18 15:32:24 +03:00
Hao Sun b3519ad59d Support failed JIT test case: cmp_002.phpt
'smart_branch_opcode' JMPZ is used in this test case. Similar to the
previous patch, I still didn't get why NaN check is missing for the
cases ">" and ">=". In our implementation, we add such checks.
2021-05-18 15:32:24 +03:00
Hao Sun 91f4171577 Support failed JIT test case: cmp_001.phpt
Comparison between LONG and DOUBLE is (partially) supported in a similar
way to comparison between two LONG values. See the updates in function
zend_jit_cmp().

Key difference lies in handling NaN.

1. Instruction 'fcmp' is used to substitue 'ucomisd' in x86
implementation. Both of them raise invalid operation exception only when
either source operand is an SNaN.[1][2]

2. Parity flag is used in x86 to check whether either operand is NaN.[3]
I think this is QNaN case. As for AArch64, we use instruction 'bvs'.[4]

It's worthing noting that condition codes have different meanings for
floating-point comparions(e.g. 'fcmp')[4] compared to the
general-purpose comparisons(e.g. 'cmp').[5] For instance, 'b.hs' after
'fcmp' can check not only the cases "greater than, equal to" but also
the case "unordered"(that is NaN). We may simply treat it as a
combination of  'jae' and 'jp' in x86.

3. Instruction 'SETcc' is used in x86 for the case of ">=" or ">".
Note that flag "swap" is set in implementation, and it falls into cases
ZEND_IS_SMALLER or ZEND_IS_SMALLER_OR_EQUAL. We can use 'cset' in
AArch64.

However, it's weird that the NaN check is missing in x86. I suppose it
might be a bug. Take the case ">=" as an example. The two operands can
be  either DOUBLE + LONG or DOUBLE + DOUBLE. See the relevant code where
flag "swap" is set(i.e. function zend_jit_cmp_double_long() and function
zend_jit_cmp_double_double()). For the case "NaN >= 1.0", the expected
result should be FALSE, however, JIT/x86 would produce TRUE due to the
following "setae al". Unfortunately I haven't constructed one test case
to trigger that.

In our implementation, we choose to follow the case of "<" or "<=", and
I believe our implementation is safe anyway..

4. Temporary FP register is also needed and we reserve v16. See the
updates in file zend_jit_arm64.h.

5. Macro SET_ZVAL_TYPE_INFO_FROM_REG is misused in function
zend_jit_zval_copy_deref(). The second argument should be 32-bit long
and we fix it.

Note that simple test cases involving NaN are tested locally. I believe
it would get deeper testing by cmp_003.phpt(we will support it later).

[1]
https://developer.arm.com/documentation/dui0204/f/vector-floating-point-programming/vfp-instructions/fcmp?lang=en
[2] https://www.felixcloutier.com/x86/ucomisd
[3] https://en.wikipedia.org/wiki/Parity_flag
[4]
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/condition-codes-4-floating-point-comparisons-using-vfp
[5]
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/condition-codes-1-condition-flags-and-codes
2021-05-18 15:32:24 +03:00
Hao Sun e78e9a6e10 Support failed JIT test case: fetch_obj_001.phpt
This test case is a big one. Major changes are:

1. statement "foo($obj->a)"
One new path is covered in function zend_jit_fetch_obj() for the
involved FETCH_OBJ_W opcode. See the update around label 5.
Opcode SEND_REF is used. The updates in function zend_jit_send_ref() are
made to support it. Note that macro FREE_OP is executed for the first
time. Temproray registers are passed since they are used inside. As a
result, its use sites are updated accordingly.

2. statement "$a = array()" in $foo2
One new path in function zend_jit_assign_to_variable() is covered.

3. statements involving variable $d in $bar
One new path in function zend_jit_fetch_obj() is covered. See the
updates around label 7.

Note that in macro EMALLOC, condition ZEND_DEBUG can be covered by DEBUG
build, i.e. "./configure --enable-debug".
2021-05-18 15:32:24 +03:00
Hao Sun b7f7df6c06 Fix one bug in macro IF_GC_MAY_NOT_LEAK
Instruction is misused. 'dword', i.e. 32 bits, are loaded from memory.
Hence, 'ldr' should be used rather than 'ldrh'.
2021-05-18 15:32:24 +03:00
Hao Sun 9512fa4c06 Add necessary assertions on range for INIT_FCALL and DO_FCALL
Range checks are needed before encoding them into AArch64 instructions
as immediates.
2021-05-18 15:32:24 +03:00
Dmitry Stogov c8b2fa72b4 JIT/AArch64: INIT_FCALL and DO_FCALL support for optimized function code-generation (1204/1205) 2021-05-18 15:32:24 +03:00
Dmitry Stogov 1f9f1b3216 Replace --SKIPIF-- by --EXTENSIONS-- 2021-05-18 15:32:24 +03:00
Hao Sun 97766b6b28 Support failed JIT test case: fetch_obj_003.phpt
Opcode ASSIGN_OBJ_OP is used for statement "$x->a += 2;". The updates in
function zend_jit_assign_obj_op() are made to support this opcode.
2021-05-18 15:32:24 +03:00
Hao Sun 27ddf3f12b Support failed JIT test case: fetch_obj_002.phpt
One new path is covered inside function zend_jit_fetch_obj() due to the
use of FETCH_OBJ_R opcode. Note that function zend_jit_zval_copy_deref()
is invoked along this new path.

Updates in function zend_jit_free() are made to support FREE opcode.

Stub function zend_jit_leave_function_stub() is touched for the first
time.
2021-05-18 15:32:24 +03:00
Hao Sun ad5328b9fe Support failed JIT test case: fetch_obj_004.phpt
Opcode ASSIGN_OBJ is generated for statement "$x->a = 1;" and one new
path in function zend_jit_assign_obj() is covered. Note that function
zend_jit_assign_to_variable_call() is invoked along this new path.

Besides, helper function zend_objects_store_del() is used as the dtor
for objects.
2021-05-18 15:32:24 +03:00
Hao Sun ee4a429609 Support failed JIT test case: fetch_dim_rw_001.phpt
Opcode FETCH_DIM_RW is not touched before and the udpates in function
zend_jit_fetch_dim() and zend_jit_fetch_dimension_address_inner() are
made to support it.

Besides, one new path is covered in function zend_jit_return() when
leaving.
2021-05-18 15:32:24 +03:00
Hao Sun c5d6fc0363 Support failed JIT test case: fetch_dim_r_002.phpt
The opcodes for function $foo are:

  0001 INIT_FCALL 1 96 string("var_dump")
  0002 #2.T1 [null, long] = FETCH_DIM_R array(...) #1.CV0($n) [...]
  0003 SEND_VAL #2.T1 [null, long] 1
  0004 DO_ICALL
  0005 RETURN null

Opcode FETCH_DIM_R is not touched before, and the updates in function
zend_jit_fetch_dim_read() are made to support it.
As different types of arguments are used for $foo, several cases in
function zend_jit_fetch_dimension_address_inner() are covered as well.

Besides, opcode DO_ICALL can reach one site of cold code in function
zend_jit_do_fcall().
2021-05-18 15:32:24 +03:00
Hao Sun 99118a6931 Support failed JIT test case: fetch_dim_func_args_001.phpt
1. For statement "$a->change($a = array("a" => range(1, 5)));", the
following opcodes will be generated:

  0002 ASSIGN CV0($a) V1
  0003 INIT_METHOD_CALL 1 CV0($a) string("change")
  0004 INIT_NS_FCALL_BY_NAME 2 string("A\range")
  0005 SEND_VAL_EX int(1) 1
  0006 SEND_VAL_EX int(5) 2
  0007 V1 = DO_FCALL_BY_NAME

The updates in function zend_jit_init_fcall(), zend_jit_send_val() and
zend_jit_do_fcall() are made to support INIT_NS_FCALL_BY_NAME,
SEND_VAL_EX and DO_FCALL_BY_NAME respectively.

2. For method $change(), opcode RECV is used to obtain the argument:

  0000 #1.CV0($config) [rc1, rcn, array of [any, ref]] = RECV 1

Accordingly the updates in functions zend_jit_recv() and
zend_jit_verify_arg_type() are made.

3. For statement "array_keys($config["a"])", the following opcodes will
be generated:

  0001 INIT_NS_FCALL_BY_NAME 1 string("A\array_keys")
  0002 CHECK_FUNC_ARG 1
  0003 #3.V1 [ref, rc1, rcn, any] = FETCH_DIM_FUNC_ARG #1.CV0($config)
     ... -> #2.CV0($config) [rc1, rcn, ...
  0004 SEND_FUNC_ARG #3.V1 [ref, rc1, rcn, any] 1
  0005 #4.V1 [ref, rc1, rcn, any] = DO_FCALL_BY_NAME

CHECK_FUNC_ARG and SEND_FUNC_ARG are not supported before. See the
updates in functions zend_jit_check_func_arg() and zend_jit_send_var().

Besides, a new path is covered in macro OBJ_RELEASE when leaving.
2021-05-18 15:32:24 +03:00
Hao Sun 3748319f77 Support failed JIT test case: assign_035.phpt
1. For statement "echo $a->test()", opcode INIT_METHOD_CALL is
involved. The updates in function zend_jit_init_method_call() and
zend_jit_push_call_frame() are made to support it.

2. The updates in function zend_jit_leave_func() are made to support the
RETURN opcode used in functions $closure and $test.

3. The updates in function zend_jit_assign_to_variable() are used to
support statement "$x = $arr".

4. The updates in function zend_jit_fetch_dimension_address_inner() and
zend_jit_simple_assign() are made to support statement "$x['a'] =
$closure()", where opcode ASSIGN_DIM is involved.
2021-05-18 15:32:23 +03:00
Hao Sun 77b3d71a16 Support failed JIT test case: assign_036.phpt
This patch mainly supports the opcode FETCH_OBJ_R for statement
"$a->result = "okey";".
2021-05-18 15:32:23 +03:00
Hao Sun cb0dc59333 Support failed JIT test case: assign_static_prop_001.phpt
For function Foo(), the original handlers would be invoked for the first
two statements. And the third statement "$a = 42", where ASSIGN opcode
is involved, covers the cold code in function
zend_jit_assign_to_variable().

For function $main(), statement "var_dump(Foo::$prop);" covers a new
path in function zend_ jit_send_val() for SEND_VAL opcode.

Besides, another 2 test cases, i.e. fetch_dim_r_003.phpt and
fetch_dim_r_004.phpt, would pass as well with this patch.
2021-05-18 15:32:23 +03:00
Hao Sun 54a40ecd28 Support failed JIT test case: assign_dim_002.phpt
There are 6 user function calls in this test cases. The first 3
functions, i.e. foo(), foo1() and foo2(), can be supported already. In
this patch, we mainly focus on foo3(). Note that based on my test, once
foo3() gets supported, the remaining functions foo4() and foo5() can
pass as well.

Regarding function foo3(), we mainly focus on statement "$array = new
ArrayObject();", and the following two opcodes are involved.

  0009 V2 = NEW 0 string("ArrayObject")
  0010 DO_FCALL

Accordingly, functions zend_jit_handler(), zend_jit_cond_jmp() and
zend_jit_do_fcall() are invoked to generate the machine code. See the
handling process for case ZEND_NEW at file zend_jit.c. Hence, major
changes in this patch are made to support this statement.

Note that the updates at line 4840 in function zend_jit_do_fcall() are
made to support the later internal function call, i.e. var_dump().

Note that another test "noval_001.phpt" would pass with this patch as
well.
2021-05-18 15:32:23 +03:00
Hao Sun 3c21fac1f3 Support failed JIT test case: assign_dim_op_001.phpt
This test case covers one new path in macro TRY_ADDREF, touching macro
GC_ADDREF for the first time.
2021-05-18 15:32:23 +03:00
Hao Sun 70a0b183c0 Support failed JIT test case: assign_026.phpt
For statement "$a = new stdClass;", opcode NEW is used and JIT would
invoke the original handler at runtime.

Our major changes are made to support statements "$a->a=1;" and
"$a->b=2;" where opcode ASSIGN_OBJ are used.
2021-05-18 15:32:23 +03:00
Hao Sun 5538a4cee8 Support failed JIT test case: assign_025.phpt
Major changes are:
1. Support opcode FETCH_DIM_W for "$arr[0][0] = $ref;" in the loop. See
the updates in function zend_jit_fetch_dim().
2. Spill the registers and store the values into memory. See the updates
in function zend_jit_spill_store(). This is done for Phi function.
3. Invoke function zend_array_destory() as dtor for arrays. This is done
by zend_jit_free_cv() when leaving the function foo().
2021-05-18 15:32:23 +03:00
Hao Sun d7ae4d04ba Support failed JIT test case: assign_022.phpt
Major changes are made to support statement "$a[0] = $unref", where
opcode ASSIGN_DIM is involved.

Besides, one bug in macro GC_DELREF is fixed. The reference count would
be further checked after decreasing in macro ZVAL_PTR_DTOR, hence,
instruction "subs" should be used to set the flags. After fixing this
bug, external function zend_jit_array_free() is used as the dtor for the
array "$a".
2021-05-18 15:32:23 +03:00