ensure order
This commit is contained in:
parent
408333f0d4
commit
242844d12f
@ -19,28 +19,23 @@
|
|||||||
|
|
||||||
% This protects all code from further changes
|
% This protects all code from further changes
|
||||||
% and also makes it impossible from some predicates to be seen
|
% and also makes it impossible from some predicates to be seen
|
||||||
'$protect' :-
|
|
||||||
fail,
|
|
||||||
'$system_mod'( M ),
|
|
||||||
'$current_predicate'(_A, M, T0, Flags),
|
|
||||||
NFlags is Flags \/ 0x00004000,
|
|
||||||
'$flags'(M:T0, Flags, NFlags),
|
|
||||||
fail.
|
|
||||||
'$protect' :-
|
'$protect' :-
|
||||||
current_atom(Name),
|
current_atom(Name),
|
||||||
atom_codes(Name,[0'$|_]),
|
sub_atom(Name,0,1,_,'$'),
|
||||||
% '$hide_predicates'(Name),
|
'$hide'(Name),
|
||||||
'$hide'(Name).
|
'$current_predicate'(Name, Mod, P, _Flags0),
|
||||||
'$protect' :-
|
|
||||||
'$hide_predicates'(bootstrap),
|
|
||||||
'$hide'(bootstrap).
|
|
||||||
'$protect'.
|
|
||||||
|
|
||||||
'$hide_predicates'(Name) :-
|
|
||||||
'$current_predicate'(Name, Mod, P, _),
|
|
||||||
'$hide_predicate'(P,Mod),
|
'$hide_predicate'(P,Mod),
|
||||||
fail.
|
fail.
|
||||||
'$hide_predicates'(_).
|
'$protect' :-
|
||||||
|
'$hide'(bootstrap),
|
||||||
|
'$hide_predicate'(bootstrap),
|
||||||
|
fail.
|
||||||
|
'$protect'.
|
||||||
|
|
||||||
|
'$notrace_predicate'(Mod:P, Flags0) :-
|
||||||
|
Flags is Flags0 \/ 0x400000000,
|
||||||
|
'$flags'(P, Mod, Flags0, Flags ).
|
||||||
|
|
||||||
% hide all atoms who start by '$'
|
% hide all atoms who start by '$'
|
||||||
'$hide'('$VAR') :- !, fail. /* not $VAR */
|
'$hide'('$VAR') :- !, fail. /* not $VAR */
|
||||||
|
Reference in New Issue
Block a user