Last active
September 15, 2021 13:27
-
-
Save dstogov/8d97cf081538abb92646a321b6cf9b9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c | |
index 93c79bdce2..eceeed2733 100644 | |
--- a/ext/opcache/jit/zend_jit.c | |
+++ b/ext/opcache/jit/zend_jit.c | |
@@ -292,7 +292,7 @@ static int zend_jit_is_constant_cmp_long_long(const zend_op *opline, | |
return 0; | |
} | |
-static int zend_jit_needs_call_chain(zend_call_info *call_info, uint32_t b, const zend_op_array *op_array, zend_ssa *ssa, const zend_ssa_op *ssa_op, const zend_op *opline, zend_jit_trace_rec *trace) | |
+static int zend_jit_needs_call_chain(zend_call_info *call_info, uint32_t b, const zend_op_array *op_array, zend_ssa *ssa, const zend_ssa_op *ssa_op, const zend_op *opline, int call_level, zend_jit_trace_rec *trace) | |
{ | |
int skip; | |
@@ -368,7 +368,7 @@ static int zend_jit_needs_call_chain(zend_call_info *call_info, uint32_t b, cons | |
opline++; | |
ssa_op++; | |
- skip = 1; | |
+ skip = (call_level == 1); | |
while (opline != end) { | |
if (!skip) { | |
if (zend_may_throw(opline, ssa_op, op_array, ssa)) { | |
@@ -443,7 +443,7 @@ static int zend_jit_needs_call_chain(zend_call_info *call_info, uint32_t b, cons | |
opline++; | |
ssa_op++; | |
- skip = 1; | |
+ skip = (call_level == 1); | |
while (opline != end) { | |
if (skip) { | |
switch (opline->opcode) { | |
diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc | |
index cf48c42c07..105057f1c4 100644 | |
--- a/ext/opcache/jit/zend_jit_arm64.dasc | |
+++ b/ext/opcache/jit/zend_jit_arm64.dasc | |
@@ -8532,7 +8532,7 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t | |
return 0; | |
} | |
- if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, trace)) { | |
+ if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) { | |
if (!zend_jit_save_call_chain(Dst, call_level)) { | |
return 0; | |
} | |
@@ -8752,7 +8752,7 @@ static int zend_jit_init_method_call(dasm_State **Dst, | |
} | |
zend_jit_start_reuse_ip(); | |
- if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, trace)) { | |
+ if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) { | |
if (!zend_jit_save_call_chain(Dst, call_level)) { | |
return 0; | |
} | |
@@ -8831,7 +8831,7 @@ static int zend_jit_init_closure_call(dasm_State **Dst, | |
return 0; | |
} | |
- if (zend_jit_needs_call_chain(NULL, b, op_array, ssa, ssa_op, opline, trace)) { | |
+ if (zend_jit_needs_call_chain(NULL, b, op_array, ssa, ssa_op, opline, call_level, trace)) { | |
if (!zend_jit_save_call_chain(Dst, call_level)) { | |
return 0; | |
} | |
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc | |
index 56cde31911..dc0f92c8f3 100644 | |
--- a/ext/opcache/jit/zend_jit_x86.dasc | |
+++ b/ext/opcache/jit/zend_jit_x86.dasc | |
@@ -9114,7 +9114,7 @@ static int zend_jit_init_fcall(dasm_State **Dst, const zend_op *opline, uint32_t | |
return 0; | |
} | |
- if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, trace)) { | |
+ if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) { | |
if (!zend_jit_save_call_chain(Dst, call_level)) { | |
return 0; | |
} | |
@@ -9365,7 +9365,7 @@ static int zend_jit_init_method_call(dasm_State **Dst, | |
} | |
zend_jit_start_reuse_ip(); | |
- if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, trace)) { | |
+ if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) { | |
if (!zend_jit_save_call_chain(Dst, call_level)) { | |
return 0; | |
} | |
@@ -9458,7 +9458,7 @@ static int zend_jit_init_closure_call(dasm_State **Dst, | |
return 0; | |
} | |
- if (zend_jit_needs_call_chain(NULL, b, op_array, ssa, ssa_op, opline, trace)) { | |
+ if (zend_jit_needs_call_chain(NULL, b, op_array, ssa, ssa_op, opline, call_level, trace)) { | |
if (!zend_jit_save_call_chain(Dst, call_level)) { | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment