From fa4f5ba69957ce79e5f7781af26d183cdb0b77b0 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sun, 24 Mar 2013 15:14:41 +0100 Subject: Add a new option +clint0 to the compiler This option makes the compiler run the Core Erlang linting pass before any optimization pass, which can crash if the given code has unbound variables, something that is detected by core_lint. --- lib/compiler/src/compile.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/compiler/src/compile.erl') diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 497af2b52c..745f1d5cf9 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -599,7 +599,8 @@ standard_passes() -> core_passes() -> %% Optimization and transforms of Core Erlang code. - [{delay, + [{iff,clint0,?pass(core_lint_module)}, + {delay, [{unless,no_copt, [{core_old_inliner,fun test_old_inliner/1,fun core_old_inliner/1}, {iff,doldinline,{listing,"oldinline"}}, -- cgit v1.2.3