new catch and throw mechanism (first try).
hide built-in predicates that should not be seen in trace mode git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@275 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
44
pl/utils.yap
44
pl/utils.yap
@@ -361,37 +361,37 @@ statistics :-
|
||||
|
||||
'$statistics'(Runtime,CPUtime,Walltime,HpSpa,HpInUse,_HpMax,TrlSpa, TrlInUse,_TrlMax,StkSpa, GlobInU, LocInU,GlobMax,LocMax,NOfHO,TotHOTime,NOfSO,TotSOTime,NOfTO,TotTOTime,NOfGC,TotGCTime,TotGCSize) :-
|
||||
TotalMemory is HpSpa+StkSpa+TrlSpa,
|
||||
format(user_error,"memory (total)~t~d bytes~35+~n", [TotalMemory]),
|
||||
format(user_error," program space~t~d bytes~35+", [HpSpa]),
|
||||
format(user_error,":~t ~d in use~19+", [HpInUse]),
|
||||
'$format'(user_error,"memory (total)~t~d bytes~35+~n", [TotalMemory]),
|
||||
'$format'(user_error," program space~t~d bytes~35+", [HpSpa]),
|
||||
'$format'(user_error,":~t ~d in use~19+", [HpInUse]),
|
||||
HpFree is HpSpa-HpInUse,
|
||||
format(user_error,",~t ~d free~19+~n", [HpFree]),
|
||||
format(user_error," stack space~t~d bytes~35+", [StkSpa]),
|
||||
'$format'(user_error,",~t ~d free~19+~n", [HpFree]),
|
||||
'$format'(user_error," stack space~t~d bytes~35+", [StkSpa]),
|
||||
StackInUse is GlobInU+LocInU,
|
||||
format(user_error,":~t ~d in use~19+", [StackInUse]),
|
||||
'$format'(user_error,":~t ~d in use~19+", [StackInUse]),
|
||||
StackFree is StkSpa-StackInUse,
|
||||
format(user_error,",~t ~d free~19+~n", [StackFree]),
|
||||
format(user_error," global stack:~t~35+", []),
|
||||
format(user_error," ~t ~d in use~19+", [GlobInU]),
|
||||
format(user_error,",~t ~d max~19+~n", [GlobMax]),
|
||||
format(user_error," local stack:~t~35+", []),
|
||||
format(user_error," ~t ~d in use~19+", [LocInU]),
|
||||
format(user_error,",~t ~d max~19+~n", [LocMax]),
|
||||
format(user_error," trail stack~t~d bytes~35+", [TrlSpa]),
|
||||
format(user_error,":~t ~d in use~19+", [TrlInUse]),
|
||||
'$format'(user_error,",~t ~d free~19+~n", [StackFree]),
|
||||
'$format'(user_error," global stack:~t~35+", []),
|
||||
'$format'(user_error," ~t ~d in use~19+", [GlobInU]),
|
||||
'$format'(user_error,",~t ~d max~19+~n", [GlobMax]),
|
||||
'$format'(user_error," local stack:~t~35+", []),
|
||||
'$format'(user_error," ~t ~d in use~19+", [LocInU]),
|
||||
'$format'(user_error,",~t ~d max~19+~n", [LocMax]),
|
||||
'$format'(user_error," trail stack~t~d bytes~35+", [TrlSpa]),
|
||||
'$format'(user_error,":~t ~d in use~19+", [TrlInUse]),
|
||||
TrlFree is TrlSpa-TrlInUse,
|
||||
format(user_error,",~t ~d free~19+~n", [TrlFree]),
|
||||
'$format'(user_error,",~t ~d free~19+~n", [TrlFree]),
|
||||
OvfTime is TotHOTime+TotSOTime+TotTOTime,
|
||||
format(user_error,"~n~t~3f~12+ sec. for ~w code, ~w stack, and ~w trail space overflows~n",
|
||||
'$format'(user_error,"~n~t~3f~12+ sec. for ~w code, ~w stack, and ~w trail space overflows~n",
|
||||
[OvfTime,NOfHO,NOfSO,NOfTO]),
|
||||
format(user_error,"~t~3f~12+ sec. for ~w garbage collections which collected ~d bytes~n",
|
||||
'$format'(user_error,"~t~3f~12+ sec. for ~w garbage collections which collected ~d bytes~n",
|
||||
[TotGCTime,NOfGC,TotGCSize]),
|
||||
RTime is float(Runtime)/1000,
|
||||
format(user_error,"~t~3f~12+ sec. runtime~n", [RTime]),
|
||||
'$format'(user_error,"~t~3f~12+ sec. runtime~n", [RTime]),
|
||||
CPUTime is float(CPUtime)/1000,
|
||||
format(user_error,"~t~3f~12+ sec. cputime~n", [CPUTime]),
|
||||
'$format'(user_error,"~t~3f~12+ sec. cputime~n", [CPUTime]),
|
||||
WallTime is float(Walltime)/1000,
|
||||
format(user_error,"~t~3f~12+ sec. elapsed time~n~n", [WallTime]),
|
||||
'$format'(user_error,"~t~3f~12+ sec. elapsed time~n~n", [WallTime]),
|
||||
fail.
|
||||
'$statistics'(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_).
|
||||
|
||||
@@ -492,7 +492,7 @@ unknown(V0,V) :-
|
||||
'$unknown_warning'(P) :-
|
||||
P=M:F,
|
||||
functor(F,Na,Ar),
|
||||
format(user_error,"[ EXISTENCE ERROR: ~w, procedure ~w:~w/~w undefined ]~n",
|
||||
'$format'(user_error,"[ EXISTENCE ERROR: ~w, procedure ~w:~w/~w undefined ]~n",
|
||||
[P,M,Na,Ar]),
|
||||
fail.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user