Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
This commit is contained in:
commit
b46fba7bd1
@ -1689,7 +1689,7 @@ Yap_absmi(int inp)
|
|||||||
if (ASP > (CELL *)PROTECT_FROZEN_B(B))
|
if (ASP > (CELL *)PROTECT_FROZEN_B(B))
|
||||||
ASP = (CELL *)PROTECT_FROZEN_B(B);
|
ASP = (CELL *)PROTECT_FROZEN_B(B);
|
||||||
saveregs();
|
saveregs();
|
||||||
if (!Yap_gcl(sz, 0, YENV, PREG)) {
|
if (!Yap_gcl(sz, PREG->u.Osbpi.p->ArityOfPE, YENV, PREG)) {
|
||||||
Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage);
|
Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage);
|
||||||
setregs();
|
setregs();
|
||||||
FAIL();
|
FAIL();
|
||||||
|
11
docs/yap.tex
11
docs/yap.tex
@ -3884,13 +3884,15 @@ Quotient.
|
|||||||
Integer quotient.
|
Integer quotient.
|
||||||
|
|
||||||
@item @var{X} mod @var{Y} [ISO]
|
@item @var{X} mod @var{Y} [ISO]
|
||||||
Integer remainder.
|
Integer module operator, always positive.
|
||||||
|
|
||||||
@item @var{X} rem @var{Y} [ISO]
|
@item @var{X} rem @var{Y} [ISO]
|
||||||
Integer remainder, the same as @code{mod}.
|
Integer remainder, similar to @code{mod} but always has the same sign
|
||||||
|
@code{X}.
|
||||||
|
|
||||||
@item @var{X} div @var{Y} [ISO]
|
@item @var{X} div @var{Y} [ISO]
|
||||||
Integer division, as if defined by @code{(@var{X} - @var{X} mod @var{Y}) // @var{Y}}.
|
Integer division, as if defined by @code{(@var{X} - @var{X} mod @var{Y})
|
||||||
|
// @var{Y}}.
|
||||||
|
|
||||||
@item exp(@var{X}) [ISO]
|
@item exp(@var{X}) [ISO]
|
||||||
Natural exponential.
|
Natural exponential.
|
||||||
@ -12931,7 +12933,8 @@ The argument to @code{block/1} is a condition on a goal or a conjunction
|
|||||||
of conditions, with each element separated by commas. Each condition is
|
of conditions, with each element separated by commas. Each condition is
|
||||||
of the form @code{predname(@var{C1},...,@var{CN})}, where @var{N} is the
|
of the form @code{predname(@var{C1},...,@var{CN})}, where @var{N} is the
|
||||||
arity of the goal, and each @var{CI} is of the form @code{-}, if the
|
arity of the goal, and each @var{CI} is of the form @code{-}, if the
|
||||||
argument must suspend until the variable is bound, or @code{?}, otherwise.
|
argument must suspend until the first such variable is bound, or
|
||||||
|
@code{?}, otherwise.
|
||||||
|
|
||||||
@item wait/1
|
@item wait/1
|
||||||
The argument to @code{wait/1} is a predicate descriptor or a conjunction
|
The argument to @code{wait/1} is a predicate descriptor or a conjunction
|
||||||
|
@ -87,7 +87,7 @@ A DollarUndef F "$undef"
|
|||||||
A DomainError N "domain_error"
|
A DomainError N "domain_error"
|
||||||
A E N "e"
|
A E N "e"
|
||||||
A EOFBeforeEOT N "end_of_file_found_before_end_of_term"
|
A EOFBeforeEOT N "end_of_file_found_before_end_of_term"
|
||||||
A EQ N "="
|
A EQ N "="
|
||||||
A EmptyAtom N ""
|
A EmptyAtom N ""
|
||||||
A EndOfStream N "$end_of_stream"
|
A EndOfStream N "$end_of_stream"
|
||||||
A Eof N "end_of_file"
|
A Eof N "end_of_file"
|
||||||
|
@ -166,8 +166,8 @@ redo_freeze(Done, _, _) :- nonvar(Done), !.
|
|||||||
%
|
%
|
||||||
% We still have some more conditions: continue the analysis.
|
% We still have some more conditions: continue the analysis.
|
||||||
%
|
%
|
||||||
redo_freeze(Done, _, '$when'(C, G, Done)) :- !,
|
redo_freeze(Done, _, when(C, G, Done)) :- !,
|
||||||
'$when'(C, G, Done).
|
when(C, G, Done).
|
||||||
|
|
||||||
%
|
%
|
||||||
% check if the variable was really bound
|
% check if the variable was really bound
|
||||||
@ -220,7 +220,7 @@ prolog:when(_,Goal) :-
|
|||||||
|
|
||||||
%
|
%
|
||||||
% support for when/2 like declaration.
|
% support for when/2 like declaration.
|
||||||
v%
|
%
|
||||||
%
|
%
|
||||||
% when will block on a conjunction or disjunction of nonvar, ground,
|
% when will block on a conjunction or disjunction of nonvar, ground,
|
||||||
% ?=, where ?= is both terms being bound together
|
% ?=, where ?= is both terms being bound together
|
||||||
|
@ -70,10 +70,8 @@ load_foreign_files(Objs,Libs,Entry) :-
|
|||||||
'$checklib_prefix'(NewObjCodes,[0'l,0'i,0'b|NewObjCodes]).
|
'$checklib_prefix'(NewObjCodes,[0'l,0'i,0'b|NewObjCodes]).
|
||||||
|
|
||||||
'$rooted_path'([C|_]) :- '$dir_separator'(C), !.
|
'$rooted_path'([C|_]) :- '$dir_separator'(C), !.
|
||||||
'$rooted_path'(Cs) :-
|
% windows drive z:\
|
||||||
% win32 machine
|
'$rooted_path'([_,0':,0'\\|_]) .
|
||||||
'$dir_separator'(0'\\),
|
|
||||||
'$get_drive'(Cs).
|
|
||||||
|
|
||||||
'$get_drive'([0':|_]) :- !.
|
'$get_drive'([0':|_]) :- !.
|
||||||
'$get_drive'([0'\\|_]) :- !, fail.
|
'$get_drive'([0'\\|_]) :- !, fail.
|
||||||
|
Reference in New Issue
Block a user