MySQL 9.0.0
Source Code Documentation
|
This is base class for all kinds of jump instructions. More...
#include <sp_instr.h>
Public Member Functions | |
sp_instr_jump (uint ip, sp_pcontext *ctx) | |
sp_instr_jump (uint ip, sp_pcontext *ctx, uint dest) | |
void | print (const THD *thd, String *str) override |
bool | execute (THD *, uint *nextp) override |
Execute this instruction. More... | |
uint | opt_mark (sp_head *sp, List< sp_instr > *leads) override |
Mark this instruction as reachable during optimization and return the index to the next instruction. More... | |
uint | opt_shortcut_jump (sp_head *sp, sp_instr *start) override |
Short-cut jumps to jumps during optimization. More... | |
void | opt_move (uint dst, List< sp_branch_instr > *ibp) override |
Inform the instruction that it has been moved during optimization. More... | |
void | set_destination (uint old_dest, uint new_dest) override |
Update the destination; used by the SP-instruction-optimizer. More... | |
void | backpatch (uint dest) override |
Update all instruction with the given label in the backpatch list to the specified instruction pointer. More... | |
PSI_statement_info * | get_psi_info () override |
Public Member Functions inherited from sp_instr | |
sp_instr (uint ip, sp_pcontext *ctx) | |
~sp_instr () override | |
uint | get_ip () const |
virtual uint | get_cont_dest () const |
Get the continuation destination (instruction pointer for the CONTINUE HANDLER) of this instruction. More... | |
sp_pcontext * | get_parsing_ctx () const |
bool | opt_is_marked () const |
virtual SQL_I_List< Item_trigger_field > * | get_instr_trig_field_list () |
Public Member Functions inherited from sp_printable | |
virtual | ~sp_printable ()=default |
Public Member Functions inherited from sp_branch_instr | |
virtual | ~sp_branch_instr ()=default |
Static Public Attributes | |
static PSI_statement_info | psi_info |
Protected Attributes | |
uint | m_dest |
Where we will go. More... | |
sp_instr * | m_optdest |
Protected Attributes inherited from sp_instr | |
bool | m_marked |
Show if this instruction is reachable within the SP (used by SP-optimizer). More... | |
uint | m_ip |
Instruction pointer. More... | |
sp_pcontext * | m_parsing_ctx |
Instruction parsing context. More... | |
Additional Inherited Members | |
Public Attributes inherited from sp_instr | |
Query_arena | m_arena |
Protected Member Functions inherited from sp_instr | |
void | clear_da (THD *thd) const |
Clear diagnostics area. More... | |
This is base class for all kinds of jump instructions.
|
inline |
|
inline |
|
inlineoverridevirtual |
Update all instruction with the given label in the backpatch list to the specified instruction pointer.
dest | destination instruction pointer. |
Implements sp_branch_instr.
Reimplemented in sp_instr_hpush_jump.
|
inlineoverridevirtual |
Execute this instruction.
thd | Thread context | |
[out] | nextp | index of the next instruction to execute. (For most instructions this will be the instruction following this one). Note that this parameter is undefined in case of errors, use get_cont_dest() to find the continuation instruction for CONTINUE error handlers. |
Implements sp_instr.
Reimplemented in sp_instr_hpush_jump, and sp_instr_hreturn.
|
inlineoverridevirtual |
Implements sp_instr.
Reimplemented in sp_instr_hpush_jump, and sp_instr_hreturn.
Mark this instruction as reachable during optimization and return the index to the next instruction.
Jump instruction will add their destination to the leads list.
Reimplemented from sp_instr.
Reimplemented in sp_instr_hpush_jump, and sp_instr_hreturn.
|
overridevirtual |
Inform the instruction that it has been moved during optimization.
Most instructions will simply update its index, but jump instructions must also take care of their destination pointers. Forward jumps get pushed to the backpatch list 'ibp'.
Reimplemented from sp_instr.
Short-cut jumps to jumps during optimization.
This is used by the jump instructions' opt_mark() methods. 'start' is the starting point, used to prevent the mark sweep from looping for ever. Return the end destination.
Reimplemented from sp_instr.
Reimplemented in sp_instr_hpush_jump, and sp_instr_hreturn.
Implements sp_printable.
Reimplemented in sp_instr_hpush_jump, and sp_instr_hreturn.
|
inlineoverridevirtual |
Update the destination; used by the SP-instruction-optimizer.
old_dest | current (old) destination (instruction pointer). |
new_dest | new destination (instruction pointer). |
Implements sp_branch_instr.
|
protected |
Where we will go.
|
protected |
|
static |