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.
15 years ago
Joshua Haberman
00ba0d1ac1
Unit test comparing parsed results with proto2.
15 years ago
Joshua Haberman
cd2f77d392
Incremental improvements to cbparser, and a test.
15 years ago
Joshua Haberman
f17ed90f77
Some cleanup and reformatting, fixed the benchmarks.
15 years ago
Joshua Haberman
040f7e6ba2
Significant memory-management refactoring any Python extension.
15 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
Joshua Haberman
952ea88db2
Remove perf-cppflags from repository.
16 years ago
Joshua Haberman
306bc554c6
More work on benchmarks (performance tests).
16 years ago
Joshua Haberman
84cd1538ee
Integrated benchmarks into main Makefile.
16 years ago
Joshua Haberman
2aaea5390a
Makefile is much improved ("make deps" works again, etc).
16 years ago
Joshua Haberman
f03c8bd7dd
Minor bugfix and makefile change.
16 years ago
Joshua Haberman
946dcf4a5d
Fix tests (and src) such that all tests pass again.
16 years ago
Joshua Haberman
e8c58eb78d
Sketches of serialization.
16 years ago
Joshua Haberman
a1a9596d02
Fix tests and the build (though a few tests are failing).
16 years ago
Joshua Haberman
1e388b0af3
Significant, experimental changes (setjmp/longjmp, group handling).
16 years ago
Joshua Haberman
528cdd2ecd
Updated benchmark to correctly test both upb and proto2.
16 years ago
Joshua Haberman
2abf342804
Benchmark now should build out-of-the-box.
16 years ago
Joshua Haberman
6485e39865
A few more tweaks to the benchmark Makefile.
16 years ago
Joshua Haberman
4d9c39b94d
Make benchmark run out-of-the-box.
16 years ago
Joshua Haberman
462b26c1cc
Directory restructuring.
16 years ago
Joshua Haberman
127adf4036
More work on the benchmark.
16 years ago