aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/hipe_unified_loader.erl
AgeCommit message (Collapse)Author
2012-05-11kernel: Disable hipe compilation for hipe_unified_loaderSverker Eriksson
Workaround for crash in code_server.
2012-02-17hipe,erts: Add DEBUG support with MFA's in stack descriptorsSverker Eriksson
2012-02-09hipe: Fix address_to_mfa in hipe loaderSverker Eriksson
Strange that the effect of this bug is not more fatal. Kudos to Fabian and Tom for spotting this one.
2012-01-24beam_load.c: Allow stubs for BIFsBjörn Gustavsson
We want to be able to write type specifications for BIFs in the same way as for any other function. Currently, the type for BIFs need to be described in erl_bif_types. To avoid extending the compiler and Dialyzer with special directives for providing specifications for BIFs, we have decided to let the loader accept a local definition for a function which exists as a BIF. As an example, here is how a stub for lists:reverse/2 can be defined: -export([reverse/2]). -spec reverse([term()], term()) -> [term()]. reverse(_, _) -> erlang:nif_error(undef). Essentially, the loader will discard the local definition of reverse/2. Other functions in the same module must *not* do local calls to a BIF stub. If a local call to a BIF is found, the loader will refuse to load the module. That is, the following call is not allowed: reverse(List) -> reverse(List, []). but the following is: reverse(List) -> ?MODULE:reverse(List, []). A few words about the implementation. It turns out to be too complicated to actually discard the BIF stubs. Although it would be possibly with some jiggery pokery in ops.tab, the code would be difficult to maintain and it could slow down loading of modules that don't define BIFs (which are almost all modules). Therefore, the stub functions are kept in the loaded code, but their names in the func_info instruction are invalidated so that module_info(functions) can filter them out.
2011-11-26code: Clean up loading of code_server prerequisitesBjörn Gustavsson
Reorganize in a systematic way the code that loads the modules needed by the code_server process. While at it, remove the useless hipe_unified_loader:load_hipe_modules/0 function.
2011-02-14Added loader for ppc64Kostis Sagonas
2010-02-09hipe_unified_loader: only block SMP scheduling when necessaryMikael Pettersson
This avoids costly scheduling changes during module loading if native code is disabled in erts, or not present in the module being loaded. Signed-off-by: Mikael Pettersson <[email protected]>
2010-01-27fix hipe loader SMP non-atomicity errorMikael Pettersson
Loading native code is a multi-step operation that needs to be atomic, but the HiPE loader failed to ensure that. This caused corruption of runtime system structure in some cases. Fix by blocking multi_scheduling around main loader entry points. Signed-off-by: Mikael Pettersson <[email protected]>
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP