opcodes.h 12 KB

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