summaryrefslogtreecommitdiff
path: root/upb
AgeCommit message (Collapse)Author
2015-05-18Updates from code review comments.Josh Haberman
2015-05-17Restructure tables for C89 port and smaller size.Josh Haberman
Changes the data layout of tables slightly so that string keys are prefixed with their size, rather than the size being inline in the table itself. This has a few benefits: 1. inttables shrink a bit, because there is no longer a wasted and unused size field sitting in them. 2. This avoids the need to have a union in the table. This is important for an impending C89 port of upb, since C89 has literally no way of statically initializing a non-first union member.
2015-05-16JIT bugfix: align stack properly on getbytes_slow.Josh Haberman
2015-05-16Enabled asserts() and verbosity for most Travis builds.Josh Haberman
Also added a separate ndebug build for testing that -DNDEBUG builds still work. Also disabled reference debugging by default, since it requires either a global lock or -DUPB_THREAD_UNSAFE.
2015-05-15Merge pull request #19 from cfallin/upb-seededalloc-fixJoshua Haberman
Bugfix: seeded_alloc() should not realloc() user-provided memory.
2015-05-15Bugfix: seeded_alloc() should not realloc() user-provided memory.Chris Fallin
2015-05-15Decoder bugfix.Josh Haberman
Don't back up decoder after skipunknown() unless we actually successfully consumed input data.
2015-05-13Enable Travis for Clang, and enable -Werror for all Travis builds.Josh Haberman
Also added an extra Clang-only warning flag.
2015-05-13Changes to Lua module loading, and file generation.Josh Haberman
This change has several parts: 1. Resurrected tools/upbc. The code was all there but the build was broken for open-source. Now you can type "make tools/upbc" and it will build all necessary Lua modules and create a robust shell script for running upbc. 2. Changed Lua module loading to no longer rely on OS-level .so dependencies. The net effect of this is that you now only need to set LUA_PATH and LUA_CPATH; setting LD_LIBRARY_PATH or rpaths is no longer required. Downside: this drops compatibility with Lua 5.1, since it depends on a feature that only exists in Lua >=5.2 (and LuaJIT). 3. Since upbc works again, I fixed the re-generation of the descriptor files (descriptor.upb.h, descriptor.upb.c). "make genfiles" will re-generate these as well as the JIT code generator. 4. Added a Travis test target that ensures that the checked-in generated files are not out of date. I would do this for the Ragel generated file also, but we can't count on all versions of Ragel to necessarily generate identical output. 5. Changed Makefile to no longer automatically run Ragel to regenerate the JSON parser. This is unfortuante, because it's convenient when you're developing the JSON parser. However, "git clone" sometimes skews the timestamps a little bit so that "make" thinks it needs to regenerate these files for a fresh "git clone." This would normally be harmless, but if the user doesn't have Ragel installed, it makes the build fail completely. So now you have to explicitly regenerate the Ragel output. If you want to you can uncomment the auto-generation during development.
2015-05-08Fixes for the open-source build.Josh Haberman
2015-05-08Merge from open-source development.Josh Haberman
2015-05-08Google-internal development.Josh Haberman
2015-05-06Resolve compilation errors if compiled with more stringent semantic checks.Martin Maly
Adding Travis test to build with strict warnings. Fixing a warning in a test which used signed/unsigned integer comparison.
2015-02-02Fixed JSON parser issue: missing NUL byte in parse_number() in some codeChris Fallin
paths. Also, fix unused-function warnings.
2015-02-02Support maps in JSON parsing and serialization.Chris Fallin
This is a sync of our internal developing of JSON parsing and serialization. It implements native understanding of MapEntry submessages, so that map fields with (key, value) pairs are serialized as JSON maps (objects) natively rather than as arrays of objects with 'key' and 'value' fields. The parser also now understands how to emit handler calls corresponding to MapEntry objects when processing a map field. This sync also picks up a bugfix in `table.c` to handle an alloc-failed case.
2015-01-14Support oneof defs in upb.Chris Fallin
This change adds support for a OneofDef (upb_oneofdef), which represents a 'oneof' as introduced by Protocol Buffers. This is semantically a union type that contains fields and in turn may be added to a MessageDef. This change does not alter parsing or the handler abstraction in any way, because a oneof has impact only at a higher semantic level (i.e., any sort of storage of the fields in a message object), which is user-specific with respect to upb.
2015-01-09Coverage support for coveralls.io.Josh Haberman
2015-01-08Fix for JSON parser: don't overrun buffer parsing ints.Josh Haberman
2015-01-07Changes from Google-internal development.Josh Haberman
* JSON parser expanded to handle split buffers. * bugfix to the protobuf decoder.
2014-12-18Modified strtable to support length-delimited string keys. Allows forChris Fallin
arbitrary binary data, e.g., to support strings from other languages as key values.
2014-12-15Added msgdef flag to indicate map_entry protos.Chris Fallin
2014-12-12Amalgamated distribution (upb.c/upb.h) tool.Chris Fallin
There are a number of tweaks to get this to work: - The #include dependence graph wasn't quite complete, and I had to add a few #includes to get the tool to work. - I had to change a number of symbol names to avoid conflicts between 'static' definitions in different .c files. This could be avoided if the tool were smart enough to rename static symbols to have unique prefixes instead, but (i) this requires semantic understanding of C, and (ii) the macro-defined static functions (e.g., handlers for primitive types in several places) would probably trip this up. Verified that the resulting upb.h/upb.c compiles and doesn't have any unresolved references.
2014-12-09Decoder bugfix, .gitignore update, and delete obsolete files.Josh Haberman
2014-12-09JSON test, symbolic enum names in JSON, and a few improvements.Chris Fallin
- Added a JSON test that round-trips (parses then re-serializes) several test messages, ensuring that the re-serialized form matches the original exactly. - Added support for printing and parsing symbolic enum names (rather than integer values) in JSON. - Updated JSON printer to properly handle string fields that come in multiple pieces. ('bytes' fields still do not support this, and this work is more challenging because it requires making the base64 encoder resumable. Base64 encoding is not separable at an input-byte granularity, unlike string escaping.) - Fixed a < vs. <= bug in UTF-8 encoding generation (oops).
2014-12-05Sync update: haberman@'s internal changes.Chris Fallin
2014-12-05Update JSON parser to emit UTF8 to string fields appropriately.Chris Fallin
2014-12-04Synced to post-code-review JSON printer.Chris Fallin
2014-12-04JSON printer: remove dependency on YAJL, using a hand-rolled printer instead.Chris Fallin
2014-12-03Sync from Google-internal development.Josh Haberman
Most notably, a JSON parser is now provided.
2014-11-18Sync to Google-internal development.Josh Haberman
2014-09-01Added lua and core32 Travis builds, and rewrote README.mdJosh Haberman
2014-09-01Enable more Travis configurations.Josh Haberman
2014-08-31Rewrite of build system.Josh Haberman
Notable changes: - We now only build things by default that require no dependencies. So you can build upb even if you don't have Lua or Google protobuf installed. - Checked in a pre-built version of the JIT, so you don't need Lua installed at build time to run DynASM. It will still notice if you change the .dasc file and attempt to re-run DynASM in that case. - The build system now builds all modules of upb into separate libraries, reflecting the modularity that is already inherent in upb's design. This should make it easier to trim the fat. - removed the GDB JIT interface. I wasn't using it much; using a .so is easier and more robust.
2014-08-30Fix in test_cpp for bad macro expansion.Josh Haberman
2014-08-30Fixed build and added Travis CI support.Josh Haberman
2014-08-09Added optimization note.Josh Haberman
2014-08-09Make the absence of perf-cppflags give a good default build.Josh Haberman
Defaults are now: - thread-safe with GCC/Clang - Debugging not enabled (enable with -UNDEBUG)
2014-08-09Fixed some bugs and added accessors.Josh Haberman
2014-08-01Beginnings of a prototype Ruby extension.Josh Haberman
2014-07-29Added UPB_UNTRACKED_REF and some more handler overload options.Josh Haberman
2014-07-24Sync from Google-internal development.Josh Haberman
2014-07-02Sync from internal Google development.Josh Haberman
2014-06-26Sync from internal Google development.Josh Haberman
2014-02-04Sync from Google development.Josh Haberman
2014-01-21Sync to internal Google development.Josh Haberman
2013-12-20Sync from Google-internal development.Josh Haberman
2013-10-24Build fix for Mac OS X.Josh Haberman
2013-10-24Fixes to make the open-source build compile on Linux.Josh Haberman
2013-10-24Merge from Google-internal development:Josh Haberman
- 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.
2013-05-28Fix to compile on Linux.Josh Haberman
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback