void CheckIndex(size_t index) const { if (sparse_) { // In a sparse table, we have num_entries_ keys and num_entries_ values, in that order.
DCHECK_LT(index, 2 * static_cast<size_t>(num_entries_));
} else { // In a packed table, we have the starting key and num_entries_ values.
DCHECK_LT(index, 1 + static_cast<size_t>(num_entries_));
}
}
// Index of the first value in the table.
size_t GetFirstValueIndex() const { if (sparse_) { // In a sparse table, we have num_entries_ keys and num_entries_ values, in that order. return num_entries_;
} else { // In a packed table, we have the starting key and num_entries_ values. return1;
}
}
// Whether this is a sparse-switch table (or a packed-switch one). constbool sparse_;
// This can't be const as it needs to be computed off of the given instruction, and complicated // expressions in the initializer list seemed very ugly.
uint16_t num_entries_;
const int32_t* values_;
// The number of entries in a packed switch before we use a jump table or specified // compare/jump series. static constexpr uint16_t kSmallSwitchThreshold = 3;
inlinebool IsThrowingDexInstruction(const Instruction& instruction) { // Special-case MONITOR_EXIT which is a throwing instruction but the verifier // guarantees that it will never throw. This is necessary to avoid rejecting // 'synchronized' blocks/methods. return instruction.IsThrow() && instruction.Opcode() != Instruction::MONITOR_EXIT;
}
} // namespace art
#endif// ART_LIBDEXFILE_DEX_BYTECODE_UTILS_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.