libredex/IRInstruction.cpp
// Structural equality of opcodes except branches offsets are ignored
// because they are unknown until we sync back to DexInstructions.
Structural equality of opcodes except branches offsets are ignored
because they are unknown until we sync back to DexInstructions.
Structural equality of opcodes except branches offsets are ignored because they are unknown until we sync back to DexInstructions .
bool IRInstruction::operator==(const IRInstruction& that) const {
  bool simple_fields_match =
      m_opcode == that.m_opcode &&
      m_num_inline_srcs == that.m_num_inline_srcs && m_dest == that.m_dest &&
      m_literal == that.m_literal; 
  if (!simple_fields_match) {
    return false;
  }
  if (m_num_inline_srcs <= MAX_NUM_INLINE_SRCS) {
    for (auto i = 0; i < m_num_inline_srcs; ++i) {
      if (m_inline_srcs[i] != that.m_inline_srcs[i]) {
        return false;
      }
    }
    return true;
  } else {
    return *m_srcs == *that.m_srcs;
  }
}
bool IRInstruction :: operator == ( const IRInstruction & that ) const { bool simple_fields_match = m_opcode == that . m_opcode && m_num_inline_srcs == that . m_num_inline_srcs && m_dest == that . m_dest && m_literal == that . m_literal ; if ( ! simple_fields_match ) { return false ; } if ( m_num_inline_srcs <= MAX_NUM_INLINE_SRCS ) { for ( auto i = 0 ; i < m_num_inline_srcs ; ++ i ) { if ( m_inline_srcs [ i ] != that . m_inline_srcs [ i ] ) { return false ; } } return true ; } else { return * m_srcs == * that . m_srcs ; } }
Structural equality of opcodes except branches offsets are ignored
because they are unknown until we sync back to DexInstructions.
Structural equality of opcodes except branches offsets are ignored because they are unknown until we sync back to DexInstructions .
// just test one member of the union // Check the source registers union