Skip to content

Commit 7e01628

Browse files
committed
Compute beam location early
1 parent 6432e86 commit 7e01628

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/src/elixir_module.erl

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ compile(Meta, Module, ModuleAsCharlist, Block, Vars, Prune, E) ->
155155
put_compiler_modules([Module | CompilerModules]),
156156
{Result, ModuleE, CallbackE} = eval_form(Line, Module, DataBag, Block, Vars, Prune, E),
157157
CheckerInfo = checker_info(),
158+
BeamLocation = beam_location(ModuleAsCharlist),
158159

159160
{Binary, PersistedAttributes, Autoload} =
160161
elixir_erl_compiler:spawn(fun() ->
@@ -219,7 +220,7 @@ compile(Meta, Module, ModuleAsCharlist, Block, Vars, Prune, E) ->
219220
{Binary, PersistedAttributes, Autoload}
220221
end),
221222

222-
Autoload andalso code:load_binary(Module, beam_location(ModuleAsCharlist), Binary),
223+
Autoload andalso code:load_binary(Module, BeamLocation, Binary),
223224
put_compiler_modules(CompilerModules),
224225
eval_callbacks(Line, DataBag, after_compile, [CallbackE, Binary], CallbackE),
225226
elixir_env:trace({on_module, Binary, none}, ModuleE),

0 commit comments

Comments
 (0)