fn install_constant(
        &mut self,
        module: &Module,
        item: &Item,
        v: &ConstValue,
    ) -> Result<(), ContextError> {
        let item = module.item.join(item);

        self.names.insert(&item);

        let hash = Hash::type_hash(&item);

        self.constants.insert(hash, v.clone());

        self.meta.insert(
            item.clone(),
            CompileMeta {
                item: Arc::new(item.into()),
                kind: CompileMetaKind::Const {
                    const_value: v.clone(),
                },
                source: None,
            },
        );
        Ok(())
    }
/// Install a constant and check for duplicates.
Install a constant and check for duplicates.
Install a constant and check for duplicates .
fn install_constant(
        &mut self,
        module: &Module,
        item: &Item,
        v: &ConstValue,
    ) -> Result<(), ContextError> {
        let item = module.item.join(item);
        self.names.insert(&item);
        let hash = Hash::type_hash(&item);
        self.constants.insert(hash, v.clone());
        self.meta.insert(
            item.clone(),
            CompileMeta {
                item: Arc::new(item.into()),
                kind: CompileMetaKind::Const {
                    const_value: v.clone(),
                },
                source: None,
            },
        );
        Ok(())
    }
fn install_constant ( & mut self , module : & Module , item : & Item , v : & ConstValue , ) -> Result < ( ) , ContextError > { let item = module . item . join ( item ) ; self . names . insert ( & item ) ; let hash = Hash :: type_hash ( & item ) ; self . constants . insert ( hash , v . clone ( ) ) ; self . meta . insert ( item . clone ( ) , CompileMeta { item : Arc :: new ( item . into ( ) ) , kind : CompileMetaKind :: Const { const_value : v . clone ( ) , } , source : None , } , ) ; Ok ( ( ) ) }
Install a constant and check for duplicates.
Install a constant and check for duplicates .
&mut self
module
&Module
item
&Item
v
&ConstValue
&mut self
module
&Module
item
&Item
v
&ConstValue