pub struct CodeGenerator { /* private fields */ }Implementations§
Source§impl CodeGenerator
impl CodeGenerator
pub fn new() -> Self
pub fn with_opt_level(opt_level: OptLevel) -> Self
pub fn compile_expression( &mut self, expr: &Expression, ctx: &mut JSContext, ) -> Result<u16, String>
pub fn compile_function( &mut self, params: &[Parameter], body: &BlockStatement, ctx: &mut JSContext, ) -> Result<(Bytecode, Vec<(u32, u16)>), String>
pub fn compile_script( &mut self, body: &BlockStatement, ctx: &mut JSContext, ) -> Result<(Bytecode, Vec<(u32, u16)>), String>
pub fn take_bytecode(&mut self) -> (Vec<u8>, Vec<JSValue>, u32, u16)
Auto Trait Implementations§
impl Freeze for CodeGenerator
impl RefUnwindSafe for CodeGenerator
impl Send for CodeGenerator
impl Sync for CodeGenerator
impl Unpin for CodeGenerator
impl UnsafeUnpin for CodeGenerator
impl UnwindSafe for CodeGenerator
Blanket Implementations§
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