From f7506aace35133b6224b13866eca56e799f5929c Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Fri, 27 Aug 2021 00:41:03 +0900 Subject: [PATCH] export `jl_resolve_globals_in_ir` (#42013) This would be very useful for external `AbstractInterpreter`s to infer (and possibly even optimize) toplevel thunks. --- src/jl_exported_funcs.inc | 2 +- src/method.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index 256fdfeaa0890..99e7eb09aaa4c 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -150,6 +150,7 @@ XX(jl_exit_on_sigint) \ XX(jl_exit_threaded_region) \ XX(jl_expand) \ + XX(jl_resolve_globals_in_ir) \ XX(jl_expand_and_resolve) \ XX(jl_expand_stmt) \ XX(jl_expand_stmt_with_loc) \ @@ -550,4 +551,3 @@ XX(jl_vprintf) \ XX(jl_wakeup_thread) \ XX(jl_yield) \ - diff --git a/src/method.c b/src/method.c index 22145a4349853..9c255f786b74d 100644 --- a/src/method.c +++ b/src/method.c @@ -243,7 +243,7 @@ static jl_value_t *resolve_globals(jl_value_t *expr, jl_module_t *module, jl_sve return expr; } -void jl_resolve_globals_in_ir(jl_array_t *stmts, jl_module_t *m, jl_svec_t *sparam_vals, +JL_DLLEXPORT void jl_resolve_globals_in_ir(jl_array_t *stmts, jl_module_t *m, jl_svec_t *sparam_vals, int binding_effects) { size_t i, l = jl_array_len(stmts);