aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2011-06-03 10:11:02 -0700
committerShawn O. Pearce <sop@google.com>2011-06-03 10:13:42 -0700
commitcc644979af3c5fb79a1075c160b129470fb19052 (patch)
tree25b765fab8a5acfc2013b969769c74ba6ba744d9
parentad9a1422fd67efbd71ee87cc5e6f282398a27084 (diff)
downloadprolog-cafe-cc644979af3c5fb79a1075c160b129470fb19052.tar.gz
Clean up builtins.pl
- Remove some commented out code. - Fix usage of $get_level/1 to use $get_current_B/1 instead.
-rw-r--r--src/builtin/builtins.pl11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/builtin/builtins.pl b/src/builtin/builtins.pl
index 8583e28..139529d 100644
--- a/src/builtin/builtins.pl
+++ b/src/builtin/builtins.pl
@@ -14,7 +14,6 @@ package(_).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:- public true/0, therwise/0.
:- public fail/0, false/0.
-%:- public (!)/0, '$get_level'/1, '$neck_cut'/0, '$cut'/1.
:- public (!)/0.
:- public (^)/2.
:- public (',')/2.
@@ -29,9 +28,6 @@ fail :- fail.
false :- fail.
!.
-%'$get_level'(X) :- '$get_level'(X).
-%'$neck_cut' :- '$neck_cut'.
-%'$cut'(X) :- '$cut'(X).
(_ ^ G) :- call(G).
@@ -46,7 +42,6 @@ false :- fail.
(_IF -> _THEN; ELSE) :- call(ELSE).
call(Term) :-
- %'$get_level'(Cut),
'$get_current_B'(Cut),
'$meta_call'(Term, user, Cut, 0, interpret).
@@ -120,7 +115,6 @@ call(Term) :-
'$new_internal_database'(P),
hash_contains_key(P, FA),
!,
- %'$get_level'(Cut),
'$get_current_B'(Cut),
Depth1 is Depth + 1,
clause(P:X, Body),
@@ -130,7 +124,6 @@ call(Term) :-
:- public catch/3, throw/1.
:- public on_exception/3.
-%:- public raise_exception/1. (written in Java)
catch(Goal, Catch, Recovery) :-
on_exception(Catch, Goal, Recovery).
@@ -2084,8 +2077,6 @@ consult(File) :- atom(File), !, '$consult'(File).
print_message(info, [File,'consulted,',T,msec]),
close(In).
-%'$prolog_file_name'(File, File) :- sub_atom(File, _, 3, 0, '.pl'), !.
-%'$prolog_file_name'(File, File) :- sub_atom(File, _, 4, 0, '.pro'), !.
'$prolog_file_name'(File, File) :- sub_atom(File, _, _, After, '.'), After > 0, !.
'$prolog_file_name'(File0, File) :- atom_concat(File0, '.pl', File).
@@ -2228,7 +2219,7 @@ leash(L) :- illarg(type('leash_specifier'), leash(L), 1).
%%% Trace a Goal
'$trace_goal'(Term) :-
'$set_debug_flag'(leap, no),
- '$get_level'(Cut),
+ '$get_current_B'(Cut),
'$meta_call'(Term, user, Cut, 0, trace).
'$trace_goal'(X, P, FA, Depth) :-