pub(super) struct WasmReprCx<'g, 'db> {
db: &'db dyn Db,
generics: &'g Map<SymVariable<'db>, SymGenericTerm<'db>>,
}Fields§
§db: &'db dyn Db§generics: &'g Map<SymVariable<'db>, SymGenericTerm<'db>>Implementations§
Source§impl<'g, 'db> WasmReprCx<'g, 'db>
impl<'g, 'db> WasmReprCx<'g, 'db>
pub(super) fn new( db: &'db dyn Db, generics: &'g Map<SymVariable<'db>, SymGenericTerm<'db>>, ) -> Self
Sourcepub(super) fn wasm_repr_of_type(&mut self, of_type: SymTy<'db>) -> WasmRepr
pub(super) fn wasm_repr_of_type(&mut self, of_type: SymTy<'db>) -> WasmRepr
Returns the WasmRepr that describes how of_type will be represented in WASM.
fn wasm_repr_of_variable(&mut self, sym_variable: SymVariable<'db>) -> WasmRepr
fn wasm_repr_of_perm_type( &mut self, sym_perm: SymPerm<'db>, sym_ty: SymTy<'db>, ) -> WasmRepr
Sourcefn wasm_repr_of_named_type(
&mut self,
ty_name: SymTyName<'db>,
ty_args: &Vec<SymGenericTerm<'db>>,
) -> WasmRepr
fn wasm_repr_of_named_type( &mut self, ty_name: SymTyName<'db>, ty_args: &Vec<SymGenericTerm<'db>>, ) -> WasmRepr
Returns the WasmRepr for a Dada named type.
Sourcefn wasm_valtype_for_primitive_kind(
&self,
primitive: SymPrimitiveKind,
) -> ValType
fn wasm_valtype_for_primitive_kind( &self, primitive: SymPrimitiveKind, ) -> ValType
The WASM [ValType][] for a Dada primtive. Note that small Dada values like i16 or whatever
are just promoted up to I32 because we are lazy.
Sourcefn wasm_repr_of_aggr_fields(
&mut self,
aggr: SymAggregate<'db>,
ty_args: &Vec<SymGenericTerm<'db>>,
) -> Vec<WasmRepr>
fn wasm_repr_of_aggr_fields( &mut self, aggr: SymAggregate<'db>, ty_args: &Vec<SymGenericTerm<'db>>, ) -> Vec<WasmRepr>
The WASM representations for the fields of some aggregate type (could be a struct or a class).
Sourcefn aggr_field_tys<'a>(
&self,
aggr: SymAggregate<'db>,
ty_args: &'a Vec<SymGenericTerm<'db>>,
) -> Vec<SymTy<'db>>
fn aggr_field_tys<'a>( &self, aggr: SymAggregate<'db>, ty_args: &'a Vec<SymGenericTerm<'db>>, ) -> Vec<SymTy<'db>>
The types of each field of some aggregate type given the values ty_args for its generic arguments.
Sourcefn wasm_pointer(&self) -> WasmRepr
fn wasm_pointer(&self) -> WasmRepr
The WASM representation for a pointer value.
Sourcefn pointer_val_type(&self) -> ValType
fn pointer_val_type(&self) -> ValType
The [ValType][] for a pointer value.
For now, hardcoded to [ValType::I32][] but if/when 64-bit wasm exists this could change.
Auto Trait Implementations§
impl<'g, 'db> Freeze for WasmReprCx<'g, 'db>
impl<'g, 'db> !RefUnwindSafe for WasmReprCx<'g, 'db>
impl<'g, 'db> !Send for WasmReprCx<'g, 'db>
impl<'g, 'db> !Sync for WasmReprCx<'g, 'db>
impl<'g, 'db> Unpin for WasmReprCx<'g, 'db>
impl<'g, 'db> UnsafeUnpin for WasmReprCx<'g, 'db>
impl<'g, 'db> !UnwindSafe for WasmReprCx<'g, 'db>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more