Merge branch 'master' of ../yap-6.2

This commit is contained in:
Vítor Santos Costa 2010-12-06 20:16:05 +00:00
commit 7874c790f3
5 changed files with 882 additions and 871 deletions

View File

@ -1861,6 +1861,7 @@ Yap_absmi(int inp)
#else
B = B->cp_b;
#endif /* YAPOR */
goto fail;
ENDBOp();
#ifdef YAPOR

View File

@ -16795,6 +16795,16 @@ Notice that this function returns a term, and not an atom. You can
@section Miscellaneous C Functions
@table @code
@item @code{void} YAP_Throw(@code{YAP_Term exception})
@item @code{void} YAP_AsyncThrow(@code{YAP_Term exception})
@findex YAP_Throw (C-Interface function)
@findex YAP_AsyncThrow (C-Interface function)
Throw an exception with term @var{exception}, just like if you called
@code{throw/2}. The function @t{YAP_AsyncThrow} is supposed to be used
from interrupt handlers.
@c See also @code{at_halt/1}.
@item @code{int} YAP_SetYAPFlag(@code{yap_flag_t flag, int value})
@findex YAP_SetYAPFlag (C-Interface function)
@ -16811,6 +16821,7 @@ function is called with two arguments: the exit code of the process (@code{0}
if this cannot be determined on your operating system) and the closure
argument @var{closure}.
@c See also @code{at_halt/1}.
@end table

File diff suppressed because it is too large Load Diff

View File

@ -34,17 +34,15 @@ gen_defs(Inp,Out) :-
nb_getval(atom_counter, Pos),
NPos is Pos+1,
nb_setval(atom_counter, NPos),
OffPos is Pos*2+1,
number_codes(OffPos, Val),
append(["#define ATOM_",Atom," ",Val], Out).
number_codes(Pos, Val),
append(["#define ATOM_",Atom," (",Val,"*2+1)"], Out).
gen_defs(Inp,Out) :-
split(Inp," ",["F",Functor,Arity]), !,
nb_getval(functor_counter, Pos),
NPos is Pos+1,
nb_setval(functor_counter, NPos),
OffPos is Pos*4+2,
number_codes(OffPos, Val),
append(["#define FUNCTOR_",Functor,Arity," ",Val], Out).
number_codes(Pos, Val),
append(["#define FUNCTOR_",Functor,Arity," (",Val,"*4+2)"], Out).
gen_init(Inp,Out) :-

View File

@ -159,19 +159,6 @@ true :- true.
'$enter_top_level' :-
'$clean_up_dead_clauses',
fail.
% use if we come from a save_program and we have SWI's shlib
'$enter_top_level' :-
recorded('$reload_foreign_libraries',G,R),
erase(R),
shlib:reload_foreign_libraries,
fail.
% use if we come from a save_program and we have a goal to execute
'$enter_top_level' :-
recorded('$restore_goal',G,R),
erase(R),
prompt(_,' | '),
'$system_catch'('$do_yes_no'((G->true),user),user,Error,user:'$Error'(Error)),
fail.
'$enter_top_level' :-
'$nb_getval'('$break',BreakLevel,fail),
'$debug_on'(DBON),
@ -201,6 +188,7 @@ true :- true.
'$read_vars'(user_input,Command,_,Pos,Varnames),
nb_setval('$spy_gn',1),
% stop at spy-points if debugging is on.
nb_setval('$debug_run',off),
nb_setval('$debug_jump',off),
prompt(_,' |: '),
@ -213,6 +201,19 @@ true :- true.
set_value('$extend_file_search_path',[]),
'$extend_file_search_path'(P),
fail.
% use if we come from a save_program and we have SWI's shlib
'$startup_goals' :-
recorded('$reload_foreign_libraries',G,R),
erase(R),
shlib:reload_foreign_libraries,
fail.
% use if we come from a save_program and we have a goal to execute
'$startup_goals' :-
recorded('$restore_goal',G,R),
erase(R),
prompt(_,' | '),
'$system_catch'('$do_yes_no'((G->true),user),user,Error,user:'$Error'(Error)),
fail.
'$startup_goals' :-
recorded('$startup_goal',G,_),
'$current_module'(Module),