Bug 1477842 - Document zero-offset entries in tableswitch. r=jorendorff
authorMatthew Gaudet <mgaudet@mozilla.com>
Mon, 23 Jul 2018 17:10:15 -0400
changeset 487271 8ca1ecc2c0b863134e14ac1c444b7128a577d6a0
parent 487270 fb7b47d50f5944c47791fe20ae21033393ec6957
child 487272 a692112bf9b8054eb2e40847c32eb94fd4095d70
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1477842
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1477842 - Document zero-offset entries in tableswitch. r=jorendorff
js/src/vm/Opcodes.h
--- a/js/src/vm/Opcodes.h
+++ b/js/src/vm/Opcodes.h
@@ -648,18 +648,18 @@ 1234567890123456789012345678901234567890
      *   Type: Jumps
      *   Operands: int32_t offset
      *   Stack: cond => cond
      */ \
     macro(JSOP_AND,       69, "and",        NULL,         5,  1,  1, JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC) \
     \
     /*
      * Pops the top of stack value as 'i', if 'low <= i <= high',
-     * jumps to a 32-bit offset: 'offset[i - low]' from the current bytecode,
-     * jumps to a 32-bit offset: 'len' from the current bytecode if not.
+     * jumps to a 32-bit offset: 'offset[i - low]' from the current bytecode, unless the offset is zero (missing case)
+     * jumps to a 32-bit offset: 'len' from the current bytecode otherwise
      *
      * This opcode has variable length.
      *   Category: Statements
      *   Type: Switch Statement
      *   Operands: int32_t len, int32_t low, int32_t high,
      *             int32_t offset[0], ..., int32_t offset[high-low]
      *   Stack: i =>
      *   len: len