diff options
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/parsestream.upb.c (renamed from benchmarks/parsestream.upb_table.c) | 1 | ||||
-rw-r--r-- | benchmarks/parsetostruct.upb.c (renamed from benchmarks/parsetostruct.upb_table.c) | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/benchmarks/parsestream.upb_table.c b/benchmarks/parsestream.upb.c index a4022b1..37ccb42 100644 --- a/benchmarks/parsestream.upb_table.c +++ b/benchmarks/parsestream.upb.c @@ -52,6 +52,7 @@ static bool initialize() } upb_handlers *handlers = upb_handlers_new(); + if (!JIT) handlers->should_jit = false; // Cause all messages to be read, but do nothing when they are. upb_handlerset hset = {NULL, NULL, value, startsubmsg, NULL, NULL, NULL}; upb_handlers_reghandlerset(handlers, def, &hset); diff --git a/benchmarks/parsetostruct.upb_table.c b/benchmarks/parsetostruct.upb.c index 88f355d..a436fd4 100644 --- a/benchmarks/parsetostruct.upb_table.c +++ b/benchmarks/parsetostruct.upb.c @@ -42,7 +42,11 @@ static bool initialize() upb_stringsrc_init(&strsrc); upb_stringsrc_reset(&strsrc, str, len); - upb_decoder_initformsgdef(&d, def); + upb_handlers *h = upb_handlers_new(); + upb_accessors_reghandlers(h, def); + if (!JIT) h->should_jit = false; + upb_decoder_initforhandlers(&d, h); + upb_handlers_unref(h); if (!BYREF) { // TODO: use byref/byval accessors. |