:- meta_predicate ->(0,0).
-% '!' is for internal use as a callable no-op within if/then/else.
-% Where it shouldn't be a no-op, it's interpreted under the expected
-% semantics by comma_dispatch/3.
-
! :- '$get_staggered_cp'(B), '$set_cp'(B).
G1 -> G2 :- '$get_staggered_cp'(B), call('$call'(G1)), '$set_cp'(B), call('$call'(G2)).
// arg(+N, +Term, ?Arg)
pub fn try_arg(&mut self) -> CallResult {
let stub_gen = || functor_stub(atom!("arg"), 3);
- let n = self.registers[1]; //self.store(self.deref(self.registers[1])); // TODO: necessary?
+ let n = self.store(self.deref(self.registers[1]));
read_heap_cell!(n,
(HeapCellValueTag::Var | HeapCellValueTag::AttrVar | HeapCellValueTag::StackVar) => {
self.reset_block(addr);
}
&SystemClauseType::ResetContinuationMarker => {
- self.registers[3] = atom_as_cell!(atom!("none"));
-
let h = self.heap.len();
- self.heap.push(heap_loc_as_cell!(h));
+ self.registers[3] = atom_as_cell!(atom!("none"));
self.registers[4] = heap_loc_as_cell!(h);
+
+ self.heap.push(heap_loc_as_cell!(h));
}
&SystemClauseType::SetBall => {
self.set_ball();