Skip to content

Commit 28ea360

Browse files
authored
Merge branch 'master' into early-statement
2 parents 65ed141 + d154c72 commit 28ea360

29 files changed

+671
-308
lines changed

Zend/zend_ini_scanner.l

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,16 +352,16 @@ restart:
352352
/*!re2c
353353
re2c:yyfill:check = 0;
354354
LNUM [0-9]+
355-
DNUM ([0-9]*[\.][0-9]+)|([0-9]+[\.][0-9]*)
355+
DNUM ([0-9]*[.][0-9]+)|([0-9]+[.][0-9]*)
356356
NUMBER [-]?{LNUM}|{DNUM}
357357
ANY_CHAR (.|[\n\t])
358358
NEWLINE ("\r"|"\n"|"\r\n")
359359
TABS_AND_SPACES [ \t]
360360
WHITESPACE [ \t]+
361361
CONSTANT [a-zA-Z_][a-zA-Z0-9_]*
362-
LABEL_CHAR [^=\n\r\t;&|^$~(){}!"\[\]\x00]
362+
LABEL_CHAR [^=\n\r\t;&|^$~(){}!"[\]\x00]
363363
LABEL ({LABEL_CHAR}+)
364-
TOKENS [:,.\[\]"'()&|^+-/*=%$!~<>?@{}]
364+
TOKENS [:,.[\]"'()&|^+-/*=%$!~<>?@{}]
365365
OPERATORS [&|^~()!]
366366
DOLLAR_CURLY "${"
367367

Zend/zend_language_scanner.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,11 +1817,11 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_
18171817
RETURN_TOKEN(T_MUL_EQUAL);
18181818
}
18191819

1820-
<ST_IN_SCRIPTING>"*\*" {
1820+
<ST_IN_SCRIPTING>"**" {
18211821
RETURN_TOKEN(T_POW);
18221822
}
18231823

1824-
<ST_IN_SCRIPTING>"*\*=" {
1824+
<ST_IN_SCRIPTING>"**=" {
18251825
RETURN_TOKEN(T_POW_EQUAL);
18261826
}
18271827

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,6 @@ AC_CHECK_FUNCS(m4_normalize([
540540
getgrnam_r
541541
gethostname
542542
getloadavg
543-
getlogin
544543
getprotobyname
545544
getprotobynumber
546545
getpwnam_r

docs/release-process.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ slightly different steps. We'll call attention where the steps differ.
210210
> Do *not* bump the API versions after RC1.
211211
212212
5. Compile and run `make test`, with and without ZTS (Zend Thread Safety), using
213-
the correct Bison and re2c versions, e.g., for PHP 7.4, Bison 3.0.0 and re2c
214-
0.13.4 are required, as a minimum.
213+
the correct Bison and re2c versions, e.g., for PHP 8.5, Bison 3.0.0 and re2c
214+
1.0.3 are required, as a minimum.
215215
216216
For example:
217217
@@ -555,8 +555,8 @@ slightly different steps. We'll call attention where the steps differ.
555555
an example.
556556
557557
6. Compile and run `make test`, with and without ZTS (Zend Thread Safety), using
558-
the correct Bison and re2c versions, e.g., for PHP 7.4, Bison 3.0.0 and re2c
559-
0.13.4 are required, as a minimum.
558+
the correct Bison and re2c versions, e.g., for PHP 8.5, Bison 3.0.0 and re2c
559+
1.0.3 are required, as a minimum.
560560
561561
For example:
562562

ext/mysqlnd/mysqlnd_vio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#ifndef PHP_WIN32
2727
#include <netinet/tcp.h>
2828
#else
29-
#include <winsock.h>
29+
#include <winsock2.h>
3030
#endif
3131

3232

ext/opcache/jit/ir/ir.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,9 @@ ir_ref ir_proto(ir_ctx *ctx, uint8_t flags, ir_type ret_type, uint32_t params_co
803803
proto->flags = flags;
804804
proto->ret_type = ret_type;
805805
proto->params_count = params_count;
806-
memcpy(proto->param_types, param_types, params_count);
806+
if (params_count) {
807+
memcpy(proto->param_types, param_types, params_count);
808+
}
807809
return ir_strl(ctx, (const char *)proto, offsetof(ir_proto_t, param_types) + params_count);
808810
}
809811

ext/opcache/jit/ir/ir.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,9 @@ void ir_gdb_unregister_all(void);
854854
bool ir_gdb_present(void);
855855

856856
/* IR load API (implementation in ir_load.c) */
857+
#define IR_RESOLVE_SYM_ADD_THUNK (1<<0)
858+
#define IR_RESOLVE_SYM_SILENT (1<<1)
859+
857860
struct _ir_loader {
858861
uint32_t default_func_flags;
859862
bool (*init_module) (ir_loader *loader, const char *name, const char *filename, const char *target);
@@ -870,7 +873,7 @@ struct _ir_loader {
870873
bool (*sym_data_end) (ir_loader *loader, uint32_t flags);
871874
bool (*func_init) (ir_loader *loader, ir_ctx *ctx, const char *name);
872875
bool (*func_process) (ir_loader *loader, ir_ctx *ctx, const char *name);
873-
void*(*resolve_sym_name) (ir_loader *loader, const char *name, bool add_thunk);
876+
void*(*resolve_sym_name) (ir_loader *loader, const char *name, uint32_t flags);
874877
bool (*has_sym) (ir_loader *loader, const char *name);
875878
bool (*add_sym) (ir_loader *loader, const char *name, void *addr);
876879
};

ext/opcache/jit/ir/ir_aarch64.dasc

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4366,11 +4366,15 @@ static void ir_emit_va_arg(ir_ctx *ctx, ir_ref def, ir_insn *insn)
43664366
ir_backend_data *data = ctx->data;
43674367
dasm_State **Dst = &data->dasm_state;
43684368
ir_type type = insn->type;
4369-
ir_reg def_reg = ctx->regs[def][0];
4369+
ir_reg def_reg = IR_REG_NUM(ctx->regs[def][0]);
43704370
ir_reg op2_reg = ctx->regs[def][2];
43714371
ir_reg tmp_reg = ctx->regs[def][3];
43724372
int32_t offset;
43734373

4374+
if (ctx->use_lists[def].count == 1) {
4375+
/* dead load */
4376+
return;
4377+
}
43744378
IR_ASSERT(def_reg != IR_REG_NONE && tmp_reg != IR_REG_NONE);
43754379
if (op2_reg != IR_REG_NONE) {
43764380
if (IR_REG_SPILLED(op2_reg)) {
@@ -4394,11 +4398,15 @@ static void ir_emit_va_arg(ir_ctx *ctx, ir_ref def, ir_insn *insn)
43944398
ir_backend_data *data = ctx->data;
43954399
dasm_State **Dst = &data->dasm_state;
43964400
ir_type type = insn->type;
4397-
ir_reg def_reg = ctx->regs[def][0];
4401+
ir_reg def_reg = IR_REG_NUM(ctx->regs[def][0]);
43984402
ir_reg op2_reg = ctx->regs[def][2];
43994403
ir_reg tmp_reg = ctx->regs[def][3];
44004404
int32_t offset;
44014405

4406+
if (ctx->use_lists[def].count == 1) {
4407+
/* dead load */
4408+
return;
4409+
}
44024410
IR_ASSERT(def_reg != IR_REG_NONE && tmp_reg != IR_REG_NONE);
44034411
if (op2_reg != IR_REG_NONE) {
44044412
if (IR_REG_SPILLED(op2_reg)) {
@@ -4935,6 +4943,28 @@ static void ir_emit_tailcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
49354943
return;
49364944
}
49374945

4946+
/* Move op2 to a tmp register before epilogue if it's in
4947+
* used_preserved_regs, because it will be overridden. */
4948+
4949+
ir_reg op2_reg = IR_REG_NONE;
4950+
if (!IR_IS_CONST_REF(insn->op2)) {
4951+
op2_reg = ctx->regs[def][2];
4952+
IR_ASSERT(op2_reg != IR_REG_NONE);
4953+
4954+
if (IR_REG_SPILLED(op2_reg)) {
4955+
op2_reg = IR_REG_INT_TMP;
4956+
ir_emit_load(ctx, IR_ADDR, op2_reg, insn->op2);
4957+
} else if (IR_REGSET_IN((ir_regset)ctx->used_preserved_regs, IR_REG_NUM(op2_reg))) {
4958+
ir_reg orig_op2_reg = op2_reg;
4959+
op2_reg = IR_REG_INT_TMP;
4960+
4961+
ir_type type = ctx->ir_base[insn->op2].type;
4962+
| ASM_REG_REG_OP mov, type, op2_reg, IR_REG_NUM(orig_op2_reg)
4963+
} else {
4964+
op2_reg = IR_REG_NUM(op2_reg);
4965+
}
4966+
}
4967+
49384968
ir_emit_epilogue(ctx);
49394969

49404970
if (IR_IS_CONST_REF(insn->op2)) {
@@ -4947,13 +4977,8 @@ static void ir_emit_tailcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
49474977
| br Rx(IR_REG_INT_TMP)
49484978
}
49494979
} else {
4950-
ir_reg op2_reg = ctx->regs[def][2];
4951-
49524980
IR_ASSERT(op2_reg != IR_REG_NONE);
4953-
if (IR_REG_SPILLED(op2_reg)) {
4954-
op2_reg = IR_REG_NUM(op2_reg);
4955-
ir_emit_load(ctx, IR_ADDR, op2_reg, insn->op2);
4956-
}
4981+
IR_ASSERT(!IR_REGSET_IN((ir_regset)ctx->used_preserved_regs, op2_reg));
49574982
| br Rx(op2_reg)
49584983
}
49594984
}

0 commit comments

Comments
 (0)