/ Check-in [eef643a3]
Login

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

Overview
Comment:Show which opcodes are jumps in the comments when generating the opcodes.h header file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: eef643a369250f1acac4c01a9b3d29068a510e5bf7fa843d565df5e2523e4dd9
User & Date: drh 2017-08-02 03:21:52
Context
2017-08-02
11:04
Rearrange integer token values in the parser and logic in the resolveP2Values() routine for a small size reduction and performance increase. check-in: 1cad2926 user: drh tags: trunk
03:21
Show which opcodes are jumps in the comments when generating the opcodes.h header file. check-in: eef643a3 user: drh tags: trunk
03:21
Add the "%token" control to the lemon parser. Not currently used by SQLite. check-in: a6e4c5ae user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/mkopcodeh.tcl.

   198    198     if {![info exists used($i)]} {
   199    199       set def($i) "OP_NotUsed_$i"
   200    200     }
   201    201     if {$i>$max} {set max $i}
   202    202     set name $def($i)
   203    203     puts -nonewline [format {#define %-16s %3d} $name $i]
   204    204     set com {}
          205  +  if {$jump($name)} {
          206  +    lappend com "jump"
          207  +  }
   205    208     if {[info exists sameas($i)]} {
   206         -    set com "same as $sameas($i)"
          209  +    lappend com "same as $sameas($i)"
   207    210     }
   208    211     if {[info exists synopsis($name)]} {
   209         -    set x $synopsis($name)
   210         -    if {$com==""} {
   211         -      set com "synopsis: $x"
   212         -    } else {
   213         -      append com ", synopsis: $x"
   214         -    }
          212  +    lappend com "synopsis: $synopsis($name)"
   215    213     }
   216         -  if {$com!=""} {
   217         -    puts -nonewline [format " /* %-42s */" $com]
          214  +  if {[llength $com]} {
          215  +    puts -nonewline [format " /* %-42s */" [join $com {, }]]
   218    216     }
   219    217     puts ""
   220    218   }
   221    219   
   222    220   if {$max>255} {
   223    221     error "More than 255 opcodes - VdbeOp.opcode is of type u8!"
   224    222   }