add read support for user:term_expansion and user:goal_expansion
This commit is contained in:
@@ -665,9 +665,9 @@ pub(crate) trait CallPolicy: Any {
|
||||
machine_st.b0 = machine_st.b;
|
||||
|
||||
machine_st.p = match hook {
|
||||
CompileTimeHook::TermExpansion =>
|
||||
CompileTimeHook::UserTermExpansion | CompileTimeHook::TermExpansion =>
|
||||
CodePtr::Local(LocalCodePtr::UserTermExpansion(0)),
|
||||
CompileTimeHook::GoalExpansion =>
|
||||
CompileTimeHook::UserGoalExpansion | CompileTimeHook::GoalExpansion =>
|
||||
CodePtr::Local(LocalCodePtr::UserGoalExpansion(0))
|
||||
};
|
||||
|
||||
|
||||
@@ -131,14 +131,15 @@ impl<'a, R: Read> TermStream<'a, R> {
|
||||
#[inline]
|
||||
pub fn incr_expansion_lens(&mut self, hook: CompileTimeHook, len: usize, queue_len: usize) {
|
||||
match hook {
|
||||
CompileTimeHook::TermExpansion => {
|
||||
CompileTimeHook::UserTermExpansion => {
|
||||
self.term_expansion_lens.0 += len;
|
||||
self.term_expansion_lens.1 += queue_len;
|
||||
},
|
||||
CompileTimeHook::GoalExpansion => {
|
||||
CompileTimeHook::UserGoalExpansion => {
|
||||
self.goal_expansion_lens.0 += len;
|
||||
self.goal_expansion_lens.1 += queue_len;
|
||||
}
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user