aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-05-26 15:27:57 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-05-26 15:27:57 +0200
commit791f0695fd2b2551b79bf114a7cefd5c4d07b7ee (patch)
tree6db054e4e668aae6e12c28c1fdcdda159b375d24 /lib/stdlib
parent42dd87320c1197501b7f1ca864eb5515a2c9ba41 (diff)
parent5c11e739da22157aa0bf80671babf21ed37b30d7 (diff)
downloadotp-791f0695fd2b2551b79bf114a7cefd5c4d07b7ee.tar.gz
otp-791f0695fd2b2551b79bf114a7cefd5c4d07b7ee.tar.bz2
otp-791f0695fd2b2551b79bf114a7cefd5c4d07b7ee.zip
Merge branch 'egil/opt-compile-time/OTP-12774'
* egil/opt-compile-time/OTP-12774: stdlib: Relax erl_anno_SUITE:is_anno/1 test Update primary bootstrap compiler: Use Maps as type information compiler: Use Maps instead of dict in beam_jump compiler: Use cerl_sets instead of gb_sets in beam_type compiler: Use Maps instead of gb_trees in beam_dead compiler: Use cerl_sets instead of gb_sets in beam_jump compiler: Use cerl_sets instead of sets in v3_kernel compiler: Use cerl_sets instead of gb_sets in sys_core_fold compiler: Add cerl_sets module compiler: Scope uses gb_sets not gb_trees beam_dict: Use Maps to map function name indices beam_dict: Use Maps to map line indices beam_dict: Use Maps to map atom indices v3_codegen: Use Maps to map local functions v3_life: Refactor variable db compiler: Use lc instead of map/1 in v3_codegen stdlib: Optimize erl_anno:is_string/1 Conflicts: bootstrap/lib/kernel/ebin/inet_dns.beam bootstrap/lib/stdlib/ebin/erl_anno.beam bootstrap/lib/stdlib/ebin/erl_lint.beam
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/src/erl_anno.erl4
-rw-r--r--lib/stdlib/test/erl_anno_SUITE.erl1
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/stdlib/src/erl_anno.erl b/lib/stdlib/src/erl_anno.erl
index 9fb767fc93..fa83375c34 100644
--- a/lib/stdlib/src/erl_anno.erl
+++ b/lib/stdlib/src/erl_anno.erl
@@ -150,9 +150,7 @@ is_filename(T) ->
is_list(T) orelse is_binary(T).
is_string(T) ->
- try lists:all(fun(C) when is_integer(C), C >= 0 -> true end, T)
- catch _:_ -> false
- end.
+ is_list(T).
-spec column(Anno) -> column() | 'undefined' when
Anno :: anno().
diff --git a/lib/stdlib/test/erl_anno_SUITE.erl b/lib/stdlib/test/erl_anno_SUITE.erl
index 7632fbd324..d024f6907d 100644
--- a/lib/stdlib/test/erl_anno_SUITE.erl
+++ b/lib/stdlib/test/erl_anno_SUITE.erl
@@ -89,7 +89,6 @@ is_anno(_Config) ->
false = erl_anno:is_anno([{generated,true}]),
false = erl_anno:is_anno([{location,1},{file,nofile}]),
false = erl_anno:is_anno([{location,1},{text,notext}]),
- false = erl_anno:is_anno([{location,1},{text,[a,b,c]}]),
true = erl_anno:is_anno(erl_anno:new(1)),
A0 = erl_anno:new({1, 17}),