From f6da559d5b88981000d4c575b6384f59d30dec22 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Fri, 1 Oct 2021 18:38:39 -0400 Subject: 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? --- vm_insnhelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 1f591b8323..aafd5a28d2 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -4808,7 +4808,7 @@ vm_ic_update(const rb_iseq_t *iseq, IC ic, VALUE val, const VALUE *reg_ep) ruby_vm_const_missing_count = 0; RB_OBJ_WRITE(iseq, &ic->entry, ice); #ifndef MJIT_HEADER - yjit_constant_ic_update(iseq, ic); + rb_yjit_constant_ic_update(iseq, ic); #endif } -- cgit v1.2.3