aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorGuillaume Melquiond2020-08-31 14:10:21 +0200
committerGuillaume Melquiond2020-11-13 15:13:23 +0100
commit20c511d4a80c26a54004a9b44b3108669baa86c3 (patch)
tree7f9a19abb6ad32395806fcfffd108a1004f1226d /kernel
parent0d6f8e4b12e09e8a5a7e562a80d962dca69da7af (diff)
Optimize Is_accu a bit.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/byterun/coq_interp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/byterun/coq_interp.c b/kernel/byterun/coq_interp.c
index 67e6bed0d9..72f6e12b0f 100644
--- a/kernel/byterun/coq_interp.c
+++ b/kernel/byterun/coq_interp.c
@@ -193,7 +193,9 @@ if (sp - num_args < coq_stack_threshold) { \
#endif
#endif
-#define Is_accu(v) (Is_block(v) && Tag_val(v) == Closure_tag && Code_val(v) == accumulate)
+/* We should also check "Code_val(v) == accumulate" to be sure,
+ but Is_accu is only used in places where closures cannot occur. */
+#define Is_accu(v) (Is_block(v) && Tag_val(v) == Closure_tag)
#define CheckPrimArgs(cond, apply_lbl) do{ \
if (cond) pc++; \