use indexing functions to set num_cells in allocate_and_frame/or_frame (#1877)
This commit is contained in:
@@ -690,8 +690,6 @@ impl Machine {
|
|||||||
fn try_call(&mut self, name: Atom, arity: usize, idx: IndexPtr) -> CallResult {
|
fn try_call(&mut self, name: Atom, arity: usize, idx: IndexPtr) -> CallResult {
|
||||||
let compiled_tl_index = idx.p() as usize;
|
let compiled_tl_index = idx.p() as usize;
|
||||||
|
|
||||||
// println!("calling {}/{}", name.as_str(), arity);
|
|
||||||
|
|
||||||
match idx.tag() {
|
match idx.tag() {
|
||||||
IndexPtrTag::DynamicUndefined => {
|
IndexPtrTag::DynamicUndefined => {
|
||||||
self.machine_st.fail = true;
|
self.machine_st.fail = true;
|
||||||
@@ -715,8 +713,6 @@ impl Machine {
|
|||||||
fn try_execute(&mut self, name: Atom, arity: usize, idx: IndexPtr) -> CallResult {
|
fn try_execute(&mut self, name: Atom, arity: usize, idx: IndexPtr) -> CallResult {
|
||||||
let compiled_tl_index = idx.p() as usize;
|
let compiled_tl_index = idx.p() as usize;
|
||||||
|
|
||||||
// println!("executing {}/{}", name.as_str(), arity);
|
|
||||||
|
|
||||||
match idx.tag() {
|
match idx.tag() {
|
||||||
IndexPtrTag::DynamicUndefined => {
|
IndexPtrTag::DynamicUndefined => {
|
||||||
self.machine_st.fail = true;
|
self.machine_st.fail = true;
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ impl Stack {
|
|||||||
offset += mem::size_of::<HeapCellValue>();
|
offset += mem::size_of::<HeapCellValue>();
|
||||||
}
|
}
|
||||||
|
|
||||||
let and_frame = &mut *(new_ptr as *mut AndFrame);
|
let and_frame = self.index_and_frame_mut(e);
|
||||||
and_frame.prelude.num_cells = num_cells;
|
and_frame.prelude.num_cells = num_cells;
|
||||||
|
|
||||||
e
|
e
|
||||||
@@ -226,7 +226,7 @@ impl Stack {
|
|||||||
offset += mem::size_of::<HeapCellValue>();
|
offset += mem::size_of::<HeapCellValue>();
|
||||||
}
|
}
|
||||||
|
|
||||||
let or_frame = &mut *(new_ptr as *mut OrFrame);
|
let or_frame = self.index_or_frame_mut(b);
|
||||||
or_frame.prelude.num_cells = num_cells;
|
or_frame.prelude.num_cells = num_cells;
|
||||||
|
|
||||||
b
|
b
|
||||||
|
|||||||
Reference in New Issue
Block a user