diff options
author | Josh Haberman <jhaberman@gmail.com> | 2013-10-24 12:43:19 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2013-10-24 12:43:19 -0700 |
commit | 26d98ca94f2f049e8767b4a9a33d185a3d7ea0fd (patch) | |
tree | 340bcf495f06ed05c9f3fb423f210caf4edce2b1 /upb/bytestream.upb.c | |
parent | 61109fca1f967771c21dc7184aee35f3b439c577 (diff) |
Merge from Google-internal development:
- rewritten decoder; interpreted decoder is bytecode-based,
JIT decoder no longer falls back to the interpreter.
- C++ improvements: C++11-compatible iterators, upb::reffed_ptr
for RAII refcounting, better upcast/downcast support.
- removed the gross upb_value abstraction from public upb.h.
Diffstat (limited to 'upb/bytestream.upb.c')
-rw-r--r-- | upb/bytestream.upb.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/upb/bytestream.upb.c b/upb/bytestream.upb.c index 4d84ec2..2da5405 100644 --- a/upb/bytestream.upb.c +++ b/upb/bytestream.upb.c @@ -9,14 +9,18 @@ const upb_fielddef upb_bytestream_fields[1]; const upb_enumdef upb_bytestream_enums[0]; const upb_tabent upb_bytestream_strentries[4]; const upb_tabent upb_bytestream_intentries[0]; -const _upb_value upb_bytestream_arrays[3]; +const _upb_value upb_bytestream_arrays[2]; + +#ifdef UPB_DEBUG_REFS +static upb_inttable reftables[4]; +#endif const upb_msgdef upb_bytestream_msgs[1] = { - UPB_MSGDEF_INIT("upb.ByteStream", UPB_INTTABLE_INIT(0, 0, 9, 0, NULL, &upb_bytestream_arrays[0], 3, 1), UPB_STRTABLE_INIT(1, 3, 9, 2, &upb_bytestream_strentries[0]), 5), + UPB_MSGDEF_INIT("upb.ByteStream", UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &upb_bytestream_arrays[0], 2, 1), UPB_STRTABLE_INIT(1, 3, UPB_CTYPE_PTR, 2, &upb_bytestream_strentries[0]), 5, &reftables[0], &reftables[1]), }; const upb_fielddef upb_bytestream_fields[1] = { - UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BYTES, 0, false, "bytes", 1, &upb_bytestream_msgs[0], NULL, 2, UPB_VALUE_INIT_NONE), + UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BYTES, 0, false, "bytes", 1, &upb_bytestream_msgs[0], NULL, 2, {0},&reftables[2], &reftables[3]), }; const upb_enumdef upb_bytestream_enums[0] = { @@ -32,9 +36,17 @@ const upb_tabent upb_bytestream_strentries[4] = { const upb_tabent upb_bytestream_intentries[0] = { }; -const _upb_value upb_bytestream_arrays[3] = { +const _upb_value upb_bytestream_arrays[2] = { UPB_ARRAY_EMPTYENT, UPB_VALUE_INIT_CONSTPTR(&upb_bytestream_fields[0]), - UPB_ARRAY_EMPTYENT, }; +#ifdef UPB_DEBUG_REFS +static upb_inttable reftables[4] = { + UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR), + UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR), + UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR), + UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR), +}; +#endif + |