From 2588f5b7c507812a1137d0a7a1e60e8771bb301b Mon Sep 17 00:00:00 2001 From: Costa Vitor Date: Mon, 22 Jun 2009 16:03:14 -0500 Subject: [PATCH] make sure we count built-ins. --- C/compiler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C/compiler.c b/C/compiler.c index 5671b2a8c..91c05aa88 100644 --- a/C/compiler.c +++ b/C/compiler.c @@ -1090,10 +1090,6 @@ c_bifun(Int Op, Term t1, Term t2, Term t3, Term Goal, Term mod, compiler_struct save_machine_regs(); longjmp(cglobs->cint.CompilerBotch, OUT_OF_HEAP_BOTCH); } - if (profiling) - Yap_emit(enter_profiling_op, (CELL)RepPredProp(p0), Zero, &cglobs->cint); - else if (call_counting) - Yap_emit(count_call_op, (CELL)RepPredProp(p0), Zero, &cglobs->cint); c_args(Goal, 0, cglobs); Yap_emit(safe_call_op, (CELL)p0 , Zero, &cglobs->cint); Yap_emit(empty_call_op, Zero, Zero, &cglobs->cint); @@ -1814,6 +1810,10 @@ c_goal(Term Goal, Term mod, compiler_struct *cglobs) return; } else if (op >= _plus && op <= _functor) { + if (profiling) + Yap_emit(enter_profiling_op, (CELL)RepPredProp(p), Zero, &cglobs->cint); + else if (call_counting) + Yap_emit(count_call_op, (CELL)RepPredProp(p), Zero, &cglobs->cint); if (op == _functor) { c_functor(Goal, mod, cglobs); }