aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-09-01 16:45:21 +0200
committerBjörn Gustavsson <[email protected]>2010-09-01 16:46:23 +0200
commit053e1b6a47536509a43a9ba667df967340349fa3 (patch)
treec1f9607e54fad63afa7125ebc8392dc1344462c6 /lib/hipe
parent70e929860ceb6448101828190f688697fff67db4 (diff)
parent7d6a8045152c1a1a3721d76583701a15a5fb5ada (diff)
downloadotp-053e1b6a47536509a43a9ba667df967340349fa3.tar.gz
otp-053e1b6a47536509a43a9ba667df967340349fa3.tar.bz2
otp-053e1b6a47536509a43a9ba667df967340349fa3.zip
Merge branch 'pg/fix-hipe-load' into dev
* pg/fix-hipe-load: Fix hipe:load/1 OTP-8802
Diffstat (limited to 'lib/hipe')
-rw-r--r--lib/hipe/main/hipe.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index ed722fecba..c80fb6a0a2 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -274,7 +274,7 @@ load(Mod, BeamFileName) when is_list(BeamFileName) ->
Architecture = erlang:system_info(hipe_architecture),
ChunkName = hipe_unified_loader:chunk_name(Architecture),
case beam_lib:chunks(BeamFileName, [ChunkName]) of
- {ok,{_,[{_,Bin}]}} when is_binary(Bin) -> do_load(Mod, Bin, Bin);
+ {ok,{_,[{_,Bin}]}} when is_binary(Bin) -> do_load(Mod, Bin, BeamFileName);
Error -> {error, Error}
end.
@@ -913,7 +913,7 @@ do_load(Mod, Bin, WholeModule) ->
%% In this case, the emulated code for the module must be loaded.
{module, Mod} = code:ensure_loaded(Mod),
code:load_native_partial(Mod, Bin);
- BinCode when is_binary(BinCode) ->
+ BeamBinOrPath when is_binary(BeamBinOrPath) orelse is_list(BeamBinOrPath) ->
case code:is_sticky(Mod) of
true ->
%% We unpack and repack the Beam binary as a workaround to