modules
This commit is contained in:
parent
af1fcdac19
commit
d3370ee141
@ -191,7 +191,10 @@ eval0(Int fi) {
|
||||
#if YAPOR_SBA
|
||||
RINT((Int)B);
|
||||
#else
|
||||
if (B)
|
||||
RINT(LCL0 - (CELL *)B);
|
||||
else
|
||||
RINT(0);
|
||||
#endif
|
||||
case op_env:
|
||||
/// - $env
|
||||
|
@ -680,6 +680,8 @@ void Yap_MYDDAS_delete_all_myddas_structs(void) {
|
||||
|
||||
void init_myddas(void) {
|
||||
CACHE_REGS
|
||||
Term cm=CurrentModule;
|
||||
CurrentModule = USER_MODULE;
|
||||
if (myddas_initialised)
|
||||
return;
|
||||
#ifdef __ANDROID__
|
||||
@ -713,6 +715,7 @@ void init_myddas(void) {
|
||||
#endif
|
||||
c_db_initialize_myddas(PASS_REGS1);
|
||||
myddas_initialised = TRUE;
|
||||
CurrentModule = cm;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -38,15 +38,16 @@
|
||||
% --------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
:- use_module(lists,[
|
||||
append/3,
|
||||
member/2
|
||||
]).
|
||||
|
||||
:- module(myddas_prolog2sql,[
|
||||
translate/3,
|
||||
queries_atom/2
|
||||
]).
|
||||
|
||||
:- use_module(lists,[
|
||||
append/3,
|
||||
member/2
|
||||
]).
|
||||
|
||||
|
||||
:- use_module(myddas_prolog2sql_optimizer,[
|
||||
|
@ -25,7 +25,6 @@ go :-
|
||||
writeln(('tracks -> tracks')).
|
||||
|
||||
go :-
|
||||
start_low_level_trace,
|
||||
writeln(db_get_attributes_types),
|
||||
db_get_attributes_types(albums,Als),
|
||||
format('~w -> ~w~n',[albums,Als]),
|
||||
@ -41,6 +40,7 @@ go :-
|
||||
writeln(As:Als:Ts).
|
||||
|
||||
go :-
|
||||
|
||||
db_describe(albums, Desc), writeln(albums:Desc).
|
||||
go :-
|
||||
db_describe(tracks, Desc), writeln(tracks:Desc).
|
||||
@ -54,6 +54,7 @@ go :-
|
||||
writeln(T:tableinfo(FieldID,Type,Null,Primary,Default,'')).
|
||||
|
||||
go :-
|
||||
writeln(access),
|
||||
go_cut0.
|
||||
|
||||
|
||||
@ -74,7 +75,7 @@ go :-
|
||||
writeln(X:Y).
|
||||
|
||||
go_cut0 :-
|
||||
% start_low_level_trace,
|
||||
start_low_level_trace,
|
||||
artists(X,Y),
|
||||
writeln(X:Y),
|
||||
!.
|
||||
|
@ -476,8 +476,6 @@ 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).
|
||||
|
@ -332,8 +332,6 @@ meta_predicate(P) :-
|
||||
'$expand_goals'(A,A1,AO0,HM,SM,BM,HVars),
|
||||
'$expand_goals'(B,B1,BO,HM,SM,BM,HVars),
|
||||
'$clean_cuts'(AO0, AO).
|
||||
'$expand_goals'(not(A),not(A1),('$current_choice_point'(CP),AO,'$$cut_by'(CP) -> fail; true),HM,SM,BM,HVars) :- !,
|
||||
'$expand_goals'(A,A1,AO,HM,SM,BM,HVars).
|
||||
'$expand_goals'(if(A,B,C),if(A1,B1,C1),
|
||||
('$current_choice_point'(DCP),AO,yap_hacks:cut_at(DCP),BO; CO),HM,SM,BM,HVars) :- !,
|
||||
'$expand_goals'(A,A1,AO0,HM,SM,BM,HVars),
|
||||
|
Reference in New Issue
Block a user