-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Added zend_get_opcode_flags() function #1610
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
Conversation
@@ -6475,7 +6475,7 @@ ZEND_VM_C_LABEL(fe_fetch_w_exit): | |||
ZEND_VM_NEXT_OPCODE(); | |||
} | |||
|
|||
ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED) | |||
ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED, VAR_FETCH) |
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.
This actually is ISSET|VAR_FETCH (both flags).
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.
right. I'll implement this.
In general, I like the patch, I just wonder whether some names are not descriptive enough or ambiguous. LINE => what type of line? opline? Additionally, we loose the ability to get the number of opcodes here, previously accessible through I'm just not sure whether some special cases which are directly tied to a specific opcode need their own flags (e.g. FRET, FCALL), after all we still need direct opcode comparisons, as, e.g. ZEND_CATCH has a bit of a special result variable. |
On Thu, Oct 29, 2015 at 12:36 AM, Bob Weinand notifications@github.com
Yeah - absolute opline number. I'll change this into OPLINE (or JMP_NUM)
Agree, REL_OPLINE (or JMP_REL)
Thanks. Dmitry.
|
I like the JMP_* identifiers :-) Thanks! |
On Thu, Oct 29, 2015 at 3:33 PM, Bob Weinand notifications@github.com
|
yeah, these are fine. |
renamed. On Thu, Oct 29, 2015 at 5:53 PM, Bob Weinand notifications@github.com
|
…e operands and extended_value meaning
- Added ZEND_VM_LAST_OPCODE macro - Use better names LINE->OPLINE, REL_LINE->REL_OPLINE, FCALL->FAST_CALL, FRET->FAST_RET - Added ISSET flag to extended value of ZEND_ISSET_ISEMPTY_VAR opcode
Added zend_get_opcode_flags() function to get information about opcode operands and extended_value meaning