From 0438e245a15e91aac93a5df812ce292dd1ff681b Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 15 Jun 2019 18:38:20 +0200 Subject: [PATCH] add emit_INTEGERP --- src/comp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/comp.c b/src/comp.c index a18ed07391b..1b1401caff9 100644 --- a/src/comp.c +++ b/src/comp.c @@ -572,6 +572,7 @@ declare_PSEUDOVECTORP (void) static gcc_jit_rvalue * emit_BIGNUMP (gcc_jit_rvalue *obj) { + /* PSEUDOVECTORP (x, PVEC_BIGNUM); */ gcc_jit_rvalue *args[2] = { obj, gcc_jit_context_new_rvalue_from_int (comp.ctxt, @@ -643,6 +644,17 @@ emit_XFIXNUM (gcc_jit_rvalue *obj) comp.inttypebits); } +static gcc_jit_rvalue * +emit_INTEGERP (gcc_jit_rvalue *obj) +{ + return gcc_jit_context_new_binary_op (comp.ctxt, + NULL, + GCC_JIT_BINARY_OP_LOGICAL_OR, + comp.bool_type, + emit_FIXNUMP (obj), + emit_BIGNUMP (obj)); +} + static gcc_jit_rvalue * emit_make_fixnum (gcc_jit_block *block, gcc_jit_rvalue *obj) { -- 2.39.5