Rename as_bool to as_truthy, and fix TypeSet::as_bool (#6027)

This commit is contained in:
Trevor Elliott
2023-03-17 14:11:24 -07:00
committed by GitHub
parent 2c40c267d4
commit 78dbe93f21
6 changed files with 49 additions and 33 deletions

View File

@@ -684,7 +684,7 @@ fn gen_opcodes(all_inst: &AllInstructions, fmt: &mut Formatter) {
/// Each operand constraint is represented as a string, one of:
/// - `Concrete(vt)`, where `vt` is a value type name.
/// - `Free(idx)` where `idx` is an index into `type_sets`.
/// - `Same`, `Lane`, `AsBool` for controlling typevar-derived constraints.
/// - `Same`, `Lane`, `AsTruthy` for controlling typevar-derived constraints.
fn get_constraint<'entries, 'table>(
operand: &'entries Operand,
ctrl_typevar: Option<&TypeVar>,
@@ -793,7 +793,7 @@ fn gen_type_constraints(all_inst: &AllInstructions, fmt: &mut Formatter) {
// constraint is represented as a string, one of:
// - `Concrete(vt)`, where `vt` is a value type name.
// - `Free(idx)` where `idx` is an index into `type_sets`.
// - `Same`, `Lane`, `AsBool` for controlling typevar-derived constraints.
// - `Same`, `Lane`, `AsTruthy` for controlling typevar-derived constraints.
let mut operand_seqs = UniqueSeqTable::new();
// Preload table with constraints for typical binops.