aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-03-21 14:10:02 +0100
committerBjörn Gustavsson <[email protected]>2016-03-21 14:10:02 +0100
commit181c4e084b0be39a9dbef5c83b3056f5079ff144 (patch)
tree30eba1194e50f75d02de25fcd11a6182c2214382 /lib/compiler/src
parente369312640200396b277e2e63378f86ff965d166 (diff)
parent3c3c984aa9443a1ac1464473fd50e721e4d43b1f (diff)
downloadotp-181c4e084b0be39a9dbef5c83b3056f5079ff144.tar.gz
otp-181c4e084b0be39a9dbef5c83b3056f5079ff144.tar.bz2
otp-181c4e084b0be39a9dbef5c83b3056f5079ff144.zip
Merge branch 'bjorn/optimize-start-up/OTP-13368'
* bjorn/optimize-start-up/OTP-13368: Update preloaded modules init: Load modules in parallel using the new loader BIFs systools_make: Add commonly used modules to mandatory_modules/0 compile: Pre-load compiler modules when invoked from 'erlc'
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/compile.erl44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 46917905de..332bc0bdf9 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -1681,6 +1681,7 @@ help(_) ->
%% Compile entry point for erl_compile.
compile(File0, _OutFile, Options) ->
+ pre_load(),
File = shorten_filename(File0),
case file(File, make_erl_options(Options)) of
{ok,_Mod} -> ok;
@@ -1745,3 +1746,46 @@ make_erl_options(Opts) ->
end,
Options ++ [report_errors, {cwd, Cwd}, {outdir, Outdir}|
[{i, Dir} || Dir <- Includes]] ++ Specific.
+
+pre_load() ->
+ L = [beam_a,
+ beam_asm,
+ beam_block,
+ beam_bool,
+ beam_bs,
+ beam_bsm,
+ beam_clean,
+ beam_dead,
+ beam_dict,
+ beam_except,
+ beam_flatten,
+ beam_jump,
+ beam_opcodes,
+ beam_peep,
+ beam_receive,
+ beam_reorder,
+ beam_split,
+ beam_trim,
+ beam_type,
+ beam_utils,
+ beam_validator,
+ beam_z,
+ cerl,
+ cerl_clauses,
+ cerl_sets,
+ cerl_trees,
+ core_lib,
+ epp,
+ erl_bifs,
+ erl_expand_records,
+ erl_lint,
+ erl_parse,
+ erl_scan,
+ sys_core_dsetel,
+ sys_core_fold,
+ sys_pre_expand,
+ v3_codegen,
+ v3_core,
+ v3_kernel,
+ v3_life],
+ code:ensure_modules_loaded(L).