summaryrefslogtreecommitdiff
path: root/upb/pb/compile_decoder_x64.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2016-05-12 11:54:34 -0700
committerJoshua Haberman <jhaberman@gmail.com>2016-05-12 11:54:34 -0700
commitfa338b70a602d9f5657528d0322535959a92d4b0 (patch)
treea7ec8b8d61a1ff3657aff99316ec51a8b81726ad /upb/pb/compile_decoder_x64.h
parente16ed470be7d0d459e85e1d7b43893358a625d34 (diff)
Added UPB_ASSERT() that helps avoid unused var warnings.
* Added UPB_ASSERT() that helps avoid unused var warnings. * Addressed PR comments. * Fixed assert in the JIT.
Diffstat (limited to 'upb/pb/compile_decoder_x64.h')
-rw-r--r--upb/pb/compile_decoder_x64.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/upb/pb/compile_decoder_x64.h b/upb/pb/compile_decoder_x64.h
index 5d2b95a..ce775c6 100644
--- a/upb/pb/compile_decoder_x64.h
+++ b/upb/pb/compile_decoder_x64.h
@@ -338,7 +338,7 @@ static upb_func *gethandler(const upb_handlers *h, upb_selector_t sel) {
static void asmlabel(jitcompiler *jc, const char *fmt, ...) {
#ifndef NDEBUG
int ofs = jc->dynasm->section->ofs;
- assert(ofs != jc->lastlabelofs);
+ UPB_ASSERT(ofs != jc->lastlabelofs);
jc->lastlabelofs = ofs;
#endif
@@ -370,7 +370,7 @@ static bool alwaysok(const upb_handlers *h, upb_selector_t sel) {
bool ok = upb_handlers_getattr(h, sel, &attr);
bool ret;
- UPB_ASSERT_VAR(ok, ok);
+ UPB_ASSERT(ok);
ret = upb_handlerattr_alwaysok(&attr);
upb_handlerattr_uninit(&attr);
return ret;
@@ -964,7 +964,7 @@ static void jitprimitive(jitcompiler *jc, opcode op,
case UPB_TYPE_STRING:
case UPB_TYPE_BYTES:
case UPB_TYPE_MESSAGE:
- assert(false); break;
+ UPB_ASSERT(false); break;
}
/*| sethas CLOSURE, data->hasbit */
if (data->hasbit >= 0) {
@@ -1188,7 +1188,7 @@ static void jitdispatch(jitcompiler *jc,
/*| // This key will never be in the array part, so do a hash lookup. */
dasm_put(Dst, 2035, UPB_MAX_FIELDNUMBER);
# 793 "upb/pb/compile_decoder_x64.dasc"
- assert(has_hash_entries);
+ UPB_ASSERT(has_hash_entries);
/*| ld64 dispatch */
{
uintptr_t v = (uintptr_t)dispatch;
@@ -1240,7 +1240,7 @@ static void jittag(jitcompiler *jc, uint64_t tag, int n, int ofs,
uint32_t *delimend = (jc->pc - 1) + last_arg;
const size_t ptr_words = sizeof(void*) / sizeof(uint32_t);
- assert((last_instruction & 0xff) == OP_CHECKDELIM);
+ UPB_ASSERT((last_instruction & 0xff) == OP_CHECKDELIM);
if (getop(*(jc->pc - 1)) == OP_TAGN) {
jc->pc += ptr_words;
@@ -1715,7 +1715,7 @@ static void jitbytecode(jitcompiler *jc) {
# 1132 "upb/pb/compile_decoder_x64.dasc"
break;
case OP_HALT:
- assert(false);
+ UPB_ASSERT(false);
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback