pub(crate) enum Backend {
Ast,
Vm,
}Expand description
Which backend produced a number.
ADR 0019 requires every number this harness reports to say so, because the
two are not interchangeable: fuel_spent is defined per backend, and a
wall-clock figure that did not name its backend would be a comparison
missing half of itself.
Variants§
Ast
The tree-walking interpreter, which is the oracle: it runs every construct the language has, straight off the checked program, with no lowering of its own and nothing to refuse.
Vm
The linear-memory backend of ADR 0034, over cove_ir.
The production path. ADR 0034 replaced the executable IR, the
lowering, the VM, and — once the replacement had proven itself —
an experimental eight-byte-word frame that existed only to make the
two backends’ comparison measurable within one build; its completion
condition 8 was to delete all of that once this backend took over,
which is why vm is the only lowered backend left here.
It has no admission predicate. cove_ir refuses nothing on purpose —
a construct it has not been taught is a gap in the lowering rather
than a program the backend declines — so a vm row that is missing
is a bug, and this harness reports one as a failure.
Implementations§
Trait Implementations§
impl Copy for Backend
impl Eq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.