pub fn dump(&self, lock: &GCLock) {
        println!("SemContext");
        println!("{:7} functions", self.all_functions().len());
        println!("{:7} lexical scopes", self.all_scopes().len());
        println!("{:7} declarations", self.all_decls().len());
        println!("{:7} ident resolutions", self.all_ident_decls().len());
        if !self.all_requires().is_empty() {
            println!("{:7} require resolutions", self.all_requires().len());
        }
        println!();

        let mut children = HashMap::<FunctionInfoId, Vec<FunctionInfoId>>::new();
        for i in 0..self.funcs.len() {
            let f = FunctionInfoId::new(i);
            if let Some(parent) = &self.function(f).parent_function {
                match children.get_mut(parent) {
                    Some(v) => v.push(f),
                    None => {
                        children.insert(*parent, vec![f]);
                    }
                };
            }
        }

        for id in 0..self.decls.len() {
            let id = DeclId::new(id);
            let decl = self.decl(id);
            if decl.kind == DeclKind::GlobalProperty {
                decl.dump(lock, id, 1);
            }
        }

        self.dump_function(lock, &children, FunctionInfoId::GLOBAL_FUNCTION_ID, 0);
    }
/// Dumps information about the semantic context directly to stdout.
/// Intended for testing and debugging.
Dumps information about the semantic context directly to stdout.
Intended for testing and debugging.
Dumps information about the semantic context directly to stdout . Intended for testing and debugging .
pub fn dump(&self, lock: &GCLock) {
        println!("SemContext");
        println!("{:7} functions", self.all_functions().len());
        println!("{:7} lexical scopes", self.all_scopes().len());
        println!("{:7} declarations", self.all_decls().len());
        println!("{:7} ident resolutions", self.all_ident_decls().len());
        if !self.all_requires().is_empty() {
            println!("{:7} require resolutions", self.all_requires().len());
        }
        println!();
        let mut children = HashMap::<FunctionInfoId, Vec<FunctionInfoId>>::new();
        for i in 0..self.funcs.len() {
            let f = FunctionInfoId::new(i);
            if let Some(parent) = &self.function(f).parent_function {
                match children.get_mut(parent) {
                    Some(v) => v.push(f),
                    None => {
                        children.insert(*parent, vec![f]);
                    }
                };
            }
        }
        for id in 0..self.decls.len() {
            let id = DeclId::new(id);
            let decl = self.decl(id);
            if decl.kind == DeclKind::GlobalProperty {
                decl.dump(lock, id, 1);
            }
        }
        self.dump_function(lock, &children, FunctionInfoId::GLOBAL_FUNCTION_ID, 0);
    }
pub fn dump ( & self , lock : & GCLock ) { println ! ( " " ) ; println ! ( " " self all_functions ( ) len ( ) ) ; println ! ( " " self all_scopes ( ) len ( ) ) ; println ! ( " " self all_decls ( ) len ( ) ) ; println ! ( " " self all_ident_decls ( ) len ( ) ) ; if ! self . all_requires ( ) . is_empty ( ) { println ! ( " " self all_requires ( ) len ( ) ) ; } println ! ( ) ; let mut children = HashMap :: < FunctionInfoId , Vec < FunctionInfoId > > :: new ( ) ; for i in 0 .. self . funcs . len ( ) { let f = FunctionInfoId :: new ( i ) ; if let Some ( parent ) = & self . function ( f ) . parent_function { match children . get_mut ( parent ) { Some ( v ) => v . push ( f ) , None => { children . insert ( * parent , vec ! [ f ] ) ; } } ; } } for id in 0 .. self . decls . len ( ) { let id = DeclId :: new ( id ) ; let decl = self . decl ( id ) ; if decl . kind == DeclKind :: GlobalProperty { decl . dump ( lock , id , 1 ) ; } } self . dump_function ( lock , & children , FunctionInfoId :: GLOBAL_FUNCTION_ID , 0 ) ; }
Dumps information about the semantic context directly to stdout.
Dumps information about the semantic context directly to stdout .
&self
lock
&GCLock
&self
lock
&GCLock