struct Compiler {
ops: Vec<Op>,
consts: Vec<Value>,
names: Vec<Rc<str>>,
slots: Vec<Slot>,
prop_slots: Vec<PropSlot>,
loops: Vec<LoopCtx>,
pending_labels: Vec<Rc<str>>,
block_depth: u32,
try_depth: u32,
iter_depth: u32,
pending_exec: Vec<PendingExec>,
exec_labels: Vec<Vec<ExecLabel>>,
}Fields§
§ops: Vec<Op>§consts: Vec<Value>§names: Vec<Rc<str>>§slots: Vec<Slot>§prop_slots: Vec<PropSlot>§loops: Vec<LoopCtx>§pending_labels: Vec<Rc<str>>直後のループまたはブロックに引き継ぐラベル一覧。
block_depth: u32現在の字句ブロックスコープの入れ子段数。
try_depth: u32現在の try ブロックの入れ子段数。
iter_depth: u32現在の for-in / for-of イテレータ(1段につき vm_stack 2要素)の入れ子段数。
pending_exec: Vec<PendingExec>実行時に囲むループの飛び先を持つ Exec。
exec_labels: Vec<Vec<ExecLabel>>Exec ごとの、外側のラベル付きループ/ブロックへの飛び先の表。
Implementations§
Source§impl Compiler
impl Compiler
fn name(&mut self, n: &Rc<str>) -> u32
fn slot(&mut self) -> u32
fn prop_slot(&mut self) -> u32
fn load(&mut self, n: &Rc<str>)
fn constant(&mut self, v: Value)
fn patch(&mut self, at: usize)
fn patch_to(&mut self, at: usize, to: u32)
fn emit_call_args( &mut self, arguments: &[Expression], orig_callee: *const Expression, )
fn compile_chain(&mut self, e: &Expression) -> bool
fn expr(&mut self, e: &Expression)
fn exec_fallback(&mut self, s: &Statement)
fn emit_unwind_to_loop(&mut self, target_idx: usize)
fn stmt(&mut self, s: &Statement)
Sourcefn close_loop(&mut self, cont: u32)
fn close_loop(&mut self, cont: u32)
ループ(または switch)の出口はここ。continue は cont へ。
Auto Trait Implementations§
impl !RefUnwindSafe for Compiler
impl !Send for Compiler
impl !Sync for Compiler
impl !UnwindSafe for Compiler
impl Freeze for Compiler
impl Unpin for Compiler
impl UnsafeUnpin for Compiler
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