Module: TEALrb::Opcodes

Defined in:
lib/tealrb/opcodes.rb

Defined Under Namespace

Modules: TEALOpcodes

Constant Summary collapse

BINARY_OPCODE_METHOD_MAPPING =
{
  '+': 'add',
  '-': 'subtract',
  '<': 'less',
  '>': 'greater',
  '<=': 'less_eq',
  '>=': 'greater_eq',
  '/': 'divide',
  '==': 'equal',
  '&': 'bitwise_and',
  '!=': 'not_equal',
  '*': 'multiply',
  '&&': 'boolean_and',
  '||': 'boolean_or',
  '%': 'modulo',
  '|': 'bitwise_or',
  '^': 'bitwise_xor',
  '~': 'bitwise_invert',
  'b+': 'big_endian_add',
  'b-': 'big_endian_subtract',
  'b/': 'big_endian_divide',
  'b*': 'big_endian_multiply',
  'b<': 'big_endian_less',
  'b>': 'big_endian_more',
  'b<=': 'big_endian_less_eq',
  'b>=': 'big_endian_more_eq',
  'b==': 'big_endian_equal',
  'b!=': 'big_endian_not_equal',
  'b%': 'big_endian_modulo',
  'b|': 'padded_bitwise_or',
  'b&': 'padded_bitwise_and',
  'b^': 'padded_bitwise_xor',
  'b~': 'bitwise_byte_invert'
}.freeze
UNARY_OPCODE_METHOD_MAPPING =
{
  '!': 'zero?'
}.freeze