José Valim
0166ee82a1
Do not read from ExCk chunk if not necessary
...
Since all information is in the debug chunk, we use
that instead. This also allows us to remove
`no_warn_undefined` from the ExCk chunk.
2020-06-25 15:34:46 +02:00
José Valim
e51cc8b88c
Also track exports API via local deps
2020-06-25 15:09:14 +02:00
José Valim
ec13373031
Allocate line zero ann just once
2020-04-25 20:41:53 +02:00
Michał Łępicki
7094e9754c
Fix dialyzer errors caused by erl_anno:anno type being opaque ( #9961 )
2020-04-25 20:29:56 +02:00
José Valim
8ec9860a4e
Ensure generated docs can be overridden without explicit clause
2020-04-25 00:35:04 +02:00
José Valim
351cff9d95
Fixes for Erlang/OTP 23
2020-02-26 12:06:08 +01:00
José Valim
7962c6859a
Normalize literal functions during expansion
2020-02-18 14:46:45 +01:00
Eric Meadows-Jönsson
e8c49a446a
Do not warn for functions generated by Erlang compiler ( #9713 )
2020-01-12 12:15:21 +01:00
José Valim
5dd271d361
Fix bounded funs in macrocallbacks, closes #9687
2020-01-03 17:18:27 +01:00
José Valim
3b16807374
Reduce the amount of data sent between compilation processes
2020-01-03 17:18:27 +01:00
José Valim
3b3c15b979
Do not add no_warn_undefined to CInf chunk
2019-12-09 10:33:35 +01:00
Eric Meadows-Jönsson
9394612a3d
Remove signatures from checker chunk ( #9634 )
2019-12-07 18:09:50 +01:00
José Valim
783ceb4507
Ensure local captures work correctly on macro expansion
...
Closes #9245
2019-07-27 11:28:05 +02:00
José Valim
cbc6029fec
Store each compiler option directly in elixir_config, closes #9208
2019-07-18 17:13:10 +02:00
Eric Meadows-Jönsson
f418ed247c
Add ExCk chunk ( #9203 )
2019-07-09 21:23:38 +02:00
José Valim
78ce6793e3
Store relative file in module definition ( #9099 )
...
Prior to this patch, we would always compute the relative
path to the current working directory (CWD), but this meant
consolidated protocols would always get a full path since
they are always outside of their current working directory.
We address this by also storing the relative path in the
definition.
Closes #9095
2019-05-31 09:01:02 +02:00
José Valim
22bcddfa1b
Ensure debug_info is kept in protocols, closes #8923
2019-03-31 10:57:55 +02:00
José Valim
3fd6cf5e91
Do not rely on map ordering when sorting specs, see #8689
2019-01-24 21:54:05 +01:00
Wojtek Mach
ca40d1594c
Show docs for callback with multiple clauses ( #8553 )
...
* Merge callback's multiple clauses in elixir_erl.erl
* Simpler callbacks deduplication
2019-01-02 13:12:01 +01:00
José Valim
0e15f809bb
Avoid race conditions on behaviour checks, closes #8568
2018-12-27 16:29:33 +01:00
Hans
db9314374d
Add special fn case to signature_to_binary ( #8429 )
2018-11-27 01:04:00 +01:00
José Valim
1ca25436be
Use the no_spawn_compiler_process in more recent release
...
See https://github.com/erlang/otp/pull/1972 .
2018-10-03 14:02:46 +02:00
José Valim
159e9655d5
Bypass erl_lint and spawn compiler processes manually ( #8241 )
...
This speeds up the Elixir compiler from 5-10% as we no
longer do duplicate work on erl_lint and expand_records.
We also avoid the copying of messages by controlling
exactly when the compiler spawns new processes.
2018-10-02 11:18:44 +02:00
Michał Muskała
335cfdbcad
Separate testing for unquotes from escaping
2018-07-25 00:10:02 +02:00
Michał Muskała
4229536799
Inline construction of remote erlang calls in compiler
2018-07-25 00:10:02 +02:00
Michał Muskała
06b5eae89f
Compile protocols in elixir syntax ( #7832 )
...
This siwtches protocol compilation to happen on the epxnaded Elixir AST
instead of the Erlang AST. This is slightly less complex and opens
possibility for easy "partial" compilation of protocols.
Additionally instead of rewriting specs on consolidation, this marks the
functions that end-up being rewritten with @dialyzer :nowarn_function to
disable overly eager dialyzer warnings.
2018-07-12 14:43:16 +02:00
José Valim
35ac568044
Require Erlang/OTP 20+
2018-07-12 12:12:00 +02:00
László Bácsi
0267ae2c7e
Support adding arbitrary docs metadata with @doc keyword() ( #7852 )
2018-07-11 10:19:38 +02:00
José Valim
bed2547895
Properly inflect names for structs
2018-07-10 14:02:41 +02:00
Laszlo Bacsi
cf68b9f652
Move compilation of docs metadata to Elixir side
2018-07-10 13:42:20 +02:00
José Valim
e16775d5a4
Lift signature_to_binary from ExDoc
2018-07-10 11:29:39 +02:00
José Valim
32450a0fd9
Remove Code.get_docs/2 and streamline the new chunk generation
2018-07-05 10:31:23 +02:00
László Bácsi
2ecb5d00bd
Adopt EEP 48 and add Code.fetch_docs/1 ( #7826 )
...
At this point the legacy chunk and the original `Code.get_docs/2`
implementation is still in place, but the tests have been adjusted to
exercise `Code.fetch_docs/1` instead.
2018-07-03 18:43:41 +02:00
Michał Muskała
071c41b2ce
Refactor __info__ so it generates smaller assembly ( #7753 )
...
The phash value changes because clauses for the `__info__` function
are now ordered differently
2018-06-14 15:58:09 +02:00
José Valim
09e25a75d0
Support specsdiff __info__ spec clauses, closes #7460 ( #7461 )
2018-03-26 16:04:20 +02:00
Michał Muskała
946455ec42
Validate @compile attribute in elixir ( #7476 )
...
* error on undefined inlined functions
* warn on parse transforms
2018-03-25 09:52:36 +02:00
José Valim
ac1af198c8
Move accumulate attributes to a separate table ( #7472 )
...
We also speed up reading and writing of attributes via the @ macro.
2018-03-21 17:13:43 +01:00
José Valim
a5a8ad3eaa
Refactor how typespecs docs are stored
2018-03-20 18:03:02 +01:00
José Valim
0ce9ea6188
Keep specs, types and callbacks in the bag table
...
This avoids copying typespecs in and out of the table
every time there is a new entry.
We also make sure the Protocol module is only relying
on public APIs and not on inner typespec behaviour.
2018-03-20 18:03:02 +01:00
José Valim
d297fe5195
Avoid full table traversals when building "deprecated" and "docs" chunk
2018-03-20 18:03:02 +01:00
Andrea Leopardi
bf956e2afb
Extract some functionality from elixir_erl to Kernel.Typespec ( #7436 )
2018-03-10 12:04:13 +01:00
Andrea Leopardi
875ce67673
Implement check for @spec attributes for undefined functions ( #7431 )
2018-03-09 11:31:15 +01:00
Andrea Leopardi
2dee728a3e
Add a "erl_lint" check for behaviour_info/1 plus callback attributes ( #7422 )
...
Part of #5800 .
2018-03-07 22:48:53 +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
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
José Valim
ba19fc8e50
Discard malformed lines in metadata
...
Closes #6980 .
2017-10-27 00:47:09 +02:00
José Valim
4b930b0a0b
Avoid conflicts with erl_anno in meta
...
We avoid using :file publicly as well as :location privately.
We do still use :file privately but that's supposed to mirror
the `-file` annotation in Erlang before function definitions.
2017-10-25 00:33:05 +02:00