diff options
author | Alan Wu <[email protected]> | 2021-10-01 18:38:39 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:42 -0400 |
commit | f6da559d5b88981000d4c575b6384f59d30dec22 (patch) | |
tree | 00fab354584931dd6f88dc275c26260c17259379 /yjit.h | |
parent | 25eed2848344f19385b39daaac8ca5eef79f9466 (diff) |
Put YJIT into a single compilation unit
For upstreaming, we want functions we export either prefixed with "rb_"
or made static. Historically we haven't been following this rule, so we
were "leaking" a lot of symbols as `make leak-globals` would tell us.
This change unifies everything YJIT into a single compilation unit,
yjit.o, and makes everything unprefixed static to pass `make leak-globals`.
This manual "unified build" setup is similar to that of vm.o.
Having everything in one compilation unit allows static functions to
be visible across YJIT files and removes the need for declarations in
headers in some cases. Unnecessary declarations were removed.
Other changes of note:
- switched to MJIT_SYMBOL_EXPORT_BEGIN which indicates stuff as being
off limits for native extensions
- the first include of each YJIT file is change to be "internal.h"
- undefined MAP_STACK before explicitly redefining it since it
collide's with a definition in system headers. Consider renaming?
Diffstat (limited to 'yjit.h')
-rw-r--r-- | yjit.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -62,10 +62,10 @@ struct rb_yjit_options { bool test_backend; }; -RUBY_SYMBOL_EXPORT_BEGIN +MJIT_SYMBOL_EXPORT_BEGIN bool rb_yjit_enabled_p(void); unsigned rb_yjit_call_threshold(void); -RUBY_SYMBOL_EXPORT_END +MJIT_SYMBOL_EXPORT_END void rb_yjit_invalidate_all_method_lookup_assumptions(void); void rb_yjit_method_lookup_change(VALUE klass, ID mid); @@ -81,7 +81,7 @@ void rb_yjit_iseq_mark(const struct rb_iseq_constant_body *body); void rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body); void rb_yjit_iseq_free(const struct rb_iseq_constant_body *body); void rb_yjit_before_ractor_spawn(void); -void yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic); -void yjit_tracing_invalidate_all(void); +void rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic); +void rb_yjit_tracing_invalidate_all(void); #endif // #ifndef YJIT_H |