Joshua Haberman
f1e1cc4695
Split inttable into a hash part and an array part.
...
upb_inttable() now supports a "compact" operation that will
decide on an array size and put all entries with small enough
keys into the array part for faster lookup.
Also exposed the upb_itof_ent structure and put a few useful
values there, so they are one fewer pointer chase away.
14 years ago
Joshua Haberman
ee84a7da16
Add (but do not activate) an SSE varint decoder.
14 years ago
Joshua Haberman
4667ed4be9
All tests pass again, valgrind-clean! Next up: benchmarks.
14 years ago
Joshua Haberman
806ba1c80d
Another round of fixes.
...
test_vs_proto2.googlemessage1 passes again,
with no memory leaks!
14 years ago
Joshua Haberman
3affb31926
Tons of work: we're close to passing test_vs_proto2 again.
14 years ago
Joshua Haberman
e170259e4a
Improved table benchmark accuracy and output formatting.
14 years ago
Joshua Haberman
9aa7e559d6
Fixes to decoder and textprinter: it works (for some input)!
...
A protobuf -> text stream for descriptor.proto
now outputs the same text as proto2.
14 years ago
Joshua Haberman
02a8cdfff2
Fixes to decoder, stdio, textprinter.
14 years ago
Joshua Haberman
2ea9737e5d
Added test_stream.c for testing upb_stream.h.
14 years ago
Joshua Haberman
c9df91b04a
upb bootstraps again! and with no memory leaks!
14 years ago
Joshua Haberman
a695b92cce
Debugging test_def, it's close to working again!
14 years ago
Joshua Haberman
a9e998159c
Fleshed out upb_msg: test_vs_proto2 compiles but fails.
15 years ago
Joshua Haberman
21ee24a730
Updated Lua extension to handle fielddefs.
15 years ago
Joshua Haberman
79de3ca9e4
Add forgotten test_decoder.c.
15 years ago
Joshua Haberman
7a6a702792
Allow static upb_strings.
...
This can allow strings to reference static data, and
reduced the memory footprint of test_def by about 10%
(3k).
15 years ago
Joshua Haberman
c7a95061a7
Successfully bootstraps!!
15 years ago
Joshua Haberman
ae0beee285
Fixed upb_string error with strange vsnprintf() behavior.
15 years ago
Joshua Haberman
db6c7387bc
Incremental progress towards getting upb_def to bootstrap.
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
be5ddd8a64
Tweaks to upb_src/upb_sink interfaces.
15 years ago
Joshua Haberman
611afe9c69
Removed union tag from types.
15 years ago
Joshua Haberman
d5566c6038
Remove struct keyword from all types, use typedef instead.
15 years ago
Joshua Haberman
9116c697f8
upb_parser -> upb_decoder
15 years ago
Joshua Haberman
d751973758
Ported/fixed tests to new data types.
15 years ago
Joshua Haberman
ece08710a6
Bugfixes: descriptorgen works without leaks!
15 years ago
Joshua Haberman
0a6fc5fad3
Truly fixed type cyclic refcounting.
15 years ago
Joshua Haberman
e15f834a91
Circular references truly work now, along with a test.
...
One simplification to come.
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
a95ab58e79
Overhaul defs to derive from a common base.
15 years ago
Joshua Haberman
9e3f5e343b
Make upb_msgdef own all its data.
...
This is in anticipation of making upb_msgdef's easy
to dup. This involved removing all traces of any
descriptors from the defs.
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
7cde43ea0a
Renamed upb_msg_fielddef -> upb_fielddef, upb_enum -> upb_enumdef.
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
7fa19a3f95
Finish upb_context thread-safety.
16 years ago
Joshua Haberman
71d82d06d1
Add refcounting and thread-safety to message definitions.
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
946dcf4a5d
Fix tests (and src) such that all tests pass again.
16 years ago
Joshua Haberman
3149d2b372
Added a proper prototype for upb_serialize.
16 years ago
Joshua Haberman
e373367fb7
Move parsing functions to header file in anticipation of code generation (want them inlined).
16 years ago
Joshua Haberman
e58c871c19
upb is fully self-hosting (except for text->descriptor)!
16 years ago
Joshua Haberman
edf5f9e8ed
Update test_table to new table API.
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
293cbe5135
Enhanced testing.
16 years ago