lib/runCode.js
function runVm (err) {
    // Check that the programCounter is in range. Does not overwrite the previous err, if any.
    const pc = runState.programCounter
    if (!err && pc !== 0 && (pc < 0 || pc >= runState.code.length)) {
      err = new VmError(ERROR.INVALID_OPCODE)
    }

    if (err) {
      return parseVmResults(err)
    }
    async.whilst(vmIsActive, iterateVm, parseVmResults)
  }
function runVm (err) {
    // Check that the programCounter is in range. Does not overwrite the previous err, if any.
    const pc = runState.programCounter
    if (!err && pc !== 0 && (pc < 0 || pc >= runState.code.length)) {
      err = new VmError(ERROR.INVALID_OPCODE)
    }

    if (err) {
      return parseVmResults(err)
    }
    async.whilst(vmIsActive, iterateVm, parseVmResults)
  }
function runVm ( err ) { // Check that the programCounter is in range. Does not overwrite the previous err, if any. const pc = runState . programCounter if ( ! err && pc !== 0 && ( pc < 0 || pc >= runState . code . length ) ) { err = new VmError ( ERROR . INVALID_OPCODE ) } if ( err ) { return parseVmResults ( err ) } async . whilst ( vmIsActive , iterateVm , parseVmResults ) }
iterate through the given ops until something breaks or we hit STOP
iterate through the given ops until something breaks or we hit STOP