]> granicus.if.org Git - jq/commit
Make builtin binding fast again by binding only referenced symbols
authorMuh Muhten <muh.muhten@gmail.com>
Wed, 20 Feb 2019 06:48:56 +0000 (01:48 -0500)
committerNico Williams <nico@cryptonector.com>
Thu, 21 Feb 2019 01:43:13 +0000 (19:43 -0600)
commite843a4fdf9f6f446f5ddebf2c108cb7d4dda867b
tree55ad29089dbf9146706690eda70ee0753c925a1d
parentb2b0bd37a13c449806acae3312169edc297ab1d9
Make builtin binding fast again by binding only referenced symbols

Avoid doing the internal binding of top-level symbols in the parser,
leaving that work to be done in a post-processing step. For builtins,
this lets us do a reference-aware bind step (block_bind_incremental)
*after* generating builtins/0.

Libraries are a bit trickier since they may be bound multiple times, so
instead of thinking through the implications I added (block_bind_self)
to resolve all internal symbols immediately.
src/builtin.c
src/compile.c
src/compile.h
src/linker.c
src/parser.c
src/parser.y