MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / emit_loop

Method emit_loop

aiscript-vm/src/compiler/codegen.rs:1612–1618  ·  view source on GitHub ↗
(&mut self, loop_start: usize)

Source from the content-addressed store, hash-verified

1610 }
1611
1612 fn emit_loop(&mut self, loop_start: usize) {
1613 let offset = self.function.code_size() - loop_start + 1;
1614 if offset > u16::MAX as usize {
1615 self.error("Loop body too large.");
1616 }
1617 self.emit(OpCode::Loop(offset as u16));
1618 }
1619
1620 // Variable handling methods
1621 fn named_variable(&mut self, name: Token<'gc>, can_assign: bool) -> Result<(), VmError> {

Callers 1

generate_stmtMethod · 0.80

Calls 3

code_sizeMethod · 0.80
emitMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected