#include <sp_head.h>
Inheritance diagram for sp_instr_jump:


Public Member Functions | |
| sp_instr_jump (uint ip, sp_pcontext *ctx) | |
| sp_instr_jump (uint ip, sp_pcontext *ctx, uint dest) | |
| virtual | ~sp_instr_jump () |
| virtual int | execute (THD *thd, uint *nextp) |
| virtual void | print (String *str) |
| virtual uint | opt_mark (sp_head *sp) |
| virtual uint | opt_shortcut_jump (sp_head *sp, sp_instr *start) |
| virtual void | opt_move (uint dst, List< sp_instr > *ibp) |
| virtual void | backpatch (uint dest, sp_pcontext *dst_ctx) |
| virtual void | set_destination (uint old_dest, uint new_dest) |
Private Member Functions | |
| sp_instr_jump (const sp_instr_jump &) | |
| void | operator= (sp_instr_jump &) |
Definition at line 733 of file sp_head.h.
| sp_instr_jump::sp_instr_jump | ( | const sp_instr_jump & | ) | [private] |
| sp_instr_jump::sp_instr_jump | ( | uint | ip, | |
| sp_pcontext * | ctx | |||
| ) | [inline] |
| sp_instr_jump::sp_instr_jump | ( | uint | ip, | |
| sp_pcontext * | ctx, | |||
| uint | dest | |||
| ) | [inline] |
| virtual sp_instr_jump::~sp_instr_jump | ( | ) | [inline, virtual] |
| virtual void sp_instr_jump::backpatch | ( | uint | dest, | |
| sp_pcontext * | dst_ctx | |||
| ) | [inline, virtual] |
| int sp_instr_jump::execute | ( | THD * | thd, | |
| uint * | nextp | |||
| ) | [virtual] |
Implements sp_instr.
Reimplemented in sp_instr_jump_if_not, sp_instr_hpush_jump, and sp_instr_hreturn.
Definition at line 2642 of file sp_head.cc.
References DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, and sp_instr_opt_meta::m_dest.
02643 { 02644 DBUG_ENTER("sp_instr_jump::execute"); 02645 DBUG_PRINT("info", ("destination: %u", m_dest)); 02646 02647 *nextp= m_dest; 02648 DBUG_RETURN(0); 02649 }
| void sp_instr_jump::operator= | ( | sp_instr_jump & | ) | [private] |
Reimplemented from sp_instr.
Reimplemented in sp_instr_jump_if_not, sp_instr_hpush_jump, and sp_instr_hreturn.
Definition at line 2662 of file sp_head.cc.
References sp_head::get_instr(), sp_instr_opt_meta::m_dest, sp_instr::m_ip, sp_instr_opt_meta::m_optdest, sp_instr::marked, and opt_shortcut_jump().
Referenced by sp_instr_hreturn::opt_mark().
02663 { 02664 m_dest= opt_shortcut_jump(sp, this); 02665 if (m_dest != m_ip+1) /* Jumping to following instruction? */ 02666 marked= 1; 02667 m_optdest= sp->get_instr(m_dest); 02668 return m_dest; 02669 }
Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented from sp_instr.
Reimplemented in sp_instr_jump_if_not.
Definition at line 2692 of file sp_head.cc.
References sp_instr_opt_meta::m_dest, sp_instr::m_ip, sp_instr_opt_meta::m_optdest, and List< T >::push_back().
Referenced by sp_instr_jump_if_not::opt_move().
02693 { 02694 if (m_dest > m_ip) 02695 bp->push_back(this); // Forward 02696 else if (m_optdest) 02697 m_dest= m_optdest->m_ip; // Backward 02698 m_ip= dst; 02699 }
Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented from sp_instr.
Reimplemented in sp_instr_jump_if_not, and sp_instr_hpush_jump.
Definition at line 2672 of file sp_head.cc.
References sp_head::get_instr(), sp_instr_opt_meta::m_dest, sp_instr::opt_shortcut_jump(), and start().
Referenced by opt_mark().
02673 { 02674 uint dest= m_dest; 02675 sp_instr *i; 02676 02677 while ((i= sp->get_instr(dest))) 02678 { 02679 uint ndest; 02680 02681 if (start == i || this == i) 02682 break; 02683 ndest= i->opt_shortcut_jump(sp, start); 02684 if (ndest == dest) 02685 break; 02686 dest= ndest; 02687 } 02688 return dest; 02689 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void sp_instr_jump::print | ( | String * | str | ) | [virtual] |
Implements sp_instr.
Reimplemented in sp_instr_jump_if_not, sp_instr_hpush_jump, and sp_instr_hreturn.
Definition at line 2652 of file sp_head.cc.
References sp_instr_opt_meta::m_dest, String::qs_append(), String::reserve(), SP_INSTR_UINT_MAXLEN, and STRING_WITH_LEN.
02653 { 02654 /* jump dest */ 02655 if (str->reserve(SP_INSTR_UINT_MAXLEN+5)) 02656 return; 02657 str->qs_append(STRING_WITH_LEN("jump ")); 02658 str->qs_append(m_dest); 02659 }
Here is the call graph for this function:

Implements sp_instr_opt_meta.
Reimplemented in sp_instr_jump_if_not.
Definition at line 770 of file sp_head.h.
References sp_instr_opt_meta::m_dest.
Referenced by sp_instr_jump_if_not::set_destination().
Here is the caller graph for this function:

1.4.7

