fix clone on copy values
This commit is contained in:
@@ -1055,7 +1055,7 @@ fn generate_instruction_preface() -> TokenStream {
|
|||||||
constants.iter().map(|(c, ptr)| {
|
constants.iter().map(|(c, ptr)| {
|
||||||
functor!(
|
functor!(
|
||||||
atom!(":"),
|
atom!(":"),
|
||||||
[cell((c.clone())), indexing_code_ptr((*ptr))]
|
[cell((*c)), indexing_code_ptr((*ptr))]
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -698,9 +698,9 @@ mod tests {
|
|||||||
let functor = variadic_functor(
|
let functor = variadic_functor(
|
||||||
atom!("switch_on_constants"),
|
atom!("switch_on_constants"),
|
||||||
1,
|
1,
|
||||||
constants.iter().map(|(c, ptr)| {
|
constants
|
||||||
functor!(atom!(":"), [cell((c.clone())), indexing_code_ptr((*ptr))])
|
.iter()
|
||||||
}),
|
.map(|(c, ptr)| functor!(atom!(":"), [cell((*c)), indexing_code_ptr((*ptr))])),
|
||||||
);
|
);
|
||||||
|
|
||||||
heap.truncate(0);
|
heap.truncate(0);
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ fn merge_indices(
|
|||||||
);
|
);
|
||||||
|
|
||||||
retraction_info.push_record(RetractionRecord::AddedIndex(
|
retraction_info.push_record(RetractionRecord::AddedIndex(
|
||||||
skeleton[clause_index].opt_arg_index_key.clone(),
|
skeleton[clause_index].opt_arg_index_key,
|
||||||
clause_loc,
|
clause_loc,
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
@@ -246,7 +246,7 @@ fn remove_index_from_subsequence(
|
|||||||
// appear anywhere inside an Internal record.
|
// appear anywhere inside an Internal record.
|
||||||
retraction_info.push_record(RetractionRecord::RemovedIndex(
|
retraction_info.push_record(RetractionRecord::RemovedIndex(
|
||||||
index_loc,
|
index_loc,
|
||||||
opt_arg_index_key.clone(),
|
*opt_arg_index_key,
|
||||||
offset,
|
offset,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -808,7 +808,7 @@ fn prepend_compiled_clause(
|
|||||||
skeleton.clauses[0].clause_start = clause_loc + 2;
|
skeleton.clauses[0].clause_start = clause_loc + 2;
|
||||||
|
|
||||||
retraction_info.push_record(RetractionRecord::AddedIndex(
|
retraction_info.push_record(RetractionRecord::AddedIndex(
|
||||||
skeleton.clauses[0].opt_arg_index_key.clone(),
|
skeleton.clauses[0].opt_arg_index_key,
|
||||||
skeleton.clauses[0].clause_start,
|
skeleton.clauses[0].clause_start,
|
||||||
));
|
));
|
||||||
|
|
||||||
@@ -1070,7 +1070,7 @@ fn append_compiled_clause(
|
|||||||
skeleton.clauses[target_pos].opt_arg_index_key += index_loc - 1;
|
skeleton.clauses[target_pos].opt_arg_index_key += index_loc - 1;
|
||||||
|
|
||||||
retraction_info.push_record(RetractionRecord::AddedIndex(
|
retraction_info.push_record(RetractionRecord::AddedIndex(
|
||||||
skeleton.clauses[target_pos].opt_arg_index_key.clone(),
|
skeleton.clauses[target_pos].opt_arg_index_key,
|
||||||
skeleton.clauses[target_pos].clause_start,
|
skeleton.clauses[target_pos].clause_start,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user