pub fn compile_statement_quick(source: CellRef) -> Result<CompiledActions, BindError> {
    use self::SafasCell::*;

    match &*source {
        // Lists are processed according to their first value
        List(car, cdr)                          => { compile_list_statement(Arc::clone(car), Arc::clone(cdr)) }

        // Frame references load their respective references
        FrameReference(cell_id, frame, _type)   => {
            if *frame != 0 {
                Err(BindError::CannotLoadCellInOtherFrame)
            } else {
                Ok(smallvec![Action::CellValue(*cell_id)].into())
            }
        }
        
        // Action and macro monads resolve their respective syntaxes
        BoundSyntax(syntax_compiler)            => syntax_compiler.generate_actions(),

        // Normal values just get loaded into cell 0
        _other                                  => { Ok(smallvec![Action::Value(Arc::clone(&source))].into()) }
    }
}
///
/// Compiles a statement once it has been bound by bind_statement (without perfoming optimisation on the result)
/// 
/// Calling the _quick variant is faster when building sequences of actions, as the peephole optimiser only
/// needs to be run once all the actions are together
///
Compiles a statement once it has been bound by bind_statement (without perfoming optimisation on the result)
Calling the _quick variant is faster when building sequences of actions, as the peephole optimiser only
needs to be run once all the actions are together
Compiles a statement once it has been bound by bind_statement ( without perfoming optimisation on the result ) Calling the _quick variant is faster when building sequences of actions as the peephole optimiser only needs to be run once all the actions are together
pub fn compile_statement_quick(source: CellRef) -> Result<CompiledActions, BindError> {
    use self::SafasCell::*;
    match &*source {
        // Lists are processed according to their first value
        List(car, cdr)                          => { compile_list_statement(Arc::clone(car), Arc::clone(cdr)) }
        // Frame references load their respective references
        FrameReference(cell_id, frame, _type)   => {
            if *frame != 0 {
                Err(BindError::CannotLoadCellInOtherFrame)
            } else {
                Ok(smallvec![Action::CellValue(*cell_id)].into())
            }
        }
        // Action and macro monads resolve their respective syntaxes
        BoundSyntax(syntax_compiler)            => syntax_compiler.generate_actions(),
        // Normal values just get loaded into cell 0
        _other                                  => { Ok(smallvec![Action::Value(Arc::clone(&source))].into()) }
    }
}
pub fn compile_statement_quick ( source : CellRef ) -> Result < CompiledActions , BindError > { use self :: SafasCell :: * ; match & * source { // Lists are processed according to their first value List ( car , cdr ) => { compile_list_statement ( Arc :: clone ( car ) , Arc :: clone ( cdr ) ) } // Frame references load their respective references FrameReference ( cell_id , frame , _type ) => { if * frame != 0 { Err ( BindError :: CannotLoadCellInOtherFrame ) } else { Ok ( smallvec ! [ Action CellValue ( cell_id ) ] . into ( ) ) } } // Action and macro monads resolve their respective syntaxes BoundSyntax ( syntax_compiler ) => syntax_compiler . generate_actions ( ) , // Normal values just get loaded into cell 0 _other => { Ok ( smallvec ! [ Action Value ( Arc clone ( source ) ) ] . into ( ) ) } } }
Compiles a statement once it has been bound by bind_statement (without perfoming optimisation on the result)
Calling the _quick variant is faster when building sequences of actions, as the peephole optimiser only
needs to be run once all the actions are together
Compiles a statement once it has been bound by bind_statement ( without perfoming optimisation on the result ) Calling the _quick variant is faster when building sequences of actions as the peephole optimiser only needs to be run once all the actions are together
source
CellRef
source
CellRef