From 0d18e1f7e3e43e34c44e46fd609da40c95d9e3e3 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Tue, 19 Jan 2016 18:26:18 -0800 Subject: Optimized upb_inttable_compact(): it shrinks inttables more now. --- upb/pb/compile_decoder.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'upb/pb/compile_decoder.c') diff --git a/upb/pb/compile_decoder.c b/upb/pb/compile_decoder.c index b75f45c..a46e644 100644 --- a/upb/pb/compile_decoder.c +++ b/upb/pb/compile_decoder.c @@ -918,11 +918,16 @@ const mgroup *mgroup_new(const upb_handlers *dest, bool allowjit, bool lazy, #ifdef UPB_DUMP_BYTECODE { - FILE *f = fopen("/tmp/upb-bytecode", "wb"); + FILE *f = fopen("/tmp/upb-bytecode", "w"); assert(f); dumpbc(g->bytecode, g->bytecode_end, stderr); dumpbc(g->bytecode, g->bytecode_end, f); fclose(f); + + f = fopen("/tmp/upb-bytecode.bin", "wb"); + assert(f); + fwrite(g->bytecode, 1, g->bytecode_end - g->bytecode, f); + fclose(f); } #endif -- cgit v1.2.3