summaryrefslogtreecommitdiff
path: root/upb/pb
AgeCommit message (Collapse)Author
2019-03-27Moved macros from upb.h to port_def.inc to avoid leaking them to users. (#160)Joshua Haberman
* Use port_def.inc to prevent macros from leaking to users. * Added helpful comments to port_def.inc/port_undef.inc.
2019-03-14Merge pull request #151 from linux-on-ibm-z/masterJoshua Haberman
Adding support for big endian platform (s390x)
2019-02-25Removing the 'byteswap.h' header which is not portableShahid
Incorporating code review changes: https://github.com/google/upb/pull/151#discussion_r257529497
2019-02-02Update varint.int.hShahid
2019-01-25A few more fixes.Josh Haberman
2019-01-25text_printer.h now successfully compiles.Josh Haberman
2019-01-25A few more Google fixes.Josh Haberman
2019-01-25Correct TextPrinterPtr.Josh Haberman
2019-01-23Some more fixes for PHP.Joshua Haberman
2019-01-19Some fixes for PHP.Joshua Haberman
2019-01-17Merge branch 'arrayapi' into defcleanupJoshua Haberman
2019-01-16Supprot FieldMask json encoding/decoding. (#147)Paul Yang
2019-01-16Removed the JIT. Nobody was actually using it, and table-driven should ↵Joshua Haberman
achieve 80-90% of the perf.
2019-01-15Added some comments and reversed upb_arena_cleanup() args.Joshua Haberman
2019-01-15Take sinks by value.Joshua Haberman
2019-01-15Build & fix the JIT.Joshua Haberman
2019-01-15All tests pass again!Joshua Haberman
2019-01-14WIP.Joshua Haberman
2019-01-12A lot more tests are working now.Joshua Haberman
2019-01-12Removed old-style C++ handlers that relied on UB in favor of more normal ones.Joshua Haberman
2019-01-09upb_refcounted is gone! Some tests still to fix.Joshua Haberman
2018-12-10WIP, core library compiles now.Joshua Haberman
2018-09-11WIP.Josh Haberman
2017-09-25Modify TODOBo Yang
2017-09-25Change parameter type from enum opcode to int.Bo Yang
If the compiler elects to represent enum E as a char rather than an int (per 6.7.2.2p4), the call to va_start() will have undefined behavior.
2017-09-25Fixed JIT for unknown fields. (#1)Joshua Haberman
2017-09-20Do not expose encode_unknownBo Yang
2017-09-19Remove upb_pb_encoder_encode_unknownBo Yang
2017-09-19Remove unused declaration.Bo Yang
2017-09-19Use upb_sink_putunknown for reserve unknownBo Yang
2017-09-19Remove upb_addunknown_handlerfunc and upb_handlers_setaddunknownBo Yang
2017-09-19Reserve unknown fields in upbBo Yang
1. For decoding, an unknownfields will be lazily created on message, which contains bytes of unknown fields. 2. For encoding, if the unknownfields is present on message, all bytes contained in it will be serialized.
2017-07-17New encode/decode: most (171 / 192) conformance tests pass.Joshua Haberman
2017-03-14Deleted some dead code related to varint decoding.Josh Haberman
2017-02-06Bug fix: When encoding, negative int32 values should be padded to int64 in ↵Bo Yang
order to be wire compatible
2017-01-21Moved upb_symtab to def.h/def.c.Josh Haberman
This is in anticipation of removing refcounting and making upb_symtab (soon to be upb_defpool) the unique owner of all defs inside.
2016-11-29Fixed some bugs surfaced by Travis.Josh Haberman
2016-05-12Added UPB_ASSERT() that helps avoid unused var warnings.Joshua Haberman
* Added UPB_ASSERT() that helps avoid unused var warnings. * Addressed PR comments. * Fixed assert in the JIT.
2016-04-19Split upb::Arena/upb::Allocator from upb::Environment. (#58)Joshua Haberman
* Split upb::Arena/upb::Allocator from upb::Environment. This will allow arenas and allocators to be used independently of environments, which will be important for an upcoming change (a message representation). Overall this design feels cleaner that the previous Environment/SeededAllocator design. As part of this change, moved all allocations in upb to use a global allocator instead of hard-coding malloc/free. This will allow injecting OOM faults for more robust testing. One place that doesn't use the global allocator is the tracked ref code. Instead of its previous approach of CHECK_OOM() after every malloc() or table insert, it simply uses an allocator that does this automatically. I moved Allocator/Arena/Environment into upb.h. This seems principled since these are the only types in upb whose size is directly exposed to users, since they form the basis of memory allocation strategy. * Cleaned up some header includes and fixed more malloc -> upb_gmalloc(). * Changes from PR review. * Don't use UINTPTR_MAX or UINT64_MAX. * Punt on adding line/file for now. * We actually can't store (uint64_t)-1, update comment and test.
2016-04-05Added upb::FileDef, which represents the file defs are declared in.Josh Haberman
It is entirely optional: MessageDef/EnumDef can still exist on their own. But this can represent a def's file when it is desirable to do so (eg. for code generators). This approach will require that we change the way we handle extensions. But I think it will be a good change overall. Specifically, we previously handled extensions by duplicating the extended message and then adding the extension as a regular field to the duplicated message. This required also duplicating any messages that could reach the extended message. In the new world we will need a way of declaring and looking up extensions separately from the message being extended. This change also involves some notable changes to the generated code: - files are now called foo.upbdefs.h instead of foo.upb.h. This reflects the fact that we might possibly generate several different output files for a .proto file, and this one is just for defs. - we no longer generate selectors in the .h file. - the upbdefs.c no longer vends a SymbolTable. Now it vends the individual messages (and possibly a FileDef later). I think this will compose better once we can generate files where one generated files imports another. We also make the descriptor reader vend a list of FileDefs now. This is the best conceptual match for parsing a FileDescriptorSet.
2016-01-19Optimized upb_inttable_compact(): it shrinks inttables more now.Josh Haberman
2015-12-30Make sure upb_pbdecoder.status is initializedMattia Barbon
Otherwhise the end message callback is passed a garbage value.
2015-08-19Refer to a shared definition for max buffered bytes.Josh Haberman
2015-08-14Added lots of decoder tests and fixed lots of bugs.Josh Haberman
2015-08-11More decoder fixes, and slightly changed parse call semantics.Josh Haberman
Prior to this change, if an error was returned, it would be guaranteed to always return a short byte count. Now the two concepts are a bit more orthogonal. There are cases where the entire input is consumed even though an error was encountered.
2015-07-31Decoder fix: skipped data at end of submessage.Josh Haberman
2015-07-30Fixed PR for JIT-enabled builds.Josh Haberman
2015-07-30Changed parser semantics around skipping.Josh Haberman
Prior to this change: parse(buf, len) -> len + N ...would indicate that the next N bytes of the input are not needed, *and* would advance the decoding position by this much. After this change: parse(buf, len) -> len + N parse(NULL, N) -> N ...can be used to achieve the same thing. But skipping the N bytes is not explicitly performed by the user. A user that doesn't want/need to skip can just say: parsed = parse(buf, len); if (parsed < len) { // Handle suspend, advance stream by "parsed". } else { // Stream was advanced by "len" (even if parsed > len). } Updated unit tests to test this new behavior, and refactored test utility code a bit to support it.
2015-07-07Brought into compliance with Google open-source policies.Josh Haberman
- removed myself from Author headers in source files. - removed copyright notices from source file headers. - added CONTRIBUTING.md
2015-07-07Moved DynASM to third_party to comply with Google policy.Josh Haberman
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback