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.
This commit is contained in:
1 parent
b2b0bd37a1
commit
e843a4fdf9
6 files changed
+54
-9
No files matched your search
+2
-1
@@ -72,9 +72,10 @@ int block_has_only_binders(block, int bindflags);
|
||||
int block_has_main(block);
|
||||
int block_is_funcdef(block b);
|
||||
int block_is_single(block b);
|
||||
block block_bind(block binder, block body, int bindflags);
|
||||
block block_bind_library(block binder, block body, int bindflags, const char* libname);
|
||||
block block_bind_referenced(block binder, block body, int bindflags);
|
||||
block block_bind_incremental(block binder, block body, int bindflags);
|
||||
block block_bind_self(block binder, int bindflags);
|
||||
block block_drop_unreferenced(block body);
|
||||
|
||||
jv block_take_imports(block* body);
|
||||
|
||||
Reference in new issue
Block a user