From fd8d054c22a5ee81015d5e0add297ba7144a0840 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 8 May 2015 12:28:25 +0200 Subject: typer: Properly extract annotations The addition of the erl_anno module, OTP-12195, also modified v3_core so that functions with line number zero are regarded as compiler generated. --- lib/typer/src/typer.erl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/typer') diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl index cbad05081e..f8070e04c1 100644 --- a/lib/typer/src/typer.erl +++ b/lib/typer/src/typer.erl @@ -2,7 +2,7 @@ %%----------------------------------------------------------------------- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2006-2014. All Rights Reserved. +%% Copyright Ericsson AB 2006-2015. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -931,7 +931,9 @@ analyze_one_function({Var, FunBody} = Function, Acc) -> A = cerl:fname_arity(Var), TmpDialyzerObj = {{Acc#tmpAcc.module, F, A}, Function}, NewDialyzerObj = Acc#tmpAcc.dialyzerObj ++ [TmpDialyzerObj], - [_, LineNo, {file, FileName}] = cerl:get_ann(FunBody), + Anno = cerl:get_ann(FunBody), + LineNo = get_line(Anno), + FileName = get_file(Anno), BaseName = filename:basename(FileName), FuncInfo = {LineNo, F, A}, OriginalName = Acc#tmpAcc.file, @@ -951,6 +953,14 @@ analyze_one_function({Var, FunBody} = Function, Acc) -> incFuncAcc = IncFuncAcc, dialyzerObj = NewDialyzerObj}. +get_line([Line|_]) when is_integer(Line) -> Line; +get_line([_|T]) -> get_line(T); +get_line([]) -> none. + +get_file([{file,File}|_]) -> File; +get_file([_|T]) -> get_file(T); +get_file([]) -> "no_file". % should not happen + -spec get_dialyzer_plt(analysis()) -> plt(). get_dialyzer_plt(#analysis{plt = PltFile0}) -> -- cgit v1.2.3 From e09dd66dc4d89c62ddfd8c19791f9678d5d787c6 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 12 May 2015 18:18:55 +0200 Subject: Prepare release --- lib/typer/doc/src/notes.xml | 14 ++++++++++++++ lib/typer/vsn.mk | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'lib/typer') diff --git a/lib/typer/doc/src/notes.xml b/lib/typer/doc/src/notes.xml index 23e22759d6..045b55ffe4 100644 --- a/lib/typer/doc/src/notes.xml +++ b/lib/typer/doc/src/notes.xml @@ -30,6 +30,20 @@

This document describes the changes made to TypEr.

+
TypEr 0.9.9 + +
Fixed Bugs and Malfunctions + + +

Properly extract annotations from core code.

+

+ Own Id: OTP-12727

+
+
+
+ +
+
TypEr 0.9.8
Fixed Bugs and Malfunctions diff --git a/lib/typer/vsn.mk b/lib/typer/vsn.mk index ce658e257b..74c0ccfc59 100644 --- a/lib/typer/vsn.mk +++ b/lib/typer/vsn.mk @@ -1 +1 @@ -TYPER_VSN = 0.9.8 +TYPER_VSN = 0.9.9 -- cgit v1.2.3 From 9a81b28598fadc44bf506354c9227e41aac786f6 Mon Sep 17 00:00:00 2001 From: Henrik Nord Date: Wed, 13 May 2015 09:40:16 +0200 Subject: Revert "Prepare release" This reverts commit e09dd66dc4d89c62ddfd8c19791f9678d5d787c6. --- lib/typer/doc/src/notes.xml | 14 -------------- lib/typer/vsn.mk | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) (limited to 'lib/typer') diff --git a/lib/typer/doc/src/notes.xml b/lib/typer/doc/src/notes.xml index 045b55ffe4..23e22759d6 100644 --- a/lib/typer/doc/src/notes.xml +++ b/lib/typer/doc/src/notes.xml @@ -30,20 +30,6 @@

This document describes the changes made to TypEr.

-
TypEr 0.9.9 - -
Fixed Bugs and Malfunctions - - -

Properly extract annotations from core code.

-

- Own Id: OTP-12727

-
-
-
- -
-
TypEr 0.9.8
Fixed Bugs and Malfunctions diff --git a/lib/typer/vsn.mk b/lib/typer/vsn.mk index 74c0ccfc59..ce658e257b 100644 --- a/lib/typer/vsn.mk +++ b/lib/typer/vsn.mk @@ -1 +1 @@ -TYPER_VSN = 0.9.9 +TYPER_VSN = 0.9.8 -- cgit v1.2.3