[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 293/437: Do not have assertions with a long type test
From: |
Andy Wingo |
Subject: |
[Guile-commits] 293/437: Do not have assertions with a long type test |
Date: |
Mon, 2 Jul 2018 05:14:39 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit dbf2847e4799296057fc1b83b3c111676845fc28
Author: pcpa <address@hidden>
Date: Sun Aug 10 11:33:00 2014 -0300
Do not have assertions with a long type test
* lib/lightning.c: Change assertions to have an int
result and correct a bad bit mask assertion.
---
ChangeLog | 5 +++++
lib/lightning.c | 18 +++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dd6698c..c4d7df1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2014-08-10 Paulo Andrade <address@hidden>
+ * lib/lightning.c: Change assertions to have an int
+ result and correct a bad bit mask assertion.
+
+2014-08-10 Paulo Andrade <address@hidden>
+
* lib/jit_aarch64.c: Correct bad setup for assertion
of consistency before a patch.
diff --git a/lib/lightning.c b/lib/lightning.c
index ba18396..2a89dd1 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -236,7 +236,7 @@ _jit_get_reg(jit_state_t *_jit, jit_int32_t regspec)
!jit_regset_tstbit(&_jitc->regarg, regno) &&
!(regspec & jit_class_nospill)) {
spill:
- assert(_jitc->function);
+ assert(_jitc->function != NULL);
if (spec & jit_class_gpr) {
if (!_jitc->function->regoff[regno]) {
_jitc->function->regoff[regno] =
@@ -275,7 +275,7 @@ _jit_get_reg(jit_state_t *_jit, jit_int32_t regspec)
if (jit_class(_rvs[regno].spec) & jit_class_sav) {
/* if will modify callee save registers without a
* function prolog, better patch this assertion */
- assert(_jitc->function);
+ assert(_jitc->function != NULL);
if (!jit_regset_tstbit(&_jitc->function->regset, regno)) {
jit_regset_setbit(&_jitc->function->regset, regno);
_jitc->again = 1;
@@ -330,7 +330,7 @@ _jit_unget_reg(jit_state_t *_jit, jit_int32_t regno)
jit_load(regno);
jit_regset_clrbit(&_jitc->regsav, regno);
}
- assert(jit_regset_tstbit(&_jitc->regarg, regno));
+ assert(jit_regset_tstbit(&_jitc->regarg, regno) != 0);
jit_regset_clrbit(&_jitc->regarg, regno);
}
@@ -527,7 +527,7 @@ _jit_load(jit_state_t *_jit, jit_int32_t reg)
reg = jit_regno(reg);
assert(!_jitc->realize);
- assert(_jitc->spill[reg]);
+ assert(_jitc->spill[reg] != NULL);
node = jit_new_node_w(jit_code_load, reg);
/* create a path to flag the save/load is not required */
node->link = _jitc->spill[reg];
@@ -549,11 +549,11 @@ jit_pointer_t
_jit_address(jit_state_t *_jit, jit_node_t *node)
{
assert(_jitc->done);
- assert(node &&
+ assert(node != NULL &&
/* If a node type that is documented to be a fixed marker */
(node->code == jit_code_note || node->code == jit_code_name ||
/* If another special fixed marker, returned by jit_indirect() */
- (node->code == jit_code_label && (node->flag & jit_flag_use))));
+ (node->code == jit_code_label && (node->flag & jit_flag_use) !=
0)));
return ((jit_pointer_t)node->u.w);
}
@@ -1130,7 +1130,7 @@ _jit_link(jit_state_t *_jit, jit_node_t *node)
void
_jit_prepare(jit_state_t *_jit)
{
- assert(_jitc->function);
+ assert(_jitc->function != NULL);
_jitc->function->call.call = jit_call_default;
_jitc->function->call.argi =
_jitc->function->call.argf =
@@ -1152,11 +1152,11 @@ void
_jit_ellipsis(jit_state_t *_jit)
{
if (_jitc->prepare) {
- assert(!_jitc->function->call.call & jit_call_varargs);
+ assert(!(_jitc->function->call.call & jit_call_varargs));
_jitc->function->call.call |= jit_call_varargs;
}
else {
- assert(!_jitc->function->self.call & jit_call_varargs);
+ assert(!(_jitc->function->self.call & jit_call_varargs));
_jitc->function->self.call |= jit_call_varargs;
}
}
- [Guile-commits] 257/437: Correct misplaced check for already visited blocks, (continued)
- [Guile-commits] 257/437: Correct misplaced check for already visited blocks, Andy Wingo, 2018/07/02
- [Guile-commits] 301/437: GNU lightning 2.0.5 release, Andy Wingo, 2018/07/02
- [Guile-commits] 206/437: Correct jit implementation to pass several test cases., Andy Wingo, 2018/07/02
- [Guile-commits] 297/437: Do not filter -sz.c files in gitignore, Andy Wingo, 2018/07/02
- [Guile-commits] 255/437: IA64: Force sync of instructions in get-jit-size build mode., Andy Wingo, 2018/07/02
- [Guile-commits] 306/437: x86: Build and pass all tests under cygwin64 (Windows x64), Andy Wingo, 2018/07/02
- [Guile-commits] 352/437: Update documentation, Andy Wingo, 2018/07/02
- [Guile-commits] 357/437: Make more readable always true test, Andy Wingo, 2018/07/02
- [Guile-commits] 311/437: Implement jit_frame and jit_tramp interfaces, Andy Wingo, 2018/07/02
- [Guile-commits] 312/437: Use jit_code_last_code as symbolic name of last enum, Andy Wingo, 2018/07/02
- [Guile-commits] 293/437: Do not have assertions with a long type test,
Andy Wingo <=
- [Guile-commits] 384/437: ia64: Do not use a dangling pointer for double to integer copy, Andy Wingo, 2018/07/02
- [Guile-commits] 203/437: Make it simpler to add support for more than 64 registers., Andy Wingo, 2018/07/02
- [Guile-commits] 415/437: Build and pass all test cases on Alpha Linux, Andy Wingo, 2018/07/02
- [Guile-commits] 142/437: Make current test cases pass in armv7l., Andy Wingo, 2018/07/02
- [Guile-commits] 188/437: Add framework for sparc port., Andy Wingo, 2018/07/02
- [Guile-commits] 227/437: Cosmetic removal of unused macros., Andy Wingo, 2018/07/02
- [Guile-commits] 330/437: Resync with new patch to make functions receive a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 185/437: Store all annotation information in the read only data buffer., Andy Wingo, 2018/07/02
- [Guile-commits] 170/437: Test and correct test cases in all current backends., Andy Wingo, 2018/07/02
- [Guile-commits] 368/437: Implement jit_allocar for dynamic stack allocation, Andy Wingo, 2018/07/02