Age | Commit message (Collapse) | Author |
|
Ensure that correct (not necessarily optimal) code is generated for
Core Erlang code not originating from v3_core.
|
|
The guard optimizations in v3_kernel has removed the need for
beam_bool.
|
|
|
|
sys_pre_expand previously did a lot more work, for example,
translating records and funs, but now is merely a grab bag
of small transformations. Move those transformations to
v3_core.
|
|
retrieve the value of the environment variable ERL_COMPILER_OPTIONS
in the same manner as used by file/2, forms/2 and output_generated/2
|
|
The inliner generates variable whose names are numeric. Run
the inliner to cover one more line in core_pp.
|
|
Several test cases in compile_SUITE (e.g. core/1) extracts the
abstract code from a BEAM file and runs the compiler on it.
It is only a waste of time to use the abstract code from
cloned versions of test case modules. That is, use record_SUITE,
but don't use record_no_opt_SUITE, record_post_opt_SUITE, or
record_inline_SUITE since they all contain essentially the same
abstract code.
|
|
missing_testheap/1 is no longer relevant for the following reasons:
1) Because of the literal pool introduced in R12, no test_heap
instructions are needed in the guards.
2) beam_validator would abort the compilation if any needed test_heap
instructions were missing.
|
|
Use case in compile.erl is cryptographical so use
crypto:strong_rand_bytes/1 instead.
Use case in test suite is not cryptographical so use
other test instead.
|
|
When debugging, it is important that we can trust the Core Erlang
pretty printer and Core Erlang parser.
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
compile:forms/1,2 will crash when the current working directory has
been deleted. Fix that problem, and while we are at it, also stop
including {source,""} in module_info() when no source code file is
given.
Reported-at: http://bugs.erlang.org/browse/ERL-113
Reported-by: Adam Lindberg
|
|
Slightly speed up 'erlc' by pre-loading the modules used
by the compiler. Write a test case to ensure that the correct
set of modules are loaded.
|
|
|
|
|
|
|
|
The macro ?t is deprecated. Replace its use with 'test_server'.
|
|
|
|
?config is ugly and not recommended. Use proplists:get_value/2
instead.
|
|
Either rely on the default 30 minutes timetrap, or set the timeout
using the supported methods in common_test.
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
The two bad record usage test cases in compile_SUITE do not
belong there, as the errors are detected in erl_lint. Move the
test to the erl_lint_SUITE.
|
|
|
|
The files/2 function is confusing. The second argument names
the output directory, not the name of the source module. It is
common trap to attempt to point a different source file using
files/2.
Introduce the new get_files/3 which explicitly names the module
name.
|
|
In the future we might want to add more bit syntax optimizations,
but beam_block is already sufficiently complicated. Therefore, move
the bit syntax optimizations out of beam_block into a separate
compiler pass called beam_bs.
|
|
Make sure that all warnings produced when compiling the
test suite contains filenames and line numbers.
|
|
|
|
|
|
To run eprof for a compiler pass:
erlc +'{eprof,beam_asm}' file.erl
The name of the compiler pass is the name as printed when
'time' option is used. It is usually, but not always, the module
name for the compiler pass.
|
|
When we compile from Core Erlang, do it with and without
Core Erlang optimizations to ensure that we are not dependent
on the optimizations always being run.
|
|
Cover more code in v3_core.
|
|
'asm' was deprecated in 18315c16, to be removed in 18.x.
|
|
Add the mentioned test suites for *all* library and touched
non-library applications.
|
|
|
|
|
|
erlc is wired to treat *.S files as assembler and build them as
compile:file(File, [from_asm]), but this is not documented. There's also
a documented compile:file/2 option called 'asm' (mapping to 'from_asm'),
but the wording discourages its use. All of this has been in place and
in use for a long time. Therefore, it should be supported officially.
To fix that, make the following changes:
* document erlc handling of *.core files
* un-document 'asm' and document 'from_asm' instead
* deprecate 'asm'
While at it, fix a minor typo in the test suite.
|
|
|
|
* maint:
compiler: Conform returned errors to the documented format
|
|
ErrorInfo is documented to be:
{ErrorLine,Module,ErrorDescriptor}
but for some errors with line numbers it would look like:
{Module,ErrorDescriptor}
Ensure that all ErrorInfo tuples have three elements. Use 'none'
instead of a line number:
{none,Module,ErrorDescriptor}
There already are errors that return 'none' when no line number is
available, but that convention was not documented. Mention it in the
documentation.
Also make sure that the compiler will not print 'none' as a line
number in error messages (if the 'report_errors' option is given) as
that looks stupid. That is, when attempting to compile a non-existing
module, the error message should be:
non-existing.erl: no such file or directory
and not:
non-existing.erl:none: no such file or directory
|
|
|
|
Conflicts:
bootstrap/lib/stdlib/ebin/beam_lib.beam
lib/public_key/test/erl_make_certs.erl
|
|
Since both the STDLIB and compiler applications turn warnings
into errors, we must stop using the old deprecated crypto functions.
While we are at it, generalize the format of the key tuple returned
by beam_lib:make_crypto_key/2 to facilitate introducing new crypto
methods in the future. Change the format to:
{Type,Key,IV,BlockSize}
where Type, Key, and IV are the first three arguments for either
crypto:block_encrypt4/ or crypto:block_decrypt/4, and BlockSize
is the block size for the crypto algorithm (it is needed to properly
pad the plaintext blocks before encryption).
|
|
|
|
|
|
|
|
If a process trap exits, calling the compiler would leave an EXIT
message in the message queue of the calling process because the
compiler spawns a temporary work process. Eliminate the EXIT process
by monitoring the temporary process instead of linking to it.
Reported-by: Jeremy Heater
|
|
Correct the forms_2 test case introduced in 2d785c07fbf9f533bf so
that it will work on Windows. As originally written, the test case
assumed that filename:absname("/foo/bar") would return "/foo/bar",
which is not true on Windows (typically, the result will be
"c:/foo/bar").
While at it, clean up indentation, the overlong line, and comments.
|
|
Because of a copy-and-paste error in erlc.c, the -MP flag had the same
effect as -MG. As a workaround, you had to pass +makedep_phony to enable
the MP option. This patch makes -MP work as intended.
|
|
This commit adds a source option to compile:forms() that
sets the source value returned by module_info(compile).
|
|
|