-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Zend: Convert certain fields to uint32_t #19479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
8b0ca9d
f5c7019
0d62c3f
49ff6e4
93cf649
7e191ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ | |
* php zend_vm_gen.php | ||
*/ | ||
|
||
#include <stdint.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is ignored (it doesn't end up in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I didn't even realize this header got added, will add to the skeleton |
||
|
||
ZEND_VM_HELPER(zend_add_helper, ANY, ANY, zval *op_1, zval *op_2) | ||
{ | ||
USE_OPLINE | ||
|
@@ -8151,7 +8153,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY) | |
} | ||
|
||
uint32_t throw_op_num = throw_op - EX(func)->op_array.opcodes; | ||
int i, current_try_catch_offset = -1; | ||
uint32_t current_try_catch_offset = -1; | ||
|
||
if ((throw_op->opcode == ZEND_FREE || throw_op->opcode == ZEND_FE_FREE) | ||
&& throw_op->extended_value & ZEND_FREE_ON_RETURN) { | ||
|
@@ -8162,7 +8164,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY) | |
const zend_live_range *range = find_live_range( | ||
&EX(func)->op_array, throw_op_num, throw_op->op1.var); | ||
/* free op1 of the corresponding RETURN */ | ||
for (i = throw_op_num; i < range->end; i++) { | ||
for (uint32_t i = throw_op_num; i < range->end; i++) { | ||
if (EX(func)->op_array.opcodes[i].opcode == ZEND_FREE | ||
|| EX(func)->op_array.opcodes[i].opcode == ZEND_FE_FREE) { | ||
/* pass */ | ||
|
@@ -8178,7 +8180,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY) | |
} | ||
|
||
/* Find the innermost try/catch/finally the exception was thrown in */ | ||
for (i = 0; i < EX(func)->op_array.last_try_catch; i++) { | ||
for (uint32_t i = 0; i < EX(func)->op_array.last_try_catch; i++) { | ||
zend_try_catch_element *try_catch = &EX(func)->op_array.try_catch_array[i]; | ||
if (try_catch->try_op > throw_op_num) { | ||
/* further blocks will not be relevant... */ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is
last_var
excluded?