fn mutate_externref_ref_count(
        &mut self,
        builder: &mut FunctionBuilder,
        externref: ir::Value,
        delta: i64,
    ) -> ir::Value {
        debug_assert!(delta == -1 || delta == 1);

        let pointer_type = self.pointer_type();

        // If this changes that's ok, the `atomic_rmw` below just needs to be
        // preceded with an add instruction of `externref` and the offset.
        assert_eq!(self.offsets.vm_extern_data_ref_count(), 0);
        let delta = builder.ins().iconst(pointer_type, delta);
        builder.ins().atomic_rmw(
            pointer_type,
            ir::MemFlags::trusted(),
            ir::AtomicRmwOp::Add,
            externref,
            delta,
        )
    }
/// Generate code to increment or decrement the given `externref`'s
/// reference count.
///
/// The new reference count is returned.
Generate code to increment or decrement the given `externref`'s
reference count.

The new reference count is returned.
Generate code to increment or decrement the given ` externref ` ' s reference count . The new reference count is returned .
fn mutate_externref_ref_count(
        &mut self,
        builder: &mut FunctionBuilder,
        externref: ir::Value,
        delta: i64,
    ) -> ir::Value {
        debug_assert!(delta == -1 || delta == 1);
        let pointer_type = self.pointer_type();
        // If this changes that's ok, the `atomic_rmw` below just needs to be
        // preceded with an add instruction of `externref` and the offset.
        assert_eq!(self.offsets.vm_extern_data_ref_count(), 0);
        let delta = builder.ins().iconst(pointer_type, delta);
        builder.ins().atomic_rmw(
            pointer_type,
            ir::MemFlags::trusted(),
            ir::AtomicRmwOp::Add,
            externref,
            delta,
        )
    }
fn mutate_externref_ref_count ( & mut self , builder : & mut FunctionBuilder , externref : ir :: Value , delta : i64 , ) -> ir :: Value { debug_assert ! ( delta 1 delta 1 ) ; let pointer_type = self . pointer_type ( ) ; // If this changes that's ok, the `atomic_rmw` below just needs to be // preceded with an add instruction of `externref` and the offset. assert_eq ! ( self offsets vm_extern_data_ref_count ( ) 0 ) ; let delta = builder . ins ( ) . iconst ( pointer_type , delta ) ; builder . ins ( ) . atomic_rmw ( pointer_type , ir :: MemFlags :: trusted ( ) , ir :: AtomicRmwOp :: Add , externref , delta , ) }
Generate code to increment or decrement the given `externref`'s
reference count.
Generate code to increment or decrement the given ` externref ` ' s reference count .
&mut self
builder
&mut FunctionBuilder
externref
ir::Value
delta
i64
&mut self
builder
&mut FunctionBuilder
externref
ir::Value
delta
i64