[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/comp-static-data af569fa3d90 2/2: src/comp.c: Simplify alloc_cla
From: |
Vibhav Pant |
Subject: |
scratch/comp-static-data af569fa3d90 2/2: src/comp.c: Simplify alloc_class_check. |
Date: |
Thu, 9 Mar 2023 00:51:22 -0500 (EST) |
branch: scratch/comp-static-data
commit af569fa3d90a717983b743eb97adbf869c6d1736
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>
src/comp.c: Simplify alloc_class_check.
---
src/comp.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/comp.c b/src/comp.c
index 54ebcdcfcdb..89708fa8f68 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -2605,16 +2605,14 @@ emit_export_const_lisp_obj_var (const char *name,
gcc_jit_rvalue *val)
static void
alloc_class_check (Lisp_Object alloc_class)
{
- bool valid = EQ (alloc_class, Qd_default) ||
- EQ (alloc_class, Qd_impure) ||
- EQ (alloc_class, Qd_ephemeral);
- if (!valid)
- {
- xsignal2 (Qnative_ice,
- build_string ("invalid lisp data allocation class"),
- alloc_class);
- assume (false);
- }
+ if ((EQ (alloc_class, Qd_default)
+ || EQ (alloc_class, Qd_impure)
+ || EQ (alloc_class, Qd_ephemeral)))
+ return;
+
+ xsignal2 (Qnative_ice,
+ build_string ("invalid lisp data allocation class"),
+ alloc_class);
}
static gcc_jit_lvalue *