autoload
This commit is contained in:
parent
2e8dd92d89
commit
101bdf0f6c
@ -70,13 +70,12 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
|||||||
#endif
|
#endif
|
||||||
YAP_FLAG(ARCH_FLAG, "arch", false, isatom, YAP_ARCH, NULL), /**<
|
YAP_FLAG(ARCH_FLAG, "arch", false, isatom, YAP_ARCH, NULL), /**<
|
||||||
read-only atom, it describes the ISA used in this version of YAP.
|
read-only atom, it describes the ISA used in this version of YAP.
|
||||||
Available from YAP_AEH.
|
Available from YAP_ARCH.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
YAP_FLAG(ARGV_FLAG, "argv", false, argv, "@boot", NULL),
|
YAP_FLAG(ARGV_FLAG, "argv", false, argv, "@boot", NULL),
|
||||||
YAP_FLAG(ARITHMETIC_EXCEPTIONS_FLAG, "arithmetic_exceptions", true,
|
YAP_FLAG(ARITHMETIC_EXCEPTIONS_FLAG, "arithmetic_exceptions", true,
|
||||||
booleanFlag, "true", NULL),
|
booleanFlag, "true", NULL),
|
||||||
/**< `arithmetic_exceptions`
|
/**<
|
||||||
|
|
||||||
Read-write flag telling whether arithmetic exceptions generate
|
Read-write flag telling whether arithmetic exceptions generate
|
||||||
Prolog exceptions. If enabled:
|
Prolog exceptions. If enabled:
|
||||||
@ -97,7 +96,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
|||||||
ProbLog.
|
ProbLog.
|
||||||
*/
|
*/
|
||||||
YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, "true", bqs),
|
YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, "true", bqs),
|
||||||
/**>
|
/**<
|
||||||
If _Value_ is unbound, tell whether a back quoted list of characters
|
If _Value_ is unbound, tell whether a back quoted list of characters
|
||||||
token is converted to a list of atoms, `chars`, to a list of integers,
|
token is converted to a list of atoms, `chars`, to a list of integers,
|
||||||
`codes`, or to a single atom, `atom`. If _Value_ is bound, set to
|
`codes`, or to a single atom, `atom`. If _Value_ is bound, set to
|
||||||
|
@ -274,13 +274,17 @@ load_files(_Files,_Opts).
|
|||||||
setarg( Id, TOpts, Val ).
|
setarg( Id, TOpts, Val ).
|
||||||
|
|
||||||
'$load_files'(Files, Opts, Call) :-
|
'$load_files'(Files, Opts, Call) :-
|
||||||
( '__NB_getval__'('$lf_status', OldTOpts, fail), nonvar(OldTOpts) - '$lf_opt'(autoload, OldTOpts, OldAutoload)
|
|
||||||
;
|
|
||||||
'$lf_option'(last_opt, LastOpt),
|
'$lf_option'(last_opt, LastOpt),
|
||||||
|
( '__NB_getval__'('$lf_status', OldTOpts, fail),
|
||||||
|
nonvar(OldTOpts)
|
||||||
|
->
|
||||||
|
'$lf_opt'(autoload, OldTOpts, OldAutoload)
|
||||||
|
;
|
||||||
|
current_prolog_flag(autoload, OldAutoload),
|
||||||
functor( OldTOpts, opt, LastOpt ),
|
functor( OldTOpts, opt, LastOpt ),
|
||||||
|
'$lf_opt'(autoload, OldTOpts, OldAutoload),
|
||||||
'$lf_opt'('$context_module', OldTOpts, user)
|
'$lf_opt'('$context_module', OldTOpts, user)
|
||||||
),
|
),
|
||||||
'$lf_option'(last_opt, LastOpt),
|
|
||||||
functor( TOpts, opt, LastOpt ),
|
functor( TOpts, opt, LastOpt ),
|
||||||
( source_location(ParentF, Line) -> true ; ParentF = user_input, Line = -1 ),
|
( source_location(ParentF, Line) -> true ; ParentF = user_input, Line = -1 ),
|
||||||
'$lf_opt'('$location', TOpts, ParentF:Line),
|
'$lf_opt'('$location', TOpts, ParentF:Line),
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
'$pred_exists'(G, user).
|
'$pred_exists'(G, user).
|
||||||
% autoload
|
% autoload
|
||||||
'$get_undefined_predicates'(G, ImportingMod, G0, ExportingMod) :-
|
'$get_undefined_predicates'(G, ImportingMod, G0, ExportingMod) :-
|
||||||
recorded('$dialect',swi,_),
|
|
||||||
prolog_flag(autoload, true),
|
prolog_flag(autoload, true),
|
||||||
prolog_flag(unknown, OldUnk, fail),
|
prolog_flag(unknown, OldUnk, fail),
|
||||||
(
|
(
|
||||||
|
@ -41,9 +41,7 @@
|
|||||||
nb_setval('$included_file',[]),
|
nb_setval('$included_file',[]),
|
||||||
nb_setval('$loop_streams',[]),
|
nb_setval('$loop_streams',[]),
|
||||||
\+ '$undefined'('$init_preds',prolog),
|
\+ '$undefined'('$init_preds',prolog),
|
||||||
'$init_preds',
|
'$init_preds'.
|
||||||
fail.
|
|
||||||
'$init_consult'.
|
|
||||||
|
|
||||||
'$init_win_graphics' :-
|
'$init_win_graphics' :-
|
||||||
'$undefined'(window_title(_,_), system), !.
|
'$undefined'(window_title(_,_), system), !.
|
||||||
|
Reference in New Issue
Block a user