Age | Commit message (Collapse) | Author |
|
* bjorn/remove-parameterized-modules/OTP-10616:
Remove support for parameterized modules
xref_SUITE: Don't test parameterized modules
shell_SUITE: Don't test parameterized modules
erl_expand_records_SUITE: Don't test parameterized modules
erl_eval: Don't test parameterized modules
|
|
|
|
|
|
|
|
Expect modifications, additions and corrections.
There is a kludge in file_io_server and
erl_scan:continuation_location() that's not so pleasing.
|
|
Since we always want to remove unused labels directly after code
generation (whether we'll run the optimization passes or not),
we can simplify the code by doing it in beam_a.
|
|
Introduce the mandary beam_a pass that will be run directly after code
generation, and the mandatory beam_z pass that will be run just before
beam_asm. Since these passes surround the optimizations, beam_a can
(for example) do instruction renaming to simplify the optimization
passes and beam_z can undo those renamings.
|
|
|
|
Don't throw the parse tree in the face of the user.
OTP-8707
|
|
|
|
Column numbers was merged without understanding all the whole
story. See mail on erlang-patches for details.
This reverts commit df8e67e203b83f95d1e098fec88ad5d0ad840069, reversing
changes made to 0c9d90f314f364e5b1301ec89d762baabc57c7aa.
|
|
* nox/compile-column-numbers:
Fix messages ordering with column numbers
Fix type compile:err_info/0
Test column number reporting in error_SUITE
Fix printing of errors with column numbers
Create a new "column" option in compile
Allow setting of initial position in epp
Export type erl_scan:location/0
|
|
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
|
|
With L1, L2, C1, C2 integers such as L1 < L2 and C1 < C2, locations
are ordered like this:
L1 < {L1, C1} < {L1, C2} < L2
|
|
|
|
There was a colon missing after the column number, it must be an error
as it's not missing in list_errors/2.
|
|
If set, compile will call epp with a full location {1, 1} instead of 1,
thus making it keep the column numbers in the parsed AST.
|
|
This commit adds a source option to compile:forms() that
sets the source value returned by module_info(compile).
|
|
In order to save space, rewrite suitable calls to erlang:error/{1,2}
to special BEAM instructions.
This code is probably longer than the code taken out of v3_life and
v3_codegen in the previous commit, but it is much easier to
understand and maintain since the BEAM assembler format is better
understood than the v3_life format.
|
|
To facilitate debugging of compiler bugs, teach the compiler the
'no_dead' option. Since the beam_dead pass used to do the necessary
splitting of basic blocks to expose all labels, we must move that
splitting into a separate pass that is always run.
|
|
* bjorn/compiler/options/OTP-9752:
filename documentation: Recommend against using filename:find_src/1,2
Teach filename:find_src/1,2 to handle slim or stripped BEAM files
filename: Eliminate failing call to Mod:module_info(source_file)
filename.erl:filter_options/1: Remove handling of dead options
compiler: Don't include {cwd,_} in module_info(compile)
compiler: Don't include source code options in module_info(compile)
hipe: Teach hipe to handle slim or stripped BEAM files
|
|
The {cwd,Dir} option is always included if the module has been
compiled by erlc. Since its presence cannot be relied upon and it
wastes memory, get rid of it.
|
|
As far as I know, the purpose of the compiler options included in
Mod:module_info(compile) has never been documented.
An educated guess is that they are there in case you want to
re-compile the module with the same options, and also to aid in
debugging when you need to know how a module was compiled.
In neither case is there any need to include options given in the
source itself in options included in Mod:module_info(compile).
Including those options will only waste memory.
Therefore, only include in the BEAM file the options that were
given to compile:file/2.
|
|
|
|
Behaviours may define specs for their callbacks using the familiar spec syntax,
replacing the '-spec' keyword with '-callback'. Simple lint checks are performed
to ensure that no callbacks are defined twice and all types referred are
declared.
These attributes can be then used by tools to provide documentation to the
behaviour or find discrepancies in the callback definitions in the callback
module.
|
|
Conflicts:
lib/asn1/doc/src/asn1ct.xml
|
|
|
|
|
|
|
|
Also update the r12 and r13 options so that they imply no_line_info.
|
|
In the location information tables in the run-time system, source
filenames that are the same as the module name plus ".erl" extension
are not stored explicitly, thus saving memory.
To take advantage of that optimization, avoid complicating the names of
files in the current working directory; specifically, make sure that
"./" is not prepended to the name.
|
|
* bjorn/compiler/refactor-source-options:
compile: Refactor handling of source options (e.g. 'from_core')
|
|
This is useful when a project is built with Makefiles and erlc(1)
instead of EMakefiles. Tracking dependencies by hand is error-prone and
it becomes painful when using external application headers like EUnit's
one.
A dependencies Makefile will look like this:
module.beam: module.erl \
/usr/local/lib/erlang/lib/eunit-2.1.4/include/eunit.hrl \
header.hrl
When included in the main Makefile, 'module' will be recompiled only
when needed.
GCC offers the same feature and new erlc(1) options are compatible with
it.
More informations at:
http://wiki.github.com/dumbbell/otp/dependencies-makefile
|
|
The options for compiling from Core Erlang, BEAM assembler files,
and BEAM files are handled in several places, making it difficult
to change or add more similar options. Refactor the option handling
so that each option only need to be handled in one place.
|
|
* pan/ms_transform_warnings/OTP-6759:
Add testcases for ms_transform warning and fix scoping
Add warnings for shadowed variables in ms_transform funs
|
|
* ks/cleanups:
compiler: Fix incorrect types and specs
escript: Add more types to records
debugger: Clean up as suggested by tidier
docbuilder: Clean up as suggested by tidier
Conflicts:
lib/debugger/src/dbg_iload.erl
lib/debugger/src/dbg_ui_trace_win.erl
|
|
Also changed compiler to allow for warnings in parse_transforms.
|
|
While at it, do some other minor clean-ups.
|
|
|
|
Commit 329f737c03db51918361e127560a6f700e99028e removed
some unused code, but also introduced the need for
further clean-ups.
Fix a spec so that its return corresponds to reality.
Take out code that will never match from a function.
|
|
On Solaris only, the 'time' option would include the process
size for the Erlang virtual machine in its output. Since few
compiler developers use Solaris nowadays, remove the code.
|
|
If a gen_server process has many messages in its message queue and
calls another gen_server process, the selective receive in
gen_server:call() will have to go through the entire message queue.
Have the compiler generate the new mark_recv/1 and mark_recv/1
instructions that can avoid going through the entire message queue.
|
|
The no_binaries option terminates the compiler with an error
if any bit syntax is used in the module being compiled.
(It used to be implied by the removed r11 option.)
|
|
The no_constant_pool option was implied by the r11 option. It turns
off the usage of the constant (literal) pool, so that BEAM
instructions that use constants can be loaded in an R11 system.
Since the r11 option has been removed, there is no need to
retain the no_constant_pool option.
|
|
The r11 option was used to generate BEAM modules that could
loaded both on both R11 and R12/R13 to facilitate testing
that R11 and R13 nodes could communicate with each other.
Since R14 is only required to be compatible with R12 and
R13 nodes, the r11 option is no longer needed.
|
|
|
|
We must also catch exits, not only errors, since the hipe
compilers does an exit/1 if an internal error is found.
|
|
Implement the 'no_native' option to disable native-code
compilation. If given in a module like this:
-compile(no_native).
it will override a 'native' option given on the command
line.
|
|
* cf/compile_warning_as_error:
Add option -Werror in erlc(1)
compile: add flag warnings_as_errors to treat warnings as errors
compile.erl: remove trailing whitespace
OTP-8382 The -Werror option for erlc and the compiler option
warnings_as_errors will cause warnings to be treated as errors.
(Thanks to Christopher Faulet.)
|
|
With this flag, warnings are treated as errors, like gcc flag '-Werror'.
|