summaryrefslogtreecommitdiff
path: root/upb/pb
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2016-01-19 18:26:18 -0800
committerJosh Haberman <jhaberman@gmail.com>2016-01-19 18:26:18 -0800
commit0d18e1f7e3e43e34c44e46fd609da40c95d9e3e3 (patch)
treed9272bc37c5b64aabcbd214cd4a614d97dfd1896 /upb/pb
parent002f57f8c5519010d85b4c5d1d06cea38495de0b (diff)
Optimized upb_inttable_compact(): it shrinks inttables more now.
Diffstat (limited to 'upb/pb')
-rw-r--r--upb/pb/compile_decoder.c7
1 files changed, 6 insertions, 1 deletions
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback