/ 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 Unified Diffs Ignore Whitespace Patch

Changes to tool/mkopcodeh.tcl.

198
199
200
201
202
203
204



205
206
207
208
209
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224
  if {![info exists used($i)]} {
    set def($i) "OP_NotUsed_$i"
  }
  if {$i>$max} {set max $i}
  set name $def($i)
  puts -nonewline [format {#define %-16s %3d} $name $i]
  set com {}



  if {[info exists sameas($i)]} {
    set com "same as $sameas($i)"
  }
  if {[info exists synopsis($name)]} {
    set x $synopsis($name)
    if {$com==""} {
      set com "synopsis: $x"
    } else {
      append com ", synopsis: $x"
    }
  }
  if {$com!=""} {

    puts -nonewline [format " /* %-42s */" $com]
  }
  puts ""
}

if {$max>255} {
  error "More than 255 opcodes - VdbeOp.opcode is of type u8!"
}







>
>
>

|


|
<
<
<
<
|
<
<
>
|







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212




213


214
215
216
217
218
219
220
221
222
  if {![info exists used($i)]} {
    set def($i) "OP_NotUsed_$i"
  }
  if {$i>$max} {set max $i}
  set name $def($i)
  puts -nonewline [format {#define %-16s %3d} $name $i]
  set com {}
  if {$jump($name)} {
    lappend com "jump"
  }
  if {[info exists sameas($i)]} {
    lappend com "same as $sameas($i)"
  }
  if {[info exists synopsis($name)]} {
    lappend com "synopsis: $synopsis($name)"




  }


  if {[llength $com]} {
    puts -nonewline [format " /* %-42s */" [join $com {, }]]
  }
  puts ""
}

if {$max>255} {
  error "More than 255 opcodes - VdbeOp.opcode is of type u8!"
}