MCPcopy Index your code
hub / github.com/endbasic/endbasic / do_call

Method do_call

core/src/vm/context.rs:678–687  ·  view source on GitHub ↗

Implements the `Call` opcode.

(&mut self, instr: u32)

Source from the content-addressed store, hash-verified

676
677 /// Implements the `Call` opcode.
678 pub(super) fn do_call(&mut self, instr: u32) {
679 let (reg, offset) = bytecode::parse_call(instr);
680 if !self.push_frame(Frame { old_pc: self.pc, old_fp: self.fp, ret_reg: Some(reg) }) {
681 return;
682 }
683 self.pc = Address::from(offset);
684 let (is_global, index) = reg.to_parts();
685 debug_assert!(!is_global, "Function results are always stored to a temp register");
686 self.fp += usize::from(index);
687 }
688
689 /// Implements the `Concat` opcode.
690 pub(super) fn do_concat(&mut self, instr: u32, constants: &[ConstantDatum], heap: &mut Heap) {

Callers 1

execMethod · 0.80

Calls 2

push_frameMethod · 0.80
to_partsMethod · 0.80

Tested by

no test coverage detected