[[package]]
name = "prolog_parser"
version = "0.8.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lexical 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-rug-adapter 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-rug-adapter 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ordered-float 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "prolog_parser 0.8.37",
+ "prolog_parser 0.8.37 (registry+https://github.com/rust-lang/crates.io-index)",
"ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rug 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustyline 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"checksum num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "443c53b3c3531dfcbfa499d8893944db78474ad7a1d87fa2d94d1a2231693ac6"
"checksum ordered-float 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7eb5259643245d3f292c7a146b2df53bba24d7eab159410e648eb73dc164669d"
"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
+"checksum prolog_parser 0.8.37 (registry+https://github.com/rust-lang/crates.io-index)" = "cb3da90085db170f1045f7d6851da12400ab205af9ec2acaa5ee42ab45a25dd8"
"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
:- module(cont, [reset/3, shift/1]).
-reset(Goal, Cont, Term) :-
+reset(Goal, Ball, Cont) :-
call(Goal),
'$reset_cont_marker',
'$bind_from_register'(Cont, 3),
- '$bind_from_register'(Term, 4).
+ '$bind_from_register'(Ball, 4).
shift(Term) :-
'$nextEP'(first, E, P),
get_chunks(E, P, L),
- Cont = cont(call_continuation(L)),
+ ( L == [] ->
+ Cont = none
+ ; Cont = cont(call_continuation(L))
+ ),
'$write_cont_and_term'(_, _, Cont, Term),
'$unwind_environments'.
self.reset_block(addr);
}
&SystemClauseType::ResetContinuationMarker => {
- self[temp_v!(3)] = Addr::Con(Constant::Integer(Integer::from(0)));
- self[temp_v!(4)] = Addr::Con(Constant::Integer(Integer::from(0)));
+ self[temp_v!(3)] = Addr::Con(Constant::Atom(clause_name!("none"), None));
+
+ let h = self.heap.h;
+ self.heap.push(HeapCellValue::Addr(Addr::HeapCell(h)));
+
+ self[temp_v!(4)] = Addr::HeapCell(h);
}
&SystemClauseType::SetBall =>
self.set_ball(),