Struct compile::CompileManager
source · [−]pub struct CompileManager {
pub context_stack: Vec<CompileContext>,
pub local_index: HashMap<(ContextId, String), LocalName>,
pub memory_manager: MemoryManager,
/* private fields */
}
Expand description
The manager in charge of converting any AST into valid bytecode.
Fields
context_stack: Vec<CompileContext>
A stack of contexts (corresponding to the stack of frame definitions)
local_index: HashMap<(ContextId, String), LocalName>
The index of variables in a given context and their corresponding LocalName’s
memory_manager: MemoryManager
Implementations
sourceimpl CompileManager
impl CompileManager
pub fn new(file_id: FileId) -> Self
sourcepub fn context_id_gen(&mut self) -> ContextId
pub fn context_id_gen(&mut self) -> ContextId
Create a new unused ContextId
sourcepub fn create_debug_descriptor(&mut self, span: Span) -> DebugSpanDescriptor
pub fn create_debug_descriptor(&mut self, span: Span) -> DebugSpanDescriptor
Create a DebugSpanDescriptor, and attach a Span in the current context’s debug_symbol_descriptors
pub fn create_constant_descriptor(
&mut self,
obj: ObjectRef
) -> GlobalConstantDescriptor
sourcepub fn context(&mut self) -> &mut CompileContext
pub fn context(&mut self) -> &mut CompileContext
Get the current context at the top of the stack
pub fn local_name_gen(&mut self) -> LocalName
pub fn name_lookup(&mut self, name: &String) -> NameLookupResult
pub fn compile_literal(&mut self, ast: &Literal) -> CompileResult
pub fn compile_list_literal(&mut self, ast: &ListLiteral) -> CompileResult
pub fn compile_tuple_literal(&mut self, ast: &TupleLiteral) -> CompileResult
pub fn compile_set_literal(&mut self, ast: &SetLiteral) -> CompileResult
pub fn compile_dict_literal(&mut self, ast: &DictLiteral) -> CompileResult
pub fn compile_func_call(&mut self, ast: &FuncCall) -> CompileResult
pub fn compile_attr_lookup(&mut self, ast: &AttrLookup) -> CompileResult
pub fn compile_method_call(&mut self, ast: &MethodCall) -> CompileResult
pub fn compile_expr(&mut self, ast: &Expr) -> CompileResult
pub fn compile_indexed_expr(&mut self, ast: &IndexedExpr) -> CompileResult
pub fn compile_post_pre_op(&mut self, ast: &PostPreOp) -> CompileResult
pub fn compile_sliced_expr(&mut self, ast: &SlicedExpr) -> CompileResult
pub fn compile_for_loop(&mut self, ast: &ForLoop) -> CompileResult
pub fn compile_while_loop(&mut self, ast: &WhileLoop) -> CompileResult
pub fn compile_if_statement(&mut self, ast: &IfStatement) -> CompileResult
pub fn compile_case_of(&mut self, ast: &CaseOf) -> CompileResult
pub fn compile_func_definition(&mut self, ast: &FuncDefinition) -> CompileResult
pub fn compile_anon_func_definition(
&mut self,
ast: &AnonFuncDefinition
) -> CompileResult
pub fn compile_return_statement(
&mut self,
ast: &ReturnStatement
) -> CompileResult
pub fn compile_format_string(&mut self, ast: &FormatString) -> CompileResult
pub fn compile_sh_statement(&mut self, ast: &ShStatement) -> CompileResult
pub fn compile_assign_to(&mut self, ast: &AssignmentLHS) -> CompileResult
pub fn compile_assignment(&mut self, ast: &Assignment) -> CompileResult
pub fn compile_statement(&mut self, ast: &Statement) -> CompileResult
pub fn compile_statement_list(&mut self, ast: &StatementList) -> CompileResult
Auto Trait Implementations
impl !RefUnwindSafe for CompileManager
impl !Send for CompileManager
impl !Sync for CompileManager
impl Unpin for CompileManager
impl !UnwindSafe for CompileManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more