modernc.org/cc@v1.0.1/v2/testdata/_sqlite/src/opcodes.h (about) 1 /************** Begin file opcodes.h *****************************************/ 2 /* Automatically generated. Do not edit */ 3 /* See the tool/mkopcodeh.tcl script for details */ 4 #define OP_Savepoint 0 5 #define OP_AutoCommit 1 6 #define OP_Transaction 2 7 #define OP_SorterNext 3 /* jump */ 8 #define OP_PrevIfOpen 4 /* jump */ 9 #define OP_NextIfOpen 5 /* jump */ 10 #define OP_Prev 6 /* jump */ 11 #define OP_Next 7 /* jump */ 12 #define OP_Checkpoint 8 13 #define OP_JournalMode 9 14 #define OP_Vacuum 10 15 #define OP_VFilter 11 /* jump, synopsis: iplan=r[P3] zplan='P4' */ 16 #define OP_VUpdate 12 /* synopsis: data=r[P3@P2] */ 17 #define OP_Goto 13 /* jump */ 18 #define OP_Gosub 14 /* jump */ 19 #define OP_InitCoroutine 15 /* jump */ 20 #define OP_Yield 16 /* jump */ 21 #define OP_MustBeInt 17 /* jump */ 22 #define OP_Jump 18 /* jump */ 23 #define OP_Not 19 /* same as TK_NOT, synopsis: r[P2]= !r[P1] */ 24 #define OP_Once 20 /* jump */ 25 #define OP_If 21 /* jump */ 26 #define OP_IfNot 22 /* jump */ 27 #define OP_IfNullRow 23 /* jump, synopsis: if P1.nullRow then r[P3]=NULL, goto P2 */ 28 #define OP_SeekLT 24 /* jump, synopsis: key=r[P3@P4] */ 29 #define OP_SeekLE 25 /* jump, synopsis: key=r[P3@P4] */ 30 #define OP_SeekGE 26 /* jump, synopsis: key=r[P3@P4] */ 31 #define OP_SeekGT 27 /* jump, synopsis: key=r[P3@P4] */ 32 #define OP_NoConflict 28 /* jump, synopsis: key=r[P3@P4] */ 33 #define OP_NotFound 29 /* jump, synopsis: key=r[P3@P4] */ 34 #define OP_Found 30 /* jump, synopsis: key=r[P3@P4] */ 35 #define OP_SeekRowid 31 /* jump, synopsis: intkey=r[P3] */ 36 #define OP_NotExists 32 /* jump, synopsis: intkey=r[P3] */ 37 #define OP_Last 33 /* jump */ 38 #define OP_IfSmaller 34 /* jump */ 39 #define OP_SorterSort 35 /* jump */ 40 #define OP_Sort 36 /* jump */ 41 #define OP_Rewind 37 /* jump */ 42 #define OP_IdxLE 38 /* jump, synopsis: key=r[P3@P4] */ 43 #define OP_IdxGT 39 /* jump, synopsis: key=r[P3@P4] */ 44 #define OP_IdxLT 40 /* jump, synopsis: key=r[P3@P4] */ 45 #define OP_IdxGE 41 /* jump, synopsis: key=r[P3@P4] */ 46 #define OP_RowSetRead 42 /* jump, synopsis: r[P3]=rowset(P1) */ 47 #define OP_Or 43 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */ 48 #define OP_And 44 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */ 49 #define OP_RowSetTest 45 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */ 50 #define OP_Program 46 /* jump */ 51 #define OP_FkIfZero 47 /* jump, synopsis: if fkctr[P1]==0 goto P2 */ 52 #define OP_IfPos 48 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */ 53 #define OP_IfNotZero 49 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */ 54 #define OP_IsNull 50 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */ 55 #define OP_NotNull 51 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */ 56 #define OP_Ne 52 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */ 57 #define OP_Eq 53 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */ 58 #define OP_Gt 54 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */ 59 #define OP_Le 55 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */ 60 #define OP_Lt 56 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */ 61 #define OP_Ge 57 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */ 62 #define OP_ElseNotEq 58 /* jump, same as TK_ESCAPE */ 63 #define OP_DecrJumpZero 59 /* jump, synopsis: if (--r[P1])==0 goto P2 */ 64 #define OP_IncrVacuum 60 /* jump */ 65 #define OP_VNext 61 /* jump */ 66 #define OP_Init 62 /* jump, synopsis: Start at P2 */ 67 #define OP_Return 63 68 #define OP_EndCoroutine 64 69 #define OP_HaltIfNull 65 /* synopsis: if r[P3]=null halt */ 70 #define OP_Halt 66 71 #define OP_Integer 67 /* synopsis: r[P2]=P1 */ 72 #define OP_Int64 68 /* synopsis: r[P2]=P4 */ 73 #define OP_String 69 /* synopsis: r[P2]='P4' (len=P1) */ 74 #define OP_Null 70 /* synopsis: r[P2..P3]=NULL */ 75 #define OP_SoftNull 71 /* synopsis: r[P1]=NULL */ 76 #define OP_Blob 72 /* synopsis: r[P2]=P4 (len=P1) */ 77 #define OP_Variable 73 /* synopsis: r[P2]=parameter(P1,P4) */ 78 #define OP_Move 74 /* synopsis: r[P2@P3]=r[P1@P3] */ 79 #define OP_Copy 75 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */ 80 #define OP_SCopy 76 /* synopsis: r[P2]=r[P1] */ 81 #define OP_IntCopy 77 /* synopsis: r[P2]=r[P1] */ 82 #define OP_ResultRow 78 /* synopsis: output=r[P1@P2] */ 83 #define OP_CollSeq 79 84 #define OP_AddImm 80 /* synopsis: r[P1]=r[P1]+P2 */ 85 #define OP_RealAffinity 81 86 #define OP_Cast 82 /* synopsis: affinity(r[P1]) */ 87 #define OP_Permutation 83 88 #define OP_BitAnd 84 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */ 89 #define OP_BitOr 85 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */ 90 #define OP_ShiftLeft 86 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */ 91 #define OP_ShiftRight 87 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */ 92 #define OP_Add 88 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */ 93 #define OP_Subtract 89 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */ 94 #define OP_Multiply 90 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */ 95 #define OP_Divide 91 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */ 96 #define OP_Remainder 92 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */ 97 #define OP_Concat 93 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */ 98 #define OP_Compare 94 /* synopsis: r[P1@P3] <-> r[P2@P3] */ 99 #define OP_BitNot 95 /* same as TK_BITNOT, synopsis: r[P1]= ~r[P1] */ 100 #define OP_Column 96 /* synopsis: r[P3]=PX */ 101 #define OP_String8 97 /* same as TK_STRING, synopsis: r[P2]='P4' */ 102 #define OP_Affinity 98 /* synopsis: affinity(r[P1@P2]) */ 103 #define OP_MakeRecord 99 /* synopsis: r[P3]=mkrec(r[P1@P2]) */ 104 #define OP_Count 100 /* synopsis: r[P2]=count() */ 105 #define OP_ReadCookie 101 106 #define OP_SetCookie 102 107 #define OP_ReopenIdx 103 /* synopsis: root=P2 iDb=P3 */ 108 #define OP_OpenRead 104 /* synopsis: root=P2 iDb=P3 */ 109 #define OP_OpenWrite 105 /* synopsis: root=P2 iDb=P3 */ 110 #define OP_OpenDup 106 111 #define OP_OpenAutoindex 107 /* synopsis: nColumn=P2 */ 112 #define OP_OpenEphemeral 108 /* synopsis: nColumn=P2 */ 113 #define OP_SorterOpen 109 114 #define OP_SequenceTest 110 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */ 115 #define OP_OpenPseudo 111 /* synopsis: P3 columns in r[P2] */ 116 #define OP_Close 112 117 #define OP_ColumnsUsed 113 118 #define OP_Sequence 114 /* synopsis: r[P2]=cursor[P1].ctr++ */ 119 #define OP_NewRowid 115 /* synopsis: r[P2]=rowid */ 120 #define OP_Insert 116 /* synopsis: intkey=r[P3] data=r[P2] */ 121 #define OP_InsertInt 117 /* synopsis: intkey=P3 data=r[P2] */ 122 #define OP_Delete 118 123 #define OP_ResetCount 119 124 #define OP_SorterCompare 120 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */ 125 #define OP_SorterData 121 /* synopsis: r[P2]=data */ 126 #define OP_RowData 122 /* synopsis: r[P2]=data */ 127 #define OP_Rowid 123 /* synopsis: r[P2]=rowid */ 128 #define OP_NullRow 124 129 #define OP_SeekEnd 125 130 #define OP_SorterInsert 126 /* synopsis: key=r[P2] */ 131 #define OP_IdxInsert 127 /* synopsis: key=r[P2] */ 132 #define OP_IdxDelete 128 /* synopsis: key=r[P2@P3] */ 133 #define OP_DeferredSeek 129 /* synopsis: Move P3 to P1.rowid if needed */ 134 #define OP_IdxRowid 130 /* synopsis: r[P2]=rowid */ 135 #define OP_Destroy 131 136 #define OP_Real 132 /* same as TK_FLOAT, synopsis: r[P2]=P4 */ 137 #define OP_Clear 133 138 #define OP_ResetSorter 134 139 #define OP_CreateBtree 135 /* synopsis: r[P2]=root iDb=P1 flags=P3 */ 140 #define OP_SqlExec 136 141 #define OP_ParseSchema 137 142 #define OP_LoadAnalysis 138 143 #define OP_DropTable 139 144 #define OP_DropIndex 140 145 #define OP_DropTrigger 141 146 #define OP_IntegrityCk 142 147 #define OP_RowSetAdd 143 /* synopsis: rowset(P1)=r[P2] */ 148 #define OP_Param 144 149 #define OP_FkCounter 145 /* synopsis: fkctr[P1]+=P2 */ 150 #define OP_MemMax 146 /* synopsis: r[P1]=max(r[P1],r[P2]) */ 151 #define OP_OffsetLimit 147 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */ 152 #define OP_AggStep0 148 /* synopsis: accum=r[P3] step(r[P2@P5]) */ 153 #define OP_AggStep 149 /* synopsis: accum=r[P3] step(r[P2@P5]) */ 154 #define OP_AggFinal 150 /* synopsis: accum=r[P1] N=P2 */ 155 #define OP_Expire 151 156 #define OP_TableLock 152 /* synopsis: iDb=P1 root=P2 write=P3 */ 157 #define OP_VBegin 153 158 #define OP_VCreate 154 159 #define OP_VDestroy 155 160 #define OP_VOpen 156 161 #define OP_VColumn 157 /* synopsis: r[P3]=vcolumn(P2) */ 162 #define OP_VRename 158 163 #define OP_Pagecount 159 164 #define OP_MaxPgcnt 160 165 #define OP_PureFunc0 161 166 #define OP_Function0 162 /* synopsis: r[P3]=func(r[P2@P5]) */ 167 #define OP_PureFunc 163 168 #define OP_Function 164 /* synopsis: r[P3]=func(r[P2@P5]) */ 169 #define OP_CursorHint 165 170 #define OP_Noop 166 171 #define OP_Explain 167 172 173 /* Properties such as "out2" or "jump" that are specified in 174 ** comments following the "case" for each opcode in the vdbe.c 175 ** are encoded into bitvectors as follows: 176 */ 177 #define OPFLG_JUMP 0x01 /* jump: P2 holds jmp target */ 178 #define OPFLG_IN1 0x02 /* in1: P1 is an input */ 179 #define OPFLG_IN2 0x04 /* in2: P2 is an input */ 180 #define OPFLG_IN3 0x08 /* in3: P3 is an input */ 181 #define OPFLG_OUT2 0x10 /* out2: P2 is an output */ 182 #define OPFLG_OUT3 0x20 /* out3: P3 is an output */ 183 #define OPFLG_INITIALIZER {\ 184 /* 0 */ 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,\ 185 /* 8 */ 0x00, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01,\ 186 /* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0x03, 0x03, 0x01,\ 187 /* 24 */ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,\ 188 /* 32 */ 0x09, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\ 189 /* 40 */ 0x01, 0x01, 0x23, 0x26, 0x26, 0x0b, 0x01, 0x01,\ 190 /* 48 */ 0x03, 0x03, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\ 191 /* 56 */ 0x0b, 0x0b, 0x01, 0x03, 0x01, 0x01, 0x01, 0x02,\ 192 /* 64 */ 0x02, 0x08, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00,\ 193 /* 72 */ 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\ 194 /* 80 */ 0x02, 0x02, 0x02, 0x00, 0x26, 0x26, 0x26, 0x26,\ 195 /* 88 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x00, 0x12,\ 196 /* 96 */ 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\ 197 /* 104 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ 198 /* 112 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,\ 199 /* 120 */ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x04, 0x04,\ 200 /* 128 */ 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10,\ 201 /* 136 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,\ 202 /* 144 */ 0x10, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00,\ 203 /* 152 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\ 204 /* 160 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ 205 } 206 207 /* The sqlite3P2Values() routine is able to run faster if it knows 208 ** the value of the largest JUMP opcode. The smaller the maximum 209 ** JUMP opcode the better, so the mkopcodeh.tcl script that 210 ** generated this include file strives to group all JUMP opcodes 211 ** together near the beginning of the list. 212 */ 213 #define SQLITE_MX_JUMP_OPCODE 62 /* Maximum JUMP opcode */ 214 215 /************** End of opcodes.h *********************************************/