include optimise flag.
This commit is contained in:
parent
8f713b01c7
commit
e49e59c705
@ -76,6 +76,11 @@ typedef struct {
|
|||||||
atom_t *for_code[256]; /* code --> one-char-atom */
|
atom_t *for_code[256]; /* code --> one-char-atom */
|
||||||
} atoms;
|
} atoms;
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
int optimise; /* -O: optimised compilation */
|
||||||
|
} cmdline;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{ ExtensionCell _ext_head; /* head of registered extensions */
|
{ ExtensionCell _ext_head; /* head of registered extensions */
|
||||||
ExtensionCell _ext_tail; /* tail of this chain */
|
ExtensionCell _ext_tail; /* tail of this chain */
|
||||||
@ -167,6 +172,7 @@ typedef struct PL_local_data {
|
|||||||
occurs_check_t occurs_check; /* Unify and occurs check */
|
occurs_check_t occurs_check; /* Unify and occurs check */
|
||||||
} feature;
|
} feature;
|
||||||
|
|
||||||
|
|
||||||
source_location read_source; /* file, line, char of last term */
|
source_location read_source; /* file, line, char of last term */
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
@ -994,7 +994,6 @@ initPrologFlags(void)
|
|||||||
#if defined(HAVE_GETPID) || defined(EMULATE_GETPID)
|
#if defined(HAVE_GETPID) || defined(EMULATE_GETPID)
|
||||||
setPrologFlag("pid", FT_INTEGER|FF_READONLY, getpid());
|
setPrologFlag("pid", FT_INTEGER|FF_READONLY, getpid());
|
||||||
#endif
|
#endif
|
||||||
setPrologFlag("optimise", FT_BOOL, GD->cmdline.optimise, PLFLAG_OPTIMISE);
|
|
||||||
setPrologFlag("generate_debug_info", FT_BOOL,
|
setPrologFlag("generate_debug_info", FT_BOOL,
|
||||||
truePrologFlag(PLFLAG_DEBUGINFO), PLFLAG_DEBUGINFO);
|
truePrologFlag(PLFLAG_DEBUGINFO), PLFLAG_DEBUGINFO);
|
||||||
setPrologFlag("last_call_optimisation", FT_BOOL, TRUE, PLFLAG_LASTCALL);
|
setPrologFlag("last_call_optimisation", FT_BOOL, TRUE, PLFLAG_LASTCALL);
|
||||||
@ -1100,6 +1099,8 @@ initPrologFlags(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* YAP_PROLOG */
|
#endif /* YAP_PROLOG */
|
||||||
|
/* Flags copied by YAP */
|
||||||
|
setPrologFlag("optimise", FT_BOOL, GD->cmdline.optimise, PLFLAG_OPTIMISE);
|
||||||
/* FLAGS used by PLStream */
|
/* FLAGS used by PLStream */
|
||||||
setPrologFlag("tty_control", FT_BOOL|FF_READONLY,
|
setPrologFlag("tty_control", FT_BOOL|FF_READONLY,
|
||||||
truePrologFlag(PLFLAG_TTY_CONTROL), PLFLAG_TTY_CONTROL);
|
truePrologFlag(PLFLAG_TTY_CONTROL), PLFLAG_TTY_CONTROL);
|
||||||
|
@ -67,6 +67,13 @@ yap_flag(fileerrors,X) :-
|
|||||||
yap_flag(fileerrors,X) :-
|
yap_flag(fileerrors,X) :-
|
||||||
'$swi_set_prolog_flag'(fileerrors, X).
|
'$swi_set_prolog_flag'(fileerrors, X).
|
||||||
|
|
||||||
|
% -O optimisation
|
||||||
|
yap_flag(optimise,X) :-
|
||||||
|
var(X), !,
|
||||||
|
'$swi_current_prolog_flag'(optimise, X).
|
||||||
|
yap_flag(optimise,X) :-
|
||||||
|
'$swi_set_prolog_flag'(optimise, X).
|
||||||
|
|
||||||
% control garbage collection
|
% control garbage collection
|
||||||
yap_flag(gc,V) :-
|
yap_flag(gc,V) :-
|
||||||
var(V), !,
|
var(V), !,
|
||||||
@ -834,6 +841,7 @@ yap_flag(dialect,yap).
|
|||||||
'$yap_system_flag'(n_of_integer_keys_in_db).
|
'$yap_system_flag'(n_of_integer_keys_in_db).
|
||||||
'$yap_system_flag'(open_expands_filename).
|
'$yap_system_flag'(open_expands_filename).
|
||||||
'$yap_system_flag'(open_shared_object).
|
'$yap_system_flag'(open_shared_object).
|
||||||
|
'$yap_system_flag'(optimise).
|
||||||
'$yap_system_flag'(profiling).
|
'$yap_system_flag'(profiling).
|
||||||
'$yap_system_flag'(prompt_alternatives_on).
|
'$yap_system_flag'(prompt_alternatives_on).
|
||||||
'$yap_system_flag'(readline).
|
'$yap_system_flag'(readline).
|
||||||
|
Reference in New Issue
Block a user