isOpcodeDisabled returns whether or not the opcode is disabled and thus is always bad to see in the instruction stream (even if turned off by a conditional).
(opcode byte)
| 338 | // always bad to see in the instruction stream (even if turned off by a |
| 339 | // conditional). |
| 340 | func isOpcodeDisabled(opcode byte) bool { |
| 341 | switch opcode { |
| 342 | case OP_CAT: |
| 343 | return true |
| 344 | case OP_SUBSTR: |
| 345 | return true |
| 346 | case OP_LEFT: |
| 347 | return true |
| 348 | case OP_RIGHT: |
| 349 | return true |
| 350 | case OP_INVERT: |
| 351 | return true |
| 352 | case OP_AND: |
| 353 | return true |
| 354 | case OP_OR: |
| 355 | return true |
| 356 | case OP_XOR: |
| 357 | return true |
| 358 | case OP_2MUL: |
| 359 | return true |
| 360 | case OP_2DIV: |
| 361 | return true |
| 362 | case OP_MUL: |
| 363 | return true |
| 364 | case OP_DIV: |
| 365 | return true |
| 366 | case OP_MOD: |
| 367 | return true |
| 368 | case OP_LSHIFT: |
| 369 | return true |
| 370 | case OP_RSHIFT: |
| 371 | return true |
| 372 | default: |
| 373 | return false |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | // isOpcodeAlwaysIllegal returns whether or not the opcode is always illegal |
| 378 | // when passed over by the program counter even if in a non-executed branch (it |
no outgoing calls
no test coverage detected
searching dependent graphs…