From e86b28911fdefc65f8ad99ffd67dcc22af73038b Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sun, 17 Jan 2010 00:03:55 +0000 Subject: [PATCH] improve performance of depth_limit call. --- pl/arith.yap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pl/arith.yap b/pl/arith.yap index 440d09e1c..dfa616909 100644 --- a/pl/arith.yap +++ b/pl/arith.yap @@ -50,6 +50,9 @@ do_not_compile_expressions :- set_value('$c_arith',[]). nonvar(G), G = (Mod:G1), !, '$do_c_built_metacall'(G1, Mod, OUT). +'$do_c_built_in'(call(G), Mod, OUT) :- + var(G), !, + '$do_c_built_metacall'(G, Mod, OUT). '$do_c_built_in'(depth_bound_call(G,D), M, OUT) :- !, '$do_c_built_in'(G, M, NG), % make sure we don't have something like (A,B) -> $depth_next(D), A, B.