Skip to content

Commit 1ed80ba

Browse files
committed
Merge branch 'origin/master'
2 parents 8448da6 + cf96153 commit 1ed80ba

37 files changed

+648
-323
lines changed

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,6 @@ PHP 8.6 UPGRADE NOTES
125125

126126
- Standard:
127127
. Improved performance of array_fill_keys().
128+
. Improved performance of array_unshift().
129+
. Improved performance of array_walk().
130+
. Improved performance of intval('+0b...', 2) and intval('0b...', 2).

UPGRADING.INTERNALS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ PHP 8.6 INTERNALS UPGRADE NOTES
4141
stored instead.
4242
. The zend_active_function{_ex}() functions now return a const zend_function
4343
pointer.
44+
. The zend_get_call_trampoline_func() API now takes the __call or
45+
__callStatic zend_function* instead of a CE and a boolean argument.
46+
. The zend_set_hash_symbol() API has been removed.
47+
. Added zend_hash_str_lookup().
4448

4549
========================
4650
2. Build system changes

Zend/asm/jump_s390x_sysv_elf_gas.S

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@
4949
.type jump_fcontext, @function
5050

5151
#define ARG_OFFSET 0
52-
#define GR_OFFSET 16
53-
#define FP_OFFSET 96
54-
#define FPC_OFFSET 160
55-
#define PC_OFFSET 168
56-
#define CONTEXT_SIZE 176
52+
#define GR_OFFSET 16
53+
#define R14_OFFSET 88
54+
#define FP_OFFSET 96
55+
#define FPC_OFFSET 160
56+
#define PC_OFFSET 168
57+
#define CONTEXT_SIZE 176
5758

5859
#define REG_SAVE_AREA_SIZE 160
5960

@@ -131,11 +132,14 @@ jump_fcontext:
131132
ltg %r2,GR_OFFSET(%r15)
132133
jnz use_return_slot
133134

134-
/* We restore a make_fcontext context. Use the function
135-
argument slot in the context we just saved and allocate the
136-
register save area for the target function. */
137-
la %r2,ARG_OFFSET(%r1)
138-
aghi %r15,-REG_SAVE_AREA_SIZE
135+
/* We're restoring a context created by make_fcontext.
136+
This is going to be the argument of the entry point
137+
of the fiber. We're placing it on top of the ABI
138+
defined register save area of the fiber's own stack. */
139+
la %r2,REG_SAVE_AREA_SIZE(%r15)
140+
141+
/* REG_SAVE_AREA_SIZE + sizeof(transfer_t) */
142+
aghi %r15,-(REG_SAVE_AREA_SIZE+16)
139143

140144
use_return_slot:
141145
/* Save the two fields in transfer_t. When calling a

Zend/asm/jump_sparc64_sysv_elf_gas.S

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
*/
77

88
/*
9-
* typedef struct {
10-
* void *handle;
11-
* zend_fiber_transfer *transfer;
12-
* } boost_context_data;
9+
* typedef void* fcontext_t;
1310
*
14-
* boost_context_data jump_fcontext(void *to, zend_fiber_transfer *transfer);
11+
* struct transfer_t {
12+
* fcontext_t fctx;
13+
* void * data;
14+
* };
15+
*
16+
* transfer_t jump_fcontext(fcontext_t const to, void *vp);
1517
*/
1618
#define CC64FSZ 176
1719
#define BIAS 2047

Zend/asm/jump_x86_64_ms_pe_gas.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
.file "jump_x86_64_ms_pe_gas.asm"
9090
.text
9191
.p2align 4,,15
92+
.globl jump_fcontext
9293
.def jump_fcontext; .scl 2; .type 32; .endef
9394
.seh_proc jump_fcontext
9495
jump_fcontext:
@@ -203,3 +204,6 @@ jump_fcontext:
203204
/* indirect jump to context */
204205
jmp *%r10
205206
.seh_endproc
207+
208+
.section .drectve
209+
.ascii " -export:\"jump_fcontext\""

Zend/asm/make_s390x_sysv_elf_gas.S

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
.type make_fcontext, @function
5050

5151
#define ARG_OFFSET 0
52-
#define GR_OFFSET 16
53-
#define R14_OFFSET 88
54-
#define FP_OFFSET 96
55-
#define FPC_OFFSET 160
56-
#define PC_OFFSET 168
57-
#define CONTEXT_SIZE 176
52+
#define GR_OFFSET 16
53+
#define R14_OFFSET 88
54+
#define FP_OFFSET 96
55+
#define FPC_OFFSET 160
56+
#define PC_OFFSET 168
57+
#define CONTEXT_SIZE 176
5858

5959
/*
6060
@@ -72,7 +72,7 @@ r4 - The address of the context function
7272
make_fcontext:
7373
.machine "z10"
7474
/* Align the stack to an 8 byte boundary. */
75-
nill %r2,0xfff0
75+
nill %r2,0xfff8
7676

7777
/* Allocate stack space for the context. */
7878
aghi %r2,-CONTEXT_SIZE

Zend/asm/make_sparc64_sysv_elf_gas.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
/*
9-
* void *make_fcontext(void *sp, size_t size, void (*fn)(boost_context_data));
9+
* fcontext_t *make_fcontext(void *sp, size_t size, void (*fn)(transfer_t));
1010
*/
1111
#define CC64FSZ 176
1212
#define BIAS 2047
@@ -56,7 +56,7 @@ make_fcontext:
5656
trampoline:
5757
ldx [%sp + BIAS + I7], %l0
5858

59-
# no need to setup boost_context_data, already in %o0 and %o1
59+
# no need to setup transfer_t, already in %o0 and %o1
6060
jmpl %l0, %o7
6161
nop
6262

Zend/asm/make_x86_64_ms_pe_gas.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
.file "make_x86_64_ms_pe_gas.asm"
9090
.text
9191
.p2align 4,,15
92+
.globl make_fcontext
9293
.def make_fcontext; .scl 2; .type 32; .endef
9394
.seh_proc make_fcontext
9495
make_fcontext:
@@ -168,3 +169,6 @@ finish:
168169
.seh_endproc
169170

170171
.def _exit; .scl 2; .type 32; .endef /* standard C library function */
172+
173+
.section .drectve
174+
.ascii " -export:\"make_fcontext\""

Zend/tests/concat/concat_003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (getenv('SKIP_PERF_SENSITIVE')) die("skip performance sensitive test");
1111
$time = microtime(TRUE);
1212

1313
/* This might vary on Linux/Windows, so the worst case and also count in slow machines. */
14-
$t_max = 1.0;
14+
$t_max = 2.0;
1515

1616
$datas = array_fill(0, 220000, [
1717
'000.000.000.000',

Zend/zend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ typedef struct {
442442
BEGIN_EXTERN_C()
443443
ZEND_API void zend_save_error_handling(zend_error_handling *current);
444444
ZEND_API void zend_replace_error_handling(zend_error_handling_t error_handling, zend_class_entry *exception_class, zend_error_handling *current);
445-
ZEND_API void zend_restore_error_handling(zend_error_handling *saved);
445+
ZEND_API void zend_restore_error_handling(const zend_error_handling *saved);
446446
ZEND_API void zend_begin_record_errors(void);
447447
ZEND_API void zend_emit_recorded_errors(void);
448448
ZEND_API void zend_emit_recorded_errors_ex(uint32_t num_errors, zend_error_info **errors);

0 commit comments

Comments
 (0)