9
Cargo.lock
generated
9
Cargo.lock
generated
@@ -51,6 +51,12 @@ version = "0.11.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
|
checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "base64"
|
||||||
|
version = "0.12.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bit-set"
|
name = "bit-set"
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
@@ -1157,7 +1163,7 @@ version = "0.7.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017"
|
checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64 0.11.0",
|
||||||
"blake2b_simd",
|
"blake2b_simd",
|
||||||
"constant_time_eq",
|
"constant_time_eq",
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
@@ -1217,6 +1223,7 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|||||||
name = "scryer-prolog"
|
name = "scryer-prolog"
|
||||||
version = "0.8.126"
|
version = "0.8.126"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"base64 0.12.3",
|
||||||
"blake2",
|
"blake2",
|
||||||
"chrono",
|
"chrono",
|
||||||
"cpu-time",
|
"cpu-time",
|
||||||
|
|||||||
@@ -123,10 +123,6 @@ impl CodeOffsets {
|
|||||||
code.push(Self::add_index(code.is_empty(), index));
|
code.push(Self::add_index(code.is_empty(), index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&Constant::String(_) => {
|
|
||||||
let is_initial_index = self.lists.is_empty();
|
|
||||||
self.lists.push(Self::add_index(is_initial_index, index));
|
|
||||||
}
|
|
||||||
&Constant::Usize(n) => {
|
&Constant::Usize(n) => {
|
||||||
let code = self.constants
|
let code = self.constants
|
||||||
.entry(Constant::Integer(Rc::new(Integer::from(n))))
|
.entry(Constant::Integer(Rc::new(Integer::from(n))))
|
||||||
@@ -158,7 +154,7 @@ impl CodeOffsets {
|
|||||||
let is_initial_index = code.is_empty();
|
let is_initial_index = code.is_empty();
|
||||||
code.push(Self::add_index(is_initial_index, index));
|
code.push(Self::add_index(is_initial_index, index));
|
||||||
}
|
}
|
||||||
&Term::Cons(..) => {
|
&Term::Cons(..) | &Term::Constant(_, Constant::String(_)) => {
|
||||||
let is_initial_index = self.lists.is_empty();
|
let is_initial_index = self.lists.is_empty();
|
||||||
self.lists.push(Self::add_index(is_initial_index, index));
|
self.lists.push(Self::add_index(is_initial_index, index));
|
||||||
}
|
}
|
||||||
@@ -172,7 +168,8 @@ impl CodeOffsets {
|
|||||||
let is_initial_index = code.is_empty();
|
let is_initial_index = code.is_empty();
|
||||||
code.push(Self::add_index(is_initial_index, index));
|
code.push(Self::add_index(is_initial_index, index));
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -272,19 +272,6 @@ impl Addr {
|
|||||||
&Addr::Float(f) => {
|
&Addr::Float(f) => {
|
||||||
Some(Constant::Float(f))
|
Some(Constant::Float(f))
|
||||||
}
|
}
|
||||||
&Addr::PStrLocation(h, n) => {
|
|
||||||
let mut heap_pstr_iter =
|
|
||||||
machine_st.heap_pstr_iter(Addr::PStrLocation(h, n));
|
|
||||||
|
|
||||||
let buf = heap_pstr_iter.to_string();
|
|
||||||
let end_addr = heap_pstr_iter.focus();
|
|
||||||
|
|
||||||
if end_addr == Addr::EmptyList {
|
|
||||||
Some(Constant::String(Rc::new(buf)))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&Addr::Usize(n) => {
|
&Addr::Usize(n) => {
|
||||||
Some(Constant::Usize(n))
|
Some(Constant::Usize(n))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user