-
I see this term "Evacuable" a lot in some of the Scryer Prolog source code
I can't really figure out what that's supposed to be. 🤔 Anyone have any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
I understand it as a "ghost" value, it has attached Rust function inside VM. |
Beta Was this translation helpful? Give feedback.
-
Or here: compile_term(Term, Evacuable) :-
expand_terms_and_goals(Term, Terms),
!,
( var(Terms) ->
instantiation_error(load/1)
; Terms = [_|_] ->
compile_dispatch_or_clause_on_list(list(Term), Terms, Evacuable)
; compile_dispatch_or_clause(term(Term), Terms, Evacuable)
). This looks like a REALLY fun predicate, but ... WHAT IS EVACUABLE?? 😭 |
Beta Was this translation helpful? Give feedback.
-
Closest I can find is this: scryer-prolog/src/machine/loader.rs Lines 367 to 389 in 2f47343 It looks like these are things removed from the state or cleaned up, possibly to facilitate reloading modules during dynamic sessions? |
Beta Was this translation helpful? Give feedback.
-
I forgot why I called it |
Beta Was this translation helpful? Give feedback.
I forgot why I called it
Evacuable
. It's meant to be theLoadState
, which has a number of subtypes depending on what phase the load takes place.BootstrappingLoadState
compiles builtins and other essential libraries without term and goal expansion directly from Rust while the other types do it with term and goal expansion, from the Prolog dispatch loop.