Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add commented out code for detecting redundant uses of the {}/1 con…
…trol construct
  • Loading branch information
pmoura committed Jun 22, 2018
1 parent a0d9161 commit 8445c44
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/core.pl
Expand Up @@ -11148,6 +11148,19 @@

% compiler bypass control construct (opaque to cuts)

%'$lgt_compile_body'({Pred}, _, _, Ctx) :-
% callable(Pred),
% '$lgt_comp_ctx'(Ctx, _, _, _, _, _, _, _, _, _, _, compile(_), _, _),
% '$lgt_compiler_flag'(suspicious_calls, warning),
% '$lgt_iso_spec_predicate'(Pred),
% \+ '$lgt_control_construct'(Pred),
% \+ '$lgt_pp_defines_predicate_'(Pred, _, _, _, _, _),
% % call to a standard Prolog predicate that is not being locally redefined
% '$lgt_increment_compiling_warnings_counter',
% '$lgt_source_file_context'(File, Lines, Type, Entity),
% '$lgt_print_message'(warning(suspicious_calls), core, suspicious_call(File, Lines, Type, Entity, {Pred}, Pred)),
% fail.

'$lgt_compile_body'({Pred}, TPred, '$lgt_debug'(goal({Pred}, TPred), ExCtx), Ctx) :-
!,
'$lgt_check'(var_or_callable, Pred),
Expand Down

0 comments on commit 8445c44

Please sign in to comment.