#include <sp_head.h>
Classes |
struct | Backpatch_info |
Detailed Description
sp_parser_data provides a scope for attributes used at the SP-parsing stage only.
Definition at line 135 of file sp_head.h.
Member Function Documentation
Put the instruction on the backpatch list, associated with the label.
- Parameters
-
i | The SP-instruction. |
label | The label. |
- Returns
- Error flag.
Definition at line 2004 of file sp_head.cc.
Add a SP-instruction to the current level.
- Parameters
-
- Returns
- Error flag.
Definition at line 2031 of file sp_head.cc.
void sp_parser_data::do_backpatch |
( |
sp_label * |
label, |
|
|
uint |
dest |
|
) |
| |
Update all instruction with the given label in the backpatch list to the given instruction pointer.
- Parameters
-
label | The label. |
dest | The instruction pointer. |
Definition at line 2018 of file sp_head.cc.
void sp_parser_data::do_cont_backpatch |
( |
uint |
dest | ) |
|
Backpatch (and pop) the current level to the given instruction pointer.
- Parameters
-
dest | The instruction pointer. |
Definition at line 2038 of file sp_head.cc.
void sp_parser_data::finish_parsing_sp_body |
( |
THD * |
thd | ) |
|
|
inline |
Finish parsing of a stored program body statement.
This method switches THD::mem_root and THD::free_list back when SP-body parsing is completed.
- Parameters
-
Definition at line 179 of file sp_head.h.
bool sp_parser_data::is_parsing_sp_body |
( |
| ) |
const |
|
inline |
- Return values
-
true | if SP-body statement is being parsed. |
false | otherwise. |
Definition at line 207 of file sp_head.h.
bool sp_parser_data::new_cont_backpatch |
( |
| ) |
|
|
inline |
Start a new backpatch level for the SP-instruction requiring continue destination. If the SP-instruction is NULL, the level is just increased.
- Note
- Only subclasses of sp_lex_branch_instr need backpatching of continue destinations (and no other classes do):
That's why the methods below accept sp_lex_branch_instr to make this relationship clear. And these two functions are the only places where set_cont_dest() is used, so set_cont_dest() is also a member of sp_lex_branch_instr.
- Todo:
- These functions should probably be declared in a separate interface class, but currently we try to minimize the sp_instr hierarchy.
- Returns
- false always.
Definition at line 346 of file sp_head.h.
const char* sp_parser_data::pop_expr_start_ptr |
( |
| ) |
|
|
inline |
Retrieve expression start pointer in the query string.
This function is named 'pop' to highlight that it changes the internal state, and two subsequent calls may not return same value.
- Note
- It's true only in the debug mode, but this check is very useful in the parser to ensure we "pop" every "pushed" pointer, because we have lots of branches, and it's pretty easy to forget something somewhere.
Definition at line 226 of file sp_head.h.
void sp_parser_data::push_expr_start_ptr |
( |
const char * |
expr_start_ptr | ) |
|
|
inline |
Remember expression start pointer in the query string.
This function is named 'push' to highlight that the pointer must be retrieved (pop) later.
- See Also
- the note for pop_expr_start_ptr().
Definition at line 246 of file sp_head.h.
void sp_parser_data::start_parsing_sp_body |
( |
THD * |
thd, |
|
|
sp_head * |
sp |
|
) |
| |
Start parsing a stored program body statement.
This method switches THD::mem_root and THD::free_list in order to parse SP-body. The current values are kept to be restored after the body statement is parsed.
- Parameters
-
thd | Thread context. |
sp | Stored Program being parsed. |
Definition at line 1994 of file sp_head.cc.
The documentation for this class was generated from the following files: