missing syspreds

This commit is contained in:
Vitor Santos Costa 2018-06-27 16:37:08 +01:00
parent 58136ead22
commit f2d6c99c8a
3 changed files with 13 additions and 15 deletions

View File

@ -55,8 +55,8 @@
+ specialise versions for some built-ins, if we are aware of the
run-time execution mode
The user has some control over this process, through some
built-ins and through execution flsgs.
The user has control over this process, through
built-ins and through prolog flags.
*/
@ -93,7 +93,7 @@ compile_expressions :- set_value('$c_arith',true).
After a call to this predicate, arithmetical expressions will not be compiled.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~
?- source, do_not_compile_expressions.
yes
?- [user].
@ -111,8 +111,8 @@ p(A):-
q(A):-
A is 22.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~
*/
do_not_compile_expressions :- set_value('$c_arith',[]).
@ -132,6 +132,7 @@ do_c_built_in('$do_error'( Error, Goal), M, Head,
throw(error(Error,M:(Head :- Goal)))
) :- !.
do_c_built_in(system_error( Error, Goal), M, Head, ErrorG) :-
!,
do_c_built_in('$do_error'( Error, Goal), M, Head, ErrorG).
do_c_built_in(X is Y, M, H, P) :-
primitive(X), !,
@ -149,8 +150,10 @@ do_c_built_in(X is Y, _, _, P) :-
'$drop_is'(X0, X, P0, P)
).
do_c_built_in(phrase(NT,Xs), Mod, H, NTXsNil) :-
!,
'$_arith':do_c_built_in(phrase(NT,Xs,[]), Mod, H, NTXsNil).
do_c_built_in(phrase(NT,Xs0,Xs), Mod, _, NewGoal) :-
!,
'$c_built_in_phrase'(NT, Xs0, Xs, Mod, NewGoal ).
do_c_built_in(Comp0, _, _, R) :- % now, do it for comparisons

View File

@ -303,8 +303,8 @@ initialize_prolog :-
'qly.yap',
'spy.yap',
'udi.yap'].
%:- stop_low_level_trace.
%:- start_low_level_trace.
:- meta_predicate(log_event(+,:)).
@ -316,7 +316,7 @@ initialize_prolog :-
:- ['protect.yap'].
version(yap,[6,3]).
version(yap,[6,4]).
:- op(1150,fx,(mode)).
@ -396,6 +396,7 @@ yap_hacks:cut_by(CP) :- '$$cut_by'(CP).
:- style_check([+discontiguous,+multiple,+single_var]).
%
% moved this to init_gc in gc.c to separate the alpha
%
@ -476,6 +477,8 @@ If this hook preodicate succeeds it must instantiate the _Action_ argument to t
:- dynamic user:exception/3.
:- start_low_level_trace.
:- ensure_loaded('../pl/pathconf.yap').
:- yap_flag(user:unknown,error).

View File

@ -74,17 +74,9 @@ Prints a list of all files in the current directory.
*/
ls :-
getcwd(X),
'$load_system_ls'(X,L),
list_directory(X, L),
'$do_print_files'(L).
'$load_system_ls'(X,L) :-
'$undefined'(directory_files(X, L), system),
load_files(library(system),[silent(true)]),
fail.
'$load_system_ls'(X,L) :-
system:directory_files(X, L).
'$do_print_files'([]) :-
nl.
'$do_print_files'([F| Fs]) :-