Age | Commit message (Collapse) | Author |
|
The HiPE compiler implicitly relied on the assumption that a function
will never appear as both exported and also used as function closure.
This was true because the BEAM compiler prior to R16B created module
local anonymous functions for each closure. A proposed change to the
BEAM compiler invalidates this invariant, so in order to accommodate
for this change there needs to be a change of how the set of possibly
escaping functions is computed.
While doing this, the code was simplified by taking out a boolean()
tag that indicated whether a function is a closure or exported and
also slightly cleaned up the affected modules.
|
|
|
|
The hybrid heap emulator was last working in the non-SMP R11B
run-time system. When the constant pools were introduced in R12B,
the hybrid heap emulator was not updated to handle them.
At this point, the harm from reduced readability of the code is
greater than any potential usefulness of keeping the code.
|
|
|
|
The BEAM disassembler used the atom 'none' to signify the absence
of a compile_info chunk in a .beam file. This clashes with the type
declaration of the compile_info field of a #beam_file{} record as
containing a list. Use [] to signify the absence of this chunk.
This simplifies the code and avoids a dialyzer warning.
For fixing a similar problem and for consistency, changed also the
return type of the attributes field of the #beam_file{} record.
This required a change in the beam_disasm test suite.
|
|
|
|
* 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
|
|
Compiling single functions (as opposed to whole modules) to native
code complicates code management in HiPE. It would also vastly
complicate whole-module optimizations, such as returning multiple
return values instead of tuples within a module.
As a first step, remove the external interface for the single
compilation feature. In the future, there are many things that
could be restructured and simplified.
|
|
|
|
|
|
hipe:load/1 (and unexported hipe:load/2) just did not work. Calling it
would fail with a badmatch because only the hipe chunk was passed to
do_load/3's third parameter called WholeModule. Since this parameter is
then passed to beam_lib:all_chunks/1 which accepts the whole module as a
binary as well as a path to the beam file, and since a path is exactly
what we have in load/2, the fix consists in letting do_load/3 accept a
path and passing it from load/2.
|
|
|