Joshua Haberman
7af638ff2d
Revive Lua extension.
...
It builds and you can inspect a symtab.
Still need to expose streaming and message
based interfaces.
14 years ago
Joshua Haberman
5137ac8d61
Update to latest descriptor.proto.
14 years ago
Joshua Haberman
4f9aeee6c7
More completely fixed the 0-key thing.
...
Unfortunately this degrades hash table lookup performance by
about 8%, which affects the streaming benchmark for googlemessage1
by about 5%. We could get this back at the cost of some memory,
but it would be nice to avoid that.
14 years ago
Joshua Haberman
6881b2c5cb
Added proper error about broken 0-values for enums.
14 years ago
Joshua Haberman
b037b3e8f7
Moved upbc -> src/
14 years ago
Joshua Haberman
4dce5ab709
Fix upbc and descriptorgen, and update descriptor.
14 years ago
Joshua Haberman
ddb74551f4
Cleanup Makefile and mv descriptor/ -> src/
14 years ago
Joshua Haberman
6bdbb45e88
Merged core/ and stream/ -> src/. The split wasn't worth it.
14 years ago
Joshua Haberman
6e308b7e80
Fix upb's parsetostruct benchmark.
14 years ago
Joshua Haberman
4667ed4be9
All tests pass again, valgrind-clean! Next up: benchmarks.
14 years ago
Joshua Haberman
3affb31926
Tons of work: we're close to passing test_vs_proto2 again.
14 years ago
Joshua Haberman
8465e5e650
Gutted upb_msg a bit, re-adding only the essentials.
14 years ago
Joshua Haberman
93099cccd1
upb_strstream compiles again.
...
That covers all source files except upb_msg!
14 years ago
Joshua Haberman
2c24cbb108
More work on decoder and stdio bytesrc/bytesink.
14 years ago
Joshua Haberman
93381f1411
Decoder compiles again! But probably doesn't work.
14 years ago
Joshua Haberman
2ea9737e5d
Added test_stream.c for testing upb_stream.h.
14 years ago
Joshua Haberman
a695b92cce
Debugging test_def, it's close to working again!
14 years ago
Joshua Haberman
4559918090
More work on upb_src.
14 years ago
Joshua Haberman
b471ca6b81
The last major revision to the upb_stream protocol.
...
Sources and sinks communicate by means of a
upb_handlers object, which encapsulates a set of
handler callbacks and will possibly offer richer
semantics in the future like giving specific
fields different callbacks.
The upb_handlers protocol supports delegation, so
sets of handlers can be written in reusable ways.
For example, if a set of handlers is written to
handle a specific .proto type, those handlers can
be used whether that type is at the top level or
whether it is a sub-message of a higher-level type.
Delegation allows the streaming protocol to
properly compose.
14 years ago
Joshua Haberman
a9e998159c
Fleshed out upb_msg: test_vs_proto2 compiles but fails.
15 years ago
Joshua Haberman
678799082b
Stream decoding benchmark.
15 years ago
Joshua Haberman
5871ed0d02
First go at Lua bindings.
15 years ago
Joshua Haberman
87b2c69c15
Fleshed out upb_stdio and upb_textprinter.
...
test_decoder now compiles and links! But it doesn't
work yet.
15 years ago
Joshua Haberman
8e138c4687
Added more comments for upb_src interface.
15 years ago
Joshua Haberman
fcfc37e7d4
Reduce decoder memory usage.
...
The "field" entry was only being used to determine
whether we were inside a group, but the "end_offset"
member contains enough information to tell us that.
15 years ago
Joshua Haberman
db6c7387bc
Incremental progress towards getting upb_def to bootstrap.
15 years ago
Joshua Haberman
67b16cbe5c
Basic test_def links and passes no-op test!
15 years ago
Joshua Haberman
2ef013126c
Fleshed out upb_string further. Now upb_def's only
...
unresolved references are upb_src.
15 years ago
Joshua Haberman
e29bf964d1
Tests for string and fleshed out implementation.
15 years ago
Joshua Haberman
28ec9a1fa0
Split src/ into core/ and stream/.
15 years ago
Joshua Haberman
be5ddd8a64
Tweaks to upb_src/upb_sink interfaces.
15 years ago
Joshua Haberman
209dce5eb0
Defined the function for getting a upb_symtab for descriptor.proto.
15 years ago
Joshua Haberman
9116c697f8
upb_parser -> upb_decoder
15 years ago
Joshua Haberman
57d6353a3c
Rename serializer -> encoder.
15 years ago
Joshua Haberman
d7d1b2a141
Move many serializing functions to .cc file, since they do not need to be exposed.
15 years ago
Joshua Haberman
3f0d126b2a
Only remaining undefined symbol is upb_msg_parsestr.
15 years ago
Joshua Haberman
2876225d05
Force -Os for upb_def.o
15 years ago
Joshua Haberman
c241976485
In the midst of a major refactoring.
15 years ago
Joshua Haberman
08b4a91204
Add a test for circularly-linked descriptors.
...
The test currently triggers valgrind-detected memory errors.
15 years ago
Joshua Haberman
18291eedc3
Make defs refcounted, rename upb_context->upbsymtab.
...
There is currently a memory leak when type definitions
form cycles. This will need to be dealt with.
15 years ago
Joshua Haberman
868f118797
Changed parse API to know about msgdefs.
...
This should make it both easier to use and easier to
optimize, in exchange for a small amount of generality.
In practice, any remotely normal case is still very
natural.
15 years ago
Joshua Haberman
e252432a41
Refactoring: split defs into their own file, move private parsing funcs out of .h file.
15 years ago
Joshua Haberman
33a68acb14
Use a status object for errors so a message can be returned.
...
Also delay deletion of subfields until the entire message is
deleted.
15 years ago
Joshua Haberman
46fac0f58d
Tests use valgrind, chdir in test.
16 years ago
Joshua Haberman
00ba0d1ac1
Unit test comparing parsed results with proto2.
16 years ago
Joshua Haberman
cd2f77d392
Incremental improvements to cbparser, and a test.
16 years ago
Joshua Haberman
f17ed90f77
Some cleanup and reformatting, fixed the benchmarks.
16 years ago
Joshua Haberman
040f7e6ba2
Significant memory-management refactoring any Python extension.
16 years ago
Joshua Haberman
cfd67dda49
Various fixes.
16 years ago
Joshua Haberman
2282d2489b
Refactoring: unify upb_msg.
...
The cost is that a upb_msg will now always have an overhead
of 2*sizeof(void*). This is comparable to proto2 overhead.
The benefit is that upb_msg is now self-describing, and
read-only algorithms can now operate on a upb_msg regardless
of the memory-management scheme.
Also, upb_array and upb_string now know inherently if they
own their associated memory, and upb_array has a generic
pointer for memory management purposes like upb_msg does.
16 years ago