-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2175 from Shopify/ruby-based-constant-pool
Extract out usages of Ruby IDs
- Loading branch information
Showing
9 changed files
with
381 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
#include "rbs_extension.h" | ||
#include "rbs/util/rbs_constant_pool.h" | ||
|
||
#include "ruby/vm.h" | ||
|
||
static | ||
void Deinit_rbs_extension(ruby_vm_t *_) { | ||
rbs_constant_pool_free(RBS_GLOBAL_CONSTANT_POOL); | ||
} | ||
|
||
void | ||
Init_rbs_extension(void) | ||
{ | ||
#ifdef HAVE_RB_EXT_RACTOR_SAFE | ||
rb_ext_ractor_safe(true); | ||
#endif | ||
#endif | ||
rbs__init_constants(); | ||
rbs__init_location(); | ||
rbs__init_parser(); | ||
|
||
rbs_constant_pool_init(RBS_GLOBAL_CONSTANT_POOL, 0); | ||
ruby_vm_at_exit(Deinit_rbs_extension); | ||
} |
Oops, something went wrong.