pub struct BytecodeGenerator { /* private fields */ }Implementations§
Source§impl BytecodeGenerator
impl BytecodeGenerator
pub fn generate(&mut self, ast: &Node) -> Vec<Instruction>
pub fn get_constants(&self) -> &Vec<String>
Trait Implementations§
Source§impl ArithmeticCore for BytecodeGenerator
impl ArithmeticCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl ArrayCore for BytecodeGenerator
impl ArrayCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl AssignmentCore for BytecodeGenerator
impl AssignmentCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl ClassCore for BytecodeGenerator
impl ClassCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl ComparisonCore for BytecodeGenerator
impl ComparisonCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl ConstantCore for BytecodeGenerator
impl ConstantCore for BytecodeGenerator
fn constants(&self) -> &Vec<String>
fn constant_map(&self) -> &HashMap<String, ConstantIndex>
fn constants_mut(&mut self) -> &mut Vec<String>
fn constant_map_mut(&mut self) -> &mut HashMap<String, ConstantIndex>
Source§impl ControlFlowCore for BytecodeGenerator
impl ControlFlowCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
fn push_loop_label(&mut self, break_address: CodeAddress)
fn pop_loop_label(&mut self)
fn get_current_break_address(&self) -> Option<CodeAddress>
Source§impl Default for BytecodeGenerator
impl Default for BytecodeGenerator
Source§impl FunctionCore for BytecodeGenerator
impl FunctionCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl FunctionLiteralCore for BytecodeGenerator
impl FunctionLiteralCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl LabelManager for BytecodeGenerator
impl LabelManager for BytecodeGenerator
fn add_label(&mut self, name: String, address: CodeAddress)
fn get_label_address(&self, name: &str) -> Option<CodeAddress>
fn get_label_start_address(&self, label_name: &str) -> Option<CodeAddress>
fn get_label_end_address(&self, label_name: &str) -> Option<CodeAddress>
fn push_current_label(&mut self, name: String)
fn pop_current_label(&mut self)
fn get_current_labels(&self) -> &[String]
Source§impl LogicalCore for BytecodeGenerator
impl LogicalCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl ObjectCore for BytecodeGenerator
impl ObjectCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl ScopeCore for BytecodeGenerator
impl ScopeCore for BytecodeGenerator
fn local_vars(&self) -> &HashMap<String, LocalIndex>
fn local_vars_mut(&mut self) -> &mut HashMap<String, LocalIndex>
fn next_local(&self) -> usize
fn set_next_local(&mut self, next: usize)
Source§impl UnaryCore for BytecodeGenerator
impl UnaryCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Source§impl VariableCore for BytecodeGenerator
impl VariableCore for BytecodeGenerator
fn instructions(&mut self) -> &mut Vec<Instruction>
fn visit_node(&mut self, node: &Node)
Auto Trait Implementations§
impl Freeze for BytecodeGenerator
impl RefUnwindSafe for BytecodeGenerator
impl Send for BytecodeGenerator
impl Sync for BytecodeGenerator
impl Unpin for BytecodeGenerator
impl UnwindSafe for BytecodeGenerator
Blanket Implementations§
Source§impl<T> ArithmeticGenerator for Twhere
T: ArithmeticCore,
impl<T> ArithmeticGenerator for Twhere
T: ArithmeticCore,
fn generate_binary_expression(&mut self, node: &Node)
Source§impl<T> ArrayGenerator for Twhere
T: ArrayCore,
impl<T> ArrayGenerator for Twhere
T: ArrayCore,
fn generate_array_literal(&mut self, node: &Node)
Source§impl<T> AssignmentGenerator for T
impl<T> AssignmentGenerator for T
fn generate_assignment_expression(&mut self, node: &Node)
fn generate_conditional_expression(&mut self, node: &Node)
fn generate_call_expression(&mut self, node: &Node)
fn generate_new_expression(&mut self, node: &Node)
fn generate_member_expression(&mut self, node: &Node)
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more