This commit is contained in:
Vitor Santos Costa 2018-10-29 13:32:29 +00:00
parent 0d8e28af3e
commit a491f71cb0
4 changed files with 1554 additions and 1248 deletions

View File

@ -1925,7 +1925,7 @@ const char *Yap_dump_stack(void) {
}
if (!max_count--) {
ADDBUF(snprintf(lbuf, lbufsz , "%% .....~n"));
return pop_output_text_stack(lvl, lbuf);
return pop_output_text_stack(lvl, buf);
}
ipc = (yamop *)(env_ptr[E_CP]);
env_ptr = (CELL *)(env_ptr[E_E]);
@ -1933,7 +1933,7 @@ const char *Yap_dump_stack(void) {
if (b_ptr) {
if (!max_count--) {
ADDBUF(snprintf(lbuf, lbufsz , "// .....~n"));
return pop_output_text_stack(lvl, lbuf);
return pop_output_text_stack(lvl, buf);
}
if (b_ptr->cp_ap && /* tabling */
b_ptr->cp_ap->opc != Yap_opcode(_or_else) &&
@ -1949,7 +1949,7 @@ const char *Yap_dump_stack(void) {
}
}
}
return pop_output_text_stack(lvl, lbuf);
return pop_output_text_stack(lvl, buf);
}
void DumpActiveGoals(USES_REGS1) {

File diff suppressed because it is too large Load Diff

View File

@ -131,10 +131,8 @@ prolog:message_to_string(Event, Message) :-
% The first is used for errors and warnings that can be related
% to source-location. Note that syntax errors have their own
% source-location and should therefore not be handled this way.
compose_message( Term, Level ) -->
[' ~w:'- [Level]
],
prolog:message(Term), !.
compose_message( Term, _Level ) -->
message(Term), !.
compose_message( query(_QueryResult,_), _Level) -->
[].
compose_message( absolute_file_path(File), _Level) -->
@ -281,13 +279,13 @@ location( error(_,Info), Level, LC ) -->
query_exception(prologPredModule, Desc, M),
query_exception(prologPredName, Desc, Na),
query_exception(prologPredArity, Desc, Ar),
query_exception(prologStack, Desc, St)
query_exception(prologStack, Desc, Stack)
},
!,
display_consulting( File, Level, Info, LC ),
{simplify_pred(M:Na/Ar,FF)},
[ '~a:~d:0 ~a while executing ~q:'-[File, FilePos,Level,FF] ],
( { Stack == [] } -> [] ; [ nl, '~s'- [] ]).
( { Stack == [] } -> [] ; [ nl, Stack- [] ]).
location( error(_,Info), Level, LC ) -->
{ '$error_descriptor'(Info, Desc) },
{

View File

@ -422,7 +422,7 @@ valid_test_mode(Options0, Options) :-
test_mode(true(_)).
test_mode(all(_)).
test_mode(set(_)).
test_mode(fail).
test_mode(fail(_)).
test_mode(throws(_)).
@ -509,7 +509,7 @@ verify_options([H|T], Pred) :-
test_option(Option) :-
test_set_option(Option), !.
test_option(true(_)).
test_option(fail).
test_option(fail(_)).
test_option(throws(_)).
test_option(all(_)).
test_option(set(_)).
@ -889,7 +889,7 @@ run_test_6(Unit, Name, Line, Options, Body, Result) :-
option(set(Answer), Options), !, % set(Bindings)
nondet_test(set(Answer), Unit, Name, Line, Options, Body, Result).
run_test_6(Unit, Name, Line, Options, Body, Result) :-
option(fail, Options), !, % fail
option(fail(true), Options), !, % fail
unit_module(Unit, Module),
( setup(Module, test(Unit,Name,Line), Options)
-> statistics(runtime, [T0,_]),