Aleksei Magusev
fa1191be8a
Handle nested bitstring pattern matching failures in a better way ( #7370 )
2018-02-20 23:43:14 +01:00
Andrea Leopardi
f30b29aca1
Prevent operators with many of same char to have same char after them ( #7344 )
2018-02-14 09:43:55 +01:00
José Valim
f416a685fb
Deprecate outdated Registry.start_link/2
2018-02-12 10:48:00 +01:00
José Valim
179566d9f3
Simplify key check in map match
2018-02-10 21:13:52 +01:00
José Valim
b8bf33beff
Bring add_doc/6 back, closes #7335
2018-02-10 11:07:19 +01:00
José Valim
7e0acd983a
Consistently raise for missing do option in definitions
...
Closes #7333 .
2018-02-09 17:05:59 +01:00
José Valim
cf7f2e493c
Restart contextual vars on function definitions
2018-02-03 23:21:30 -02:00
Michał Muskała
77c9d4872d
Use contextual vars for __CALLER__ ( #7309 )
2018-02-03 23:10:40 -02:00
Michał Muskała
097de7d308
Introduce __STACKTRACE__ ( #7134 )
2018-02-03 14:09:47 -02:00
José Valim
84dcbbb4d1
Revert "Do not change argument evaluation semantics in bind_quoted ( #7298 )"
...
This reverts commit 7c142fbc86 .
This causes a build failure on Erlang 19.
2018-02-03 10:57:40 -02:00
José Valim
7c142fbc86
Do not change argument evaluation semantics in bind_quoted ( #7298 )
2018-02-01 14:08:47 -02:00
José Valim
1d0ac1caac
Do not warn for underscored var access from quoted contexts
2018-02-01 11:02:04 -02:00
Wojtek Mach
d58b315d94
Improve struct comparison warning ( #7284 )
2018-01-30 22:03:06 -02:00
Michał Muskała
4ef61b81c2
Warn about comparison with calendar structs ( #7274 )
2018-01-30 11:41:43 -02:00
José Valim
4b134c8cf5
Raise on invalid map syntax, closes #7268
2018-01-28 11:04:25 -02:00
José Valim
00c7a3bc60
Merge binaries and bitstrings when possible
2018-01-25 15:40:44 -02:00
José Valim
83e6546f85
Perform merging of bitstring subinaries
2018-01-25 09:25:09 -02:00
José Valim
e0dc8b0051
Use posix and raw when extracing stale sources in Mix
...
Thanks @michalmuskala for the suggestion.
2018-01-25 08:16:59 -02:00
José Valim
9ef646eed5
Support bitstrings in Collectable
...
Closes #7234
2018-01-21 13:25:11 +01:00
José Valim
054f9172fa
Do not track @since attributes while bootstraping
2018-01-20 19:46:43 +01:00
José Valim
219c6cc867
Move unused_vars check to Elixir land
...
This gives us better control over when and how unused variables are printed.
As a result, we are able to emit unused variable warnings in situations
we could not before. This also opens up the way for us to remove a
dependency on erl_lint and track types information, which allows us to
speed up compilation times about 5% and allow us to emit more performant
code in some situations.
2018-01-20 19:45:48 +01:00
José Valim
1233a6f644
Optimize variable merging
2018-01-20 19:42:08 +01:00
José Valim
239db307a2
Merge match_vars and prematch_vars
2018-01-20 19:42:08 +01:00
José Valim
f99bb7c0e5
Process variable versioning on Elixir pass
2018-01-20 19:42:08 +01:00
José Valim
fd149eeb56
Remove file from elixir_erl record
2018-01-20 19:42:08 +01:00
José Valim
1ba04d15d8
Remove export_vars in elixir_erl record
2018-01-20 19:42:08 +01:00
José Valim
113d2c69c9
Remove export_vars from Macro.Env
2018-01-20 19:42:08 +01:00
José Valim
97ff1ed89f
Clarify not in warnings
2018-01-19 11:28:18 +01:00
José Valim
bfa3cfba19
Only rearrange not in if explicitly opted-in
...
Closes #7227 .
2018-01-19 10:54:39 +01:00
José Valim
4175ddebd9
Do not allow stabs mixed with expressions
2018-01-16 12:23:12 +01:00
José Valim
b9591267dc
Replace Code.load_file/2 by Code.compile_file/2 ( #7201 )
...
Currently there is no way to compile a file without leaving
footprints on the system. Plus, the term load_file/2 is very
confusing as loaded is the notation used by modules.
This commit focuses the whole loaded aspect of files exclusively
on require_file/2 (and renames two functions accordingly) and
introduces compile_file/2 which is semantically simpler than
load_file/2.
2018-01-13 22:04:22 +01:00
José Valim
8ece3b9748
Fix precedence of & in regards to =, closes #7188
2018-01-09 14:13:45 +01:00
Andrea Leopardi
8c05bb078d
Fix a typo in a heredoc-related warning
...
[ci skip]
2018-01-08 14:23:39 +01:00
José Valim
f34d74913c
Warn if heredoc is outdented, closes #7174
2018-01-07 17:46:42 +01:00
José Valim
f518f20372
Revert "Attempt to soft_purge modules, closes #7047 "
...
Soft purging modules was badfun/badarg errors when
invoking left over anonymous functions.
2018-01-05 17:22:20 +01:00
José Valim
889ae9afbb
Do not leak variables during optimizations, closes #7161
2018-01-01 12:04:15 +01:00
Donald Little
b74de02190
Return right side expression value on struct matching ( #7160 )
2017-12-30 18:35:40 +01:00
Andrea Leopardi
48e914dd3a
Hard-deprecate some things for 1.7 ( #7139 )
2017-12-24 21:32:56 +01:00
José Valim
9e1485f29a
Start v1.7
2017-12-23 19:40:30 +01:00
José Valim
3010cd3dc1
Provide better error messages for contextual operators
...
Such as | and ::
Closes #6835
2017-12-23 10:27:28 +01:00
José Valim
f6a017dbc3
Add missing ;
2017-12-19 14:40:52 +01:00
José Valim
695915b586
Read the deprecated chunk directly as a list
2017-12-19 12:18:12 +01:00
Glauber Campinho
1d58413053
Introduce @deprecated ( #7113 )
2017-12-19 11:44:35 +01:00
Glauber Campinho
b99306bb44
Remove multiple clauses warning for default values on bodiless clause ( #7092 )
2017-12-11 21:38:49 +01:00
José Valim
4d3cbcdaaa
Introduce @since as non-warning definition annotation
...
Partially implements #7099 .
2017-12-11 18:22:08 +01:00
José Valim
74f617399f
Use a single table instead of digraph for tracking locals
...
This reduces the number of spawned ETS tables from 3 to 1
per local tracker and also removes the need for a separate
process.
Closes #7091 .
2017-12-06 19:49:54 +01:00
Glauber Campinho
25dc8d8d4f
Move boolean checks optimizations to Kernel ( #7071 )
2017-11-30 00:29:54 -02:00
Glauber Campinho
e12a76eca9
Translate clauses for boolean check ( #7069 )
...
Warnings for unsafe variable on boolean checks stopped working after #7015 because
variables of the right clause are unbound on the left clause.
Fixes #7044
2017-11-28 11:56:13 -02:00
José Valim
6915de35a6
Attempt to soft_purge modules, closes #7047
2017-11-21 13:57:52 -02:00
jgmchan
882c2bdb24
Show better error if an anonymous function has default arguments
2017-11-16 13:53:28 -02:00