Commit Graph
39 Commits
Author SHA1 Message Date
José Valim d27062c8ec Add Code.purge_compiler_modules/0
Closes #7047
2018-06-20 20:51:05 +02:00
José Valim 8c85557346 Share Bag and Set tables across a module functionality
Previously we kept a Set table for attributes and a Bag table
for function definitions and clauses. This led to suboptimal
usage of ets tables.

With this commit, we start using both Bag and Set tables
to store function/macro definition information. In the next
commits we will continue generalizing the tables, storing
specs, docs and accumulated attributes in the Bag and keep
the remaining functionality in Set.
2018-03-20 10:30:37 +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 40fe02acc0 Serialize lookups to avoid race in tests 2016-11-03 13:45:33 +01:00
eksperimental 4ceb41e71b Formmating: Add white space around vertical bar (#4507) 2016-04-25 00:55:49 +02:00
José Valim 35fbf0716a Move code server and compiler away from ord* 2015-10-19 12:19:15 +02:00
José Valim 8459c9d472 Remove readd_paths 2015-04-02 18:07:54 +02:00
eksperimental 61675c3ea8 Add space after comma: Format consistently 2015-03-17 22:55:27 +07:00
José Valim c80b211445 Merge pull request #2801 from fishcakez/app_env
Move application state out of application env
Conflicts:
	lib/elixir/lib/uri.ex
	lib/iex/lib/iex/server.ex
2015-01-24 14:07:46 +01:00
José Valim 150a8a1dcd Fix bootstrap issues 2014-12-23 22:26:04 +01:00
José Valim 2935e7149a Ensure compilation does not leave random spurious data on failure
Prior to this patch, the parallel compiler could leave spurious
processes and the module definition could leave stale data
in the elixir_modules table.

The issue has been fixed by emitting the proper exit signals
and by using monitors.
2014-11-21 17:40:06 +01:00
José Valim 597d90b326 Add comments to code:ensure_loaded/1 snippets 2014-07-08 11:28:24 +02:00
James Fish 39cd4a6594 Fix unmatched returns dialyzer warnings 2014-07-04 02:45:16 +01:00
José Valim dc577b8bfa Ensure mix preserves -pa and -pz given to the command line 2014-07-02 17:30:20 +02:00
José Valim 56f15d9f4e Do not add spaces after { and before }
This makes the source code consistent with the result
returned by inspect/2.
2014-04-21 19:06:35 +02:00
José Valim 5f682023a6 Deprecate usage of @behavior in favor of @behaviour 2014-01-28 11:21:55 +01:00
José Valim cba7c5bd80 Only expand __ENV__.call if it is a known function 2014-01-03 22:39:48 +01:00
José Valim 83c93beaa6 Get rid of environment macro counter in favor of a global one 2013-12-30 11:45:23 +01:00
José Valim 219ded1b91 Rename DispatchTracker to LocalsTracker 2013-12-22 09:20:41 +01:00
Samuel Tonini 427e5ed712 use a separat compilation status per parallel compilation 2013-11-03 16:52:56 +01:00
José Valim 5bd12f9cb9 Move lexical tracker to scope 2013-11-01 16:03:12 +01:00
José Valim 3c151d5357 Add Kernel.LexicalTracker 2013-11-01 16:03:12 +01:00
José Valim 1d8e39a2df Only change compilation status if warnings_as_errors 2013-06-15 09:46:10 +02:00
José Valim 21db352039 Always print warnings to stderr 2013-06-15 09:32:53 +02:00
Geoffrey Clements 93d5128db3 Implement José's suggestions.
1. Detect all places in elixir_errors:handle_file_warning/3 where we
output something with io
2. Change those places to go through an internal function that will
call elixir_compiler:get_opt and figure out if we should print to
stdout or stderr and act accordingly
3. In the same function above, whenever we print a warning as an error,
we should store somewhere that a warning as an error happened. I
recommend storing that in the elixir_code_server gen server
4. Provide a Code.compilation_status that would return it
2013-06-09 07:49:38 -04:00
José Valim 3137bfc614 Move bootstrap code for IEx to IEx.CLI 2013-01-29 12:30:09 -07:00
José Valim ba528f0f92 Add default timeout to elixir_code_server and unify all call points 2013-01-27 11:48:27 -07:00
José Valim a061528731 Ensure IEx runs only after Elixir's CLI process its options 2012-11-30 17:07:12 +01:00
Yurii Rashkovskii b8d16dae6f elixir_code_server should not trap exits and should not log on terminate 2012-11-28 18:51:42 -08:00
José Valim 956773ee7e Make ExUnit exit happen in two steps.
This allows developers to hook custom mechanisms
after the tests are run but before the system halts.
2012-11-28 11:57:38 +01:00
José Valim 401ad781c3 Ensure debug_info is actually set to true 2012-11-28 09:48:04 +01:00
José Valim e801cbd380 Convert integer to a list in order to generate the module name 2012-11-16 09:50:13 +01:00
José Valim ad37d5f67a No need for lists:concat 2012-11-15 16:56:29 +01:00
José Valim 40efeb48d7 Reduce atom footprint when compiling code
Previously, we were generating atom names based on
the file or the module name. This commit replaces
it by a pool of atom names. After a module name
is used and purged with success, it is added back
to the pool so it can be reused many times.
2012-11-15 16:44:27 +01:00
José Valim 0632e01f44 Use references instead of relying on file names 2012-10-01 23:39:40 -07:00
José Valim 2a94699d79 Allow files to be unloaded 2012-08-21 10:37:31 -03:00
José Valim cd6aedc8f2 Code.require_file blocks until file is available 2012-08-20 18:14:41 -03:00
José Valim c186bb19df Add d to print docs in IEx console, compile by default with docs 2012-07-16 15:29:29 +02:00
José Valim d5031b6347 Move all code to erlang style apps 2012-07-05 20:20:16 +02:00