From 3390a2cf56087c865640d86dcebdd6249e03cc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 5 Jan 2012 22:10:00 +0100 Subject: Revert "syntax_tool: Add missing type information" This reverts commit 38ee7a20cfdc22ead35b4711a086babcf6b3069b. --- lib/syntax_tools/src/erl_syntax.erl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl index 4e2235d552..7f58fda519 100644 --- a/lib/syntax_tools/src/erl_syntax.erl +++ b/lib/syntax_tools/src/erl_syntax.erl @@ -3523,10 +3523,7 @@ qualified_name_segments(Node) -> %% @see is_form/1 %% @see rule/2 --record(function, { - name :: atom(), - clauses :: list() - }). +-record(function, {name, clauses}). %% XXX: This one is problematic because there is a tuple with the same %% tag and size that comes from 'erl_parse' %% -record(function, {name :: syntaxTree(), clauses :: [syntaxTree()]}). @@ -6103,7 +6100,7 @@ implicit_fun_name(Node) -> arity_qualifier( set_pos(atom(Atom), Pos), set_pos(integer(Arity), Pos))); - {'fun', _Pos, {function, Module, Atom, Arity}} -> + {'fun', Pos, {function, Module, Atom, Arity}} -> %% New in R15: fun M:F/A. module_qualifier(Module, arity_qualifier(Atom, Arity)); Node1 -> -- cgit v1.2.3 From 976f8018e237999b586866309c4284fa5e6e2c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 5 Jan 2012 22:10:32 +0100 Subject: Revert "hipe: Add type information to cfg_info record" This reverts commit 644a3ec2848da340490c4027df293a3136de60a4. --- lib/hipe/flow/cfg.hrl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/hipe/flow/cfg.hrl b/lib/hipe/flow/cfg.hrl index 79fe6162ad..62f47a707a 100644 --- a/lib/hipe/flow/cfg.hrl +++ b/lib/hipe/flow/cfg.hrl @@ -36,9 +36,8 @@ is_closure :: boolean(), closure_arity :: arity(), is_leaf :: boolean(), - params :: any(), %% any() since type information is missing? - info = [] :: list() %% this field seems not needed; take out?? - }). + params, % :: list() + info = []}). %% this field seems not needed; take out?? %% %% Data is a triple with a dict of constants, a list of labels and an integer -- cgit v1.2.3 From eb67cd9474f6131223dbd2ecda01e0faaaaef17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 5 Jan 2012 23:00:13 +0100 Subject: syntax_tools: Suppress warning of unused variable --- lib/syntax_tools/src/erl_syntax.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl index 7f58fda519..f74242fb41 100644 --- a/lib/syntax_tools/src/erl_syntax.erl +++ b/lib/syntax_tools/src/erl_syntax.erl @@ -6100,8 +6100,9 @@ implicit_fun_name(Node) -> arity_qualifier( set_pos(atom(Atom), Pos), set_pos(integer(Arity), Pos))); - {'fun', Pos, {function, Module, Atom, Arity}} -> + {'fun', _Pos, {function, Module, Atom, Arity}} -> %% New in R15: fun M:F/A. + %% XXX: Perhaps set position for this aswell? module_qualifier(Module, arity_qualifier(Atom, Arity)); Node1 -> data(Node1) -- cgit v1.2.3 From bbcdfa4bada59bfc4b62b5891e65d29c33286b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 5 Jan 2012 23:28:44 +0100 Subject: hipe: Remove warnings of missing types in records --- lib/hipe/flow/Makefile | 2 +- lib/hipe/icode/Makefile | 2 +- lib/hipe/opt/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile index 02f610587b..bbe8ef8666 100644 --- a/lib/hipe/flow/Makefile +++ b/lib/hipe/flow/Makefile @@ -65,7 +65,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html) include ../native.mk -ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record +ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec # +warn_untyped_record # ---------------------------------------------------- # Targets diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile index eced90b0ec..bd6436c8b3 100644 --- a/lib/hipe/icode/Makefile +++ b/lib/hipe/icode/Makefile @@ -83,7 +83,7 @@ DOC_FILES= $(DOC_MODULES:%=$(DOCS)/%.html) include ../native.mk -ERL_COMPILE_FLAGS += +warn_unused_import +warn_missing_spec +warn_untyped_record +ERL_COMPILE_FLAGS += +warn_unused_import +warn_missing_spec # +warn_untyped_record # ---------------------------------------------------- # Targets diff --git a/lib/hipe/opt/Makefile b/lib/hipe/opt/Makefile index 74fde26c0b..4596201801 100644 --- a/lib/hipe/opt/Makefile +++ b/lib/hipe/opt/Makefile @@ -63,7 +63,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html) include ../native.mk -ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record +ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec # +warn_untyped_record # ---------------------------------------------------- # Targets -- cgit v1.2.3 From dc70f3bb56c7b09b1bcf0d4374741f9abbf8a555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 5 Jan 2012 23:32:56 +0100 Subject: syntax_tools: Remove warnings of missing types * Just remove the warnings, not fixing the actual problem. --- lib/syntax_tools/src/Makefile | 2 +- lib/syntax_tools/src/erl_syntax.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/syntax_tools/src/Makefile b/lib/syntax_tools/src/Makefile index 50369e633e..bac138e95a 100644 --- a/lib/syntax_tools/src/Makefile +++ b/lib/syntax_tools/src/Makefile @@ -26,7 +26,7 @@ EBIN = ../ebin ifeq ($(NATIVE_LIBS_ENABLED),yes) ERL_COMPILE_FLAGS += +native endif -ERL_COMPILE_FLAGS += +warn_unused_vars +nowarn_shadow_vars +warn_unused_import +warn_missing_spec +warn_untyped_record +ERL_COMPILE_FLAGS += +warn_unused_vars +nowarn_shadow_vars +warn_unused_import # +warn_missing_spec +warn_untyped_record SOURCES=erl_syntax.erl erl_prettypr.erl erl_syntax_lib.erl \ erl_comment_scan.erl erl_recomment.erl erl_tidy.erl \ diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl index f74242fb41..32fd3722d6 100644 --- a/lib/syntax_tools/src/erl_syntax.erl +++ b/lib/syntax_tools/src/erl_syntax.erl @@ -6102,7 +6102,7 @@ implicit_fun_name(Node) -> set_pos(integer(Arity), Pos))); {'fun', _Pos, {function, Module, Atom, Arity}} -> %% New in R15: fun M:F/A. - %% XXX: Perhaps set position for this aswell? + %% XXX: Perhaps set position for this as well? module_qualifier(Module, arity_qualifier(Atom, Arity)); Node1 -> data(Node1) -- cgit v1.2.3