struct GenCompiler {
ops: Vec<GOp>,
dests: Vec<Dest>,
ctx: Option<Rc<Ctx>>,
handlers: u32,
scopes: u32,
pending_labels: Vec<Rc<str>>,
ok: bool,
}Fields§
§ops: Vec<GOp>§dests: Vec<Dest>§ctx: Option<Rc<Ctx>>§handlers: u32§scopes: u32§pending_labels: Vec<Rc<str>>§ok: boolImplementations§
Source§impl GenCompiler
impl GenCompiler
fn fail(&mut self)
fn here(&self) -> u32
fn new_dest(&mut self) -> u32
Sourcefn place_dest(&mut self, d: u32)
fn place_dest(&mut self, d: u32)
飛び先を今の位置・今の深さに決める。
fn emit(&mut self, op: GOp) -> usize
fn patch_to(&mut self, at: usize, to: u32)
fn push_ctx(&mut self, labels: Vec<Rc<str>>, kind: u8, brk: u32, cont: u32)
fn pop_ctx(&mut self)
fn stmts(&mut self, list: &[Statement])
fn stmt(&mut self, s: &Statement)
fn switch(&mut self, discriminant: &Expression, cases: &Vec<SwitchCase>)
fn try_stmt(&mut self, t: &TryStmt)
fn expr(&mut self, e: &Expression)
Sourcefn list_args(&mut self, items: &[Expression])
fn list_args(&mut self, items: &[Expression])
配列(引数の列・配列リテラル)を積む。展開(...x)にも対応。
fn call(&mut self, callee: &Expression, arguments: &[Expression])
fn assign(&mut self, op: &str, target: &Expression, value: &Expression)
Auto Trait Implementations§
impl !RefUnwindSafe for GenCompiler
impl !Send for GenCompiler
impl !Sync for GenCompiler
impl !UnwindSafe for GenCompiler
impl Freeze for GenCompiler
impl Unpin for GenCompiler
impl UnsafeUnpin for GenCompiler
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