MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Interpreter Class Reference

Public Types

enum  UnaryCondition { IS_NULL = 0, IS_NOT_NULL = 1 }
enum  BinaryCondition {
  EQ = 0, NE = 1, LT = 2, LE = 3,
  GT = 4, GE = 5, LIKE = 6, NOT_LIKE = 7,
  AND_EQ_MASK = 8, AND_NE_MASK = 9, AND_EQ_ZERO = 10, AND_NE_ZERO = 11
}
enum  InstructionPreProcessing { NONE, LABEL_ADDRESS_REPLACEMENT, SUB_ADDRESS_REPLACEMENT }

Public Member Functions

 STATIC_CONST (READ_ATTR_INTO_REG=1)
 STATIC_CONST (WRITE_ATTR_FROM_REG=2)
 STATIC_CONST (LOAD_CONST_NULL=3)
 STATIC_CONST (LOAD_CONST16=4)
 STATIC_CONST (LOAD_CONST32=5)
 STATIC_CONST (LOAD_CONST64=6)
 STATIC_CONST (ADD_REG_REG=7)
 STATIC_CONST (SUB_REG_REG=8)
 STATIC_CONST (BRANCH=9)
 STATIC_CONST (BRANCH_REG_EQ_NULL=10)
 STATIC_CONST (BRANCH_REG_NE_NULL=11)
 STATIC_CONST (BRANCH_EQ_REG_REG=12)
 STATIC_CONST (BRANCH_NE_REG_REG=13)
 STATIC_CONST (BRANCH_LT_REG_REG=14)
 STATIC_CONST (BRANCH_LE_REG_REG=15)
 STATIC_CONST (BRANCH_GT_REG_REG=16)
 STATIC_CONST (BRANCH_GE_REG_REG=17)
 STATIC_CONST (EXIT_OK=18)
 STATIC_CONST (EXIT_REFUSE=19)
 STATIC_CONST (CALL=20)
 STATIC_CONST (RETURN=21)
 STATIC_CONST (EXIT_OK_LAST=22)
 STATIC_CONST (BRANCH_ATTR_OP_ARG=23)
 STATIC_CONST (BRANCH_ATTR_EQ_NULL=24)
 STATIC_CONST (BRANCH_ATTR_NE_NULL=25)
 STATIC_CONST (BRANCH_ATTR_OP_ARG_2=26)

Static Public Member Functions

static Uint32 mod4 (Uint32 len)
static Uint32 Read (Uint32 AttrId, Uint32 Register)
static Uint32 Write (Uint32 AttrId, Uint32 Register)
static Uint32 LoadNull (Uint32 Register)
static Uint32 LoadConst16 (Uint32 Register, Uint32 Value)
static Uint32 LoadConst32 (Uint32 Register)
static Uint32 LoadConst64 (Uint32 Register)
static Uint32 Add (Uint32 DstReg, Uint32 SrcReg1, Uint32 SrcReg2)
static Uint32 Sub (Uint32 DstReg, Uint32 SrcReg1, Uint32 SrcReg2)
static Uint32 Branch (Uint32 Inst, Uint32 Reg1, Uint32 Reg2)
static Uint32 ExitOK ()
static Uint32 BranchCol (BinaryCondition cond, Uint32 arrayLengthDiff, Uint32 varchar)
static Uint32 BranchCol_2 (Uint32 AttrId)
static Uint32 BranchCol_2 (Uint32 AttrId, Uint32 Len)
static Uint32 BranchColParameter (BinaryCondition cond)
static Uint32 BranchColParameter_2 (Uint32 AttrId, Uint32 ParamNo)
static Uint32 getBinaryCondition (Uint32 op1)
static Uint32 getArrayLengthDiff (Uint32 op1)
static Uint32 isVarchar (Uint32 op1)
static Uint32 getBranchCol_AttrId (Uint32 op2)
static Uint32 getBranchCol_Len (Uint32 op2)
static Uint32 getBranchCol_ParamNo (Uint32 op2)
static Uint32 getOpCode (Uint32 op)
static Uint32 getReg1 (Uint32 op)
static Uint32 getReg2 (Uint32 op)
static Uint32 getReg3 (Uint32 op)
static Uint32 getLabel (Uint32 op)
static Uint32 * getInstructionPreProcessingInfo (Uint32 *op, InstructionPreProcessing &processing)

Detailed Description

Definition at line 23 of file Interpreter.hpp.

Member Enumeration Documentation

Instruction pre-processing required.

Definition at line 156 of file Interpreter.hpp.

Branch OP_ARG

i = Instruction - 5 Bits ( 0 - 5 ) max 63 a = Attribute id - 16 bits l = Length of string (bytes) - 16 bits OP_ARG p = parameter no - 16 bits OP_ARG_2 b = Branch offset (words) - 16 bits t = branch type - 4 bits d = Array length diff v = Varchar flag

      1111111111222222222233

01234567890123456789012345678901 iiiiii ddvttttbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaallllllllllllllll -string.... -

Definition at line 109 of file Interpreter.hpp.

Member Function Documentation

Uint32 Interpreter::getOpCode ( Uint32  op)
inlinestatic

Macros for decoding code

Definition at line 308 of file Interpreter.hpp.

Uint32 Interpreter::Read ( Uint32  AttrId,
Uint32  Register 
)
inlinestatic

Macros for creating code

Definition at line 173 of file Interpreter.hpp.

Here is the caller graph for this function:

Interpreter::STATIC_CONST ( READ_ATTR_INTO_REG  = 1)

General Mnemonic format

i = Instruction - 5 Bits ( 0 - 5 ) max 63 x = Register 1 - 3 Bits ( 6 - 8 ) max 7 y = Register 2 - 3 Bits ( 9 -11 ) max 7 b = Branch offset (only branches)

      1111111111222222222233

01234567890123456789012345678901 iiiiiixxxyyy bbbbbbbbbbbbbbbb Instructions


The documentation for this class was generated from the following file: