SQLite

Check-in [d4ccf0f5c6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sure the OP_Next and OP_NextIfOpen opcodes are numbered close together for efficiency in switch() statements. OP_Prev and OP_PrevIfOpen too.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d4ccf0f5c656c8f0e1c32d5f7971b131f42c3cbd
User & Date: drh 2013-11-21 17:24:18.502
Context
2013-11-21
19:05
Remove a test from sqlite3VdbeMemFromBtree() which was unnecessary, and after the recent OP_Column refactoring, unreachable. (check-in: 23667f3ba0 user: drh tags: trunk)
17:24
Make sure the OP_Next and OP_NextIfOpen opcodes are numbered close together for efficiency in switch() statements. OP_Prev and OP_PrevIfOpen too. (check-in: d4ccf0f5c6 user: drh tags: trunk)
16:08
When one or more arguments to a function are constants, try to factor out just those arguments into initialization code. (check-in: 50d350abbc user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to mkopcodeh.awk.
132
133
134
135
136
137
138

139
140

141
142
143
144
145
146
147
     || name=="OP_Savepoint"     \
     || name=="OP_Checkpoint"    \
     || name=="OP_Vacuum"        \
     || name=="OP_JournalMode"   \
     || name=="OP_VUpdate"       \
     || name=="OP_VFilter"       \
     || name=="OP_Next"          \

     || name=="OP_SorterNext"    \
     || name=="OP_Prev"          \

    ){
      cnt++
      while( used[cnt] ) cnt++
      op[name] = cnt
      used[cnt] = 1
      def[cnt] = name
    }







>


>







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
     || name=="OP_Savepoint"     \
     || name=="OP_Checkpoint"    \
     || name=="OP_Vacuum"        \
     || name=="OP_JournalMode"   \
     || name=="OP_VUpdate"       \
     || name=="OP_VFilter"       \
     || name=="OP_Next"          \
     || name=="OP_NextIfOpen"    \
     || name=="OP_SorterNext"    \
     || name=="OP_Prev"          \
     || name=="OP_PrevIfOpen"    \
    ){
      cnt++
      while( used[cnt] ) cnt++
      op[name] = cnt
      used[cnt] = 1
      def[cnt] = name
    }