c-capnproto/compiler
jose luis ferrer d9240320c1 compiler: Allocate all possible space for constants
When the c-capnp compiler runs, currently only takes the len of 1st
segment in the list as a capacity used in the generator for constants
definitions.

This works when the schema processing only generates 1 segment, or the
1st segment has 8192 bytes. There are cases where the fd returns
multiple segments an the first one has very low capacity (e.g. 96 or 80).
Hence, if more constants require to be allocated for the current schema
it will have misleading positions.

This commit takes a conservative approach by summing up all the lenghts
of capnproto segments obtained at the fd_init call of the compiler.
Those values are taken to set the memory allocation and the max
capacity for the segment utilized in the code generation.
2018-02-01 15:13:18 +01:00
..
c++.capnp compiler: update schemas from v0.5.2 2015-08-04 11:55:23 -07:00
c++.capnp.c Silence warning on unused struct parameter 2017-05-19 09:40:37 +02:00
c++.capnp.h Silence GCC unnamed union warning 2017-05-19 09:35:09 +02:00
c.capnp Add all .capnp files to make dist archive. 2017-03-26 15:23:35 +01:00
c.capnp.c Most .capnp files use "/c.capnp".fieldgetset. Recompile from schema files. 2017-03-26 23:40:55 +01:00
c.capnp.h Most .capnp files use "/c.capnp".fieldgetset. Recompile from schema files. 2017-03-26 23:40:55 +01:00
capnpc-c.c compiler: Allocate all possible space for constants 2018-02-01 15:13:18 +01:00
schema-test.cpp add approprate per-file license headers 2016-02-28 12:47:42 +01:00
schema.capnp Most .capnp files use "/c.capnp".fieldgetset. Recompile from schema files. 2017-03-26 23:40:55 +01:00
schema.capnp.c Silence warning on unused struct parameter 2017-05-19 09:40:37 +02:00
schema.capnp.h Silence GCC unnamed union warning 2017-05-19 09:35:09 +02:00
str.c add approprate per-file license headers 2016-02-28 12:47:42 +01:00
str.h compiler: fix remaining warnings 2016-03-19 00:39:30 +01:00
test.capnp Most .capnp files use "/c.capnp".fieldgetset. Recompile from schema files. 2017-03-26 23:40:55 +01:00
test.capnp.c Silence warning on unused struct parameter 2017-05-19 09:40:37 +02:00
test.capnp.h Silence empty struct warning 2017-05-19 09:45:01 +02:00
update-notes.md compiler: notes on updating from upstream 2015-08-04 12:04:49 -07:00