don't replace undefined module predicates (#2232)
This commit is contained in:
@@ -497,19 +497,21 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (key, code_index) in removed_module.code_dir.iter_mut() {
|
for (key, code_index) in removed_module.code_dir.iter_mut() {
|
||||||
if skipped_local_predicates.contains(&key) {
|
if skipped_local_predicates.contains(key) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let old_index_ptr = code_index.replace(IndexPtr::undefined());
|
if !code_index.is_undefined() && !code_index.is_dynamic_undefined() {
|
||||||
|
let old_index_ptr = code_index.replace(IndexPtr::undefined());
|
||||||
|
|
||||||
self.payload
|
self.payload
|
||||||
.retraction_info
|
.retraction_info
|
||||||
.push_record(RetractionRecord::ReplacedModulePredicate(
|
.push_record(RetractionRecord::ReplacedModulePredicate(
|
||||||
module_name,
|
module_name,
|
||||||
*key,
|
*key,
|
||||||
old_index_ptr,
|
old_index_ptr,
|
||||||
));
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (key, skeleton) in removed_module.extensible_predicates.drain(..) {
|
for (key, skeleton) in removed_module.extensible_predicates.drain(..) {
|
||||||
|
|||||||
Reference in New Issue
Block a user