aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2010-05-27 09:01:10 +0000
committerErlang/OTP <[email protected]>2010-05-27 09:01:10 +0000
commit8d18a0cb2c1da7181b0e1f744e26b21f885f4915 (patch)
tree26898f8255ace5a6033fa1207c65b6f3dceb105f /lib
parent43660f13d310752c09d2c5a3c345ac15902670a5 (diff)
downloadotp-8d18a0cb2c1da7181b0e1f744e26b21f885f4915.tar.gz
otp-8d18a0cb2c1da7181b0e1f744e26b21f885f4915.tar.bz2
otp-8d18a0cb2c1da7181b0e1f744e26b21f885f4915.zip
Cleanup branch 'bg/compiler-cover-and-clean'
Commit 329f737c03db51918361e127560a6f700e99028e removed some unused code, but also introduced the need for further clean-ups. Fix a spec so that its return corresponds to reality. Take out code that will never match from a function.
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/compile.erl9
-rw-r--r--lib/compiler/src/v3_core.erl3
2 files changed, 3 insertions, 9 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 08de3059c9..d5dfde6514 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -900,13 +900,8 @@ expand_module(#compile{code=Code,options=Opts0}=St0) ->
{ok,St0#compile{module=Mod,options=Opts,code={Mod,Exp,Forms}}}.
core_module(#compile{code=Code0,options=Opts}=St) ->
- case v3_core:module(Code0, Opts) of
- {ok,Code,Ws} ->
- {ok,St#compile{code=Code,warnings=St#compile.warnings ++ Ws}};
- {error,Es,Ws} ->
- {error,St#compile{warnings=St#compile.warnings ++ Ws,
- errors=St#compile.errors ++ Es}}
- end.
+ {ok,Code,Ws} = v3_core:module(Code0, Opts),
+ {ok,St#compile{code=Code,warnings=St#compile.warnings ++ Ws}}.
core_fold_module(#compile{code=Code0,options=Opts,warnings=Warns}=St) ->
{ok,Code,Ws} = sys_core_fold:module(Code0, Opts),
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 16c5b6b415..f6bb45787c 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -122,7 +122,6 @@
| iclause() | ifun() | iletrec() | imatch() | iprimop()
| iprotect() | ireceive1() | ireceive2() | iset() | itry().
--type error() :: {file:filename(), [{integer(), module(), term()}]}.
-type warning() :: {file:filename(), [{integer(), module(), term()}]}.
-record(core, {vcount=0 :: non_neg_integer(), %Variable counter
@@ -140,7 +139,7 @@
| {attribute, integer(), attribute(), _}.
-spec module({module(), [fa()], [form()]}, [compile:option()]) ->
- {'ok',cerl:c_module(),[warning()]} | {'error',[error()],[warning()]}.
+ {'ok',cerl:c_module(),[warning()]}.
module({Mod,Exp,Forms}, Opts) ->
Cexp = map(fun ({_N,_A} = NA) -> #c_var{name=NA} end, Exp),