pub enum FieldKind {
Show 25 variants
Reg,
Target,
Const,
Func,
Import,
Global,
Table,
Name,
TypeRef,
Field,
Upval,
Shape,
Imm32,
Count,
Bool,
IntTy,
FloatTy,
Policy,
IntOp,
IntConv,
IntPair,
FloatConv,
Kind,
Prim,
ErrKind,
}Expand description
What an operand is: the type of one Inst field.
Modifier kinds (is_modifier) print as a
mnemonic suffix (iadd.i64.wrap); the others print as operands.
§Examples
use bytecode_lang::FieldKind;
assert!(FieldKind::IntOp.is_modifier());
assert!(!FieldKind::Reg.is_modifier());
assert_eq!(FieldKind::Target.bits(), 32);Variants§
Reg
A Reg.
Target
A branch Target.
Const
A ConstId.
Func
A FuncId.
Import
An ImportId.
Global
A GlobalId.
Table
A TableId.
Name
A NameRef.
TypeRef
A TypeRef.
Field
A FieldIdx.
Upval
An UpvalIdx.
Shape
A ShapeId.
Imm32
A 32-bit signed immediate.
Count
An 8-bit count (arguments, string parts).
Bool
A boolean flag.
IntTy
An IntTy modifier.
FloatTy
A FloatTy modifier.
Policy
A Policy modifier.
IntOp
An IntOp modifier.
IntConv
An IntConv modifier.
IntPair
An IntPair modifier.
FloatConv
A FloatConv modifier.
Kind
A Kind modifier.
Prim
A Prim modifier.
ErrKind
An ErrorKind modifier (its numeric code, one byte; catchable
kinds only).
Implementations§
Trait Implementations§
impl Copy for FieldKind
impl Eq for FieldKind
Source§impl Ord for FieldKind
impl Ord for FieldKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for FieldKind
impl PartialOrd for FieldKind
impl StructuralPartialEq for FieldKind
Auto Trait Implementations§
impl Freeze for FieldKind
impl RefUnwindSafe for FieldKind
impl Send for FieldKind
impl Sync for FieldKind
impl Unpin for FieldKind
impl UnsafeUnpin for FieldKind
impl UnwindSafe for FieldKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more