pub fn pop(mut self) -> (SymbolBindings, SmallVec<[(CellRef, usize); 2]>) {
        // Take the parent binding
        let parent = self.parent.take().expect("Parent binding missing");

        // Unbox it
        let mut parent = *parent;

        if self.is_interior {
            // Make sure the number of cells is updated on the parent if it's interior
            parent.num_cells = self.num_cells.max(parent.num_cells);

            // For interior frames, imports come straight from the same parent
            parent.import_symbols.extend(self.import_symbols.drain(..));
        }

        // Move any export symbols into the parent
        for (export_id, depth) in self.export_symbols.drain(..) {
            if let Some(value) = self.symbols.get(&export_id) {
                parent.symbols.insert(export_id, value.clone());

                if depth > 1 {
                    // For symbols with a depth, export again through the parent context
                    parent.export_symbols.push((export_id, depth-1))
                }
            } else {
                panic!("Missing symbol {}", name_for_atom_with_id(export_id));
            }
        }

        // The parent binding is the result
        (parent, self.import_symbols)
    }
///
/// Pops a set of symbol bindings, returning the symbol bindings and the list of values that need to be
/// loaded from the current frame into the new one
///
Pops a set of symbol bindings, returning the symbol bindings and the list of values that need to be
loaded from the current frame into the new one
Pops a set of symbol bindings returning the symbol bindings and the list of values that need to be loaded from the current frame into the new one
pub fn pop(mut self) -> (SymbolBindings, SmallVec<[(CellRef, usize); 2]>) {
        // Take the parent binding
        let parent = self.parent.take().expect("Parent binding missing");
        // Unbox it
        let mut parent = *parent;
        if self.is_interior {
            // Make sure the number of cells is updated on the parent if it's interior
            parent.num_cells = self.num_cells.max(parent.num_cells);
            // For interior frames, imports come straight from the same parent
            parent.import_symbols.extend(self.import_symbols.drain(..));
        }
        // Move any export symbols into the parent
        for (export_id, depth) in self.export_symbols.drain(..) {
            if let Some(value) = self.symbols.get(&export_id) {
                parent.symbols.insert(export_id, value.clone());
                if depth > 1 {
                    // For symbols with a depth, export again through the parent context
                    parent.export_symbols.push((export_id, depth-1))
                }
            } else {
                panic!("Missing symbol {}", name_for_atom_with_id(export_id));
            }
        }
        // The parent binding is the result
        (parent, self.import_symbols)
    }
pub fn pop ( mut self ) -> ( SymbolBindings , SmallVec < [ ( CellRef , usize ) ; 2 ] > ) { // Take the parent binding let parent = self . parent . take ( ) . expect ( " " ) ; // Unbox it let mut parent = * parent ; if self . is_interior { // Make sure the number of cells is updated on the parent if it's interior parent . num_cells = self . num_cells . max ( parent . num_cells ) ; // For interior frames, imports come straight from the same parent parent . import_symbols . extend ( self . import_symbols . drain ( .. ) ) ; } // Move any export symbols into the parent for ( export_id , depth ) in self . export_symbols . drain ( .. ) { if let Some ( value ) = self . symbols . get ( & export_id ) { parent . symbols . insert ( export_id , value . clone ( ) ) ; if depth > 1 { // For symbols with a depth, export again through the parent context parent . export_symbols . push ( ( export_id , depth - 1 ) ) } } else { panic ! ( " " name_for_atom_with_id ( export_id ) ) ; } } // The parent binding is the result ( parent , self . import_symbols ) }
Pops a set of symbol bindings, returning the symbol bindings and the list of values that need to be
loaded from the current frame into the new one
Pops a set of symbol bindings returning the symbol bindings and the list of values that need to be loaded from the current frame into the new one
mut self
mut self