hcl/zclwrite
Martin Atkins c233270a9b zclwrite: use a single, flat writer token buffer
Previously we were allocating a separate heap object for each token, which
creates a lot of small objects for the GC to manage. Since we know that
we're always converting from a flat array of native tokens, we can produce
a flat array of writer tokens first and _then_ take pointers into that
array to achieve our goal of making a slice of pointers.

For the use-case of formatting a sequence of tokens by tweaking the
"SpacesBefore" value, this means we can get all of our memory allocation
done in a single chunk and then just tweak the allocated, contiguous
tokens in-place, which should reduce memory pressure for a task which
will likely be done frequently by a text editor integration doing "format
on save".
2017-06-07 06:38:41 -07:00
..
ast.go zclwrite: foundations of the writer parser 2017-06-06 08:53:13 -07:00
doc.go zclwrite: stub of zcl code generation package 2017-05-29 16:05:34 -07:00
native_node_sorter.go zclwrite: foundations of the writer parser 2017-06-06 08:53:13 -07:00
parser_test.go zclwrite: foundations of the writer parser 2017-06-06 08:53:13 -07:00
parser.go zclwrite: use a single, flat writer token buffer 2017-06-07 06:38:41 -07:00
tokens.go zclwrite: foundations of the writer parser 2017-06-06 08:53:13 -07:00