diff options
Diffstat (limited to 'upb/pb')
-rw-r--r-- | upb/pb/decoder.c | 6 | ||||
-rw-r--r-- | upb/pb/decoder_x64.dasc | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c index 1b5fc17..06125dd 100644 --- a/upb/pb/decoder.c +++ b/upb/pb/decoder.c @@ -96,7 +96,12 @@ void upb_decoderplan_unref(upb_decoderplan *p) { } bool upb_decoderplan_hasjitcode(upb_decoderplan *p) { +#ifdef UPB_USE_JIT_X64 return p->jit_code != NULL; +#else + (void)p; + return false; +#endif } @@ -537,6 +542,7 @@ void upb_decoder_resetplan(upb_decoder *d, upb_decoderplan *p, int msg_offset) { void upb_decoder_resetinput(upb_decoder *d, upb_byteregion *input, void *closure) { assert(d->plan); + assert(upb_byteregion_discardofs(input) == upb_byteregion_startofs(input)); upb_dispatcher_frame *f = upb_dispatcher_reset(&d->dispatcher, closure, d->plan->handlers->msgs[0]); upb_status_clear(&d->status); diff --git a/upb/pb/decoder_x64.dasc b/upb/pb/decoder_x64.dasc index 807191b..fa984ef 100644 --- a/upb/pb/decoder_x64.dasc +++ b/upb/pb/decoder_x64.dasc @@ -308,7 +308,6 @@ static void upb_assert_notnull(void *addr) { assert(addr != NULL); } // Decodes the next val into ARG3, advances PTR. static void upb_decoderplan_jit_decodefield(upb_decoderplan *plan, - upb_mhandlers *m, uint8_t type, size_t tag_size) { // Decode the value into arg 3 for the callback. switch (type) { @@ -559,7 +558,7 @@ static void upb_decoderplan_jit_field(upb_decoderplan *plan, uint64_t tag, return; } - upb_decoderplan_jit_decodefield(plan, m, f->type, tag_size); + upb_decoderplan_jit_decodefield(plan, f->type, tag_size); upb_decoderplan_jit_callcb(plan, f); // Epilogue: load next tag, check for repeated field. |