lib/runCode.js
function preprocessValidJumps (runState) {
  for (var i = 0; i < runState.code.length; i++) {
    var curOpCode = lookupOpInfo(runState.code[i]).name

    // no destinations into the middle of PUSH
    if (curOpCode === 'PUSH') {
      i += runState.code[i] - 0x5f
    }

    if (curOpCode === 'JUMPDEST') {
      runState.validJumps.push(i)
    }
  }
}
function preprocessValidJumps (runState) {
  for (var i = 0; i < runState.code.length; i++) {
    var curOpCode = lookupOpInfo(runState.code[i]).name

    // no destinations into the middle of PUSH
    if (curOpCode === 'PUSH') {
      i += runState.code[i] - 0x5f
    }

    if (curOpCode === 'JUMPDEST') {
      runState.validJumps.push(i)
    }
  }
}
function preprocessValidJumps ( runState ) { for ( var i = 0 ; i < runState . code . length ; i ++ ) { var curOpCode = lookupOpInfo ( runState . code [ i ] ) . name // no destinations into the middle of PUSH if ( curOpCode === 'PUSH' ) { i += runState . code [ i ] - 0x5f } if ( curOpCode === 'JUMPDEST' ) { runState . validJumps . push ( i ) } } }
find all the valid jumps and puts them in the `validJumps` array
find all the valid jumps and puts them in the validJumps array