Age | Commit message (Collapse) | Author |
|
* sverk/bif-args/OTP-9662:
erts,hipe: Limited support for hipe cross compilation
erts-hipe: Change THE_NON_VALUE for HiPE enabled debug emulator
erts-hipe: Enable debug compiled hipe-VM with lock checker
erts-hipe: Rename fail_bif_interface_0 to standard_bif_interface_0
erts-hipe: Deliberate leak of native fun entries
erts-hipe: Fix new trap conventions for x86, amd64 and ppc
Store the trap address in p->i
Store the trap arguments in the X register array
erts-hipe: Make some primops use new BIF calling convention
erts-hipe: Adapt generated BIF wrappers for new calling convention
erts-hipe: Remove obscuring macros in generated assembler code
erts-hipe: Make hipe enabled emulator compile with new BIF calls
Simplify the instructions for calling BIFs
Change the calling convention for BIFs
Use the proper macros in all BIFs
Conflicts:
erts/emulator/beam/bif.h
erts/emulator/beam/erl_bif_info.c
|
|
* sverk/enif_inspect-memleak/OTP-9668:
erts: Fix memory leak of enif_inspect_* on independent environment
|
|
* bjorn/create-less-garbage:
Optimize filename:basename/1 to produce less garbage
Optimize filename:extension/1 to produce less garbage
sys.c for Unix: Undo caching of utsname in os_flavor()
Pre-build the tuples returned by os:type/0 and os:version/0
|
|
* egil/fix-compiler-warnings:
erts: Remove unused variable in enif_make_binary
erts: Remove debug variable in list_to_binary
erts: Remove cp on exiting and trapping processes
erts: Remove debug variables in erl_db
erts: Remove dead code in efile_drv
erts: Remove lock_check debug variables
erts: Remove unused variable in ttsl_drv
erts: "initialized" is only used with CHLDWTHR
erts: remove debug variables in beam_bp
|
|
OTP-9675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A future release of the compiler might want to treat external
funs as literals. Make sure that the loader can cope with an
export entry being created from both an entry in the literal
pool and from the export table (i.e. if an external fun refers
to an exported function in the same module).
|
|
Make it clear for the user what has happened and how to fix it when
an attempt is made to load a BEAM file containing new instructions
that the current run-time system cannot handle.
Suggested-by: Thomas Lindgren
|
|
* lukas/erts/large_float_cmp/OTP-9497:
Update documentation after changes in integer and float comparison
Do small optimisation on platforms with 32 bit Eterm
Add tests for equality checking
Optimize comparison of huge floats and smaller bignums
Add tests for comparing large floats and small bignums
Cleanup double_to_bignum conversion code
Update size of tmp cmp bignum buffer
Expand tests for float and number comparison
Update heauristic to work on halfword
Add heauristics bignum vs float checks
Optimise bugnum and small comparison
Add float vs integer comparison tests
Update integer and floating point number comparisons
|
|
Affects enif_inspect_iolist_as_binary() on iolists
and enif_inspect_binary() on byte-unaligned binaries.
Also need to allocate inspection buffers in ERTS_ALC_T_NIF for
process independent environments, as we don't know when and where
the environment will be freed.
|
|
and some added comments
|
|
This is a work-around as there are hipe BIFs that return untagged
integers that may be intepreted as THE_NON_VALUE (24).
Hipe bifs that return offsets as untagged integers:
hipe_bs_put_utf8
hipe_bs_put_utf16be
hipe_bs_put_utf16le
Hipe bifs that return raw pointers:
hipe_find_na_or_make_stub
hipe_nonclosure_address
|
|
This is a workaround as hipe code upgrade/unloading does not work properly.
|
|
|
|
For cleanliness, store the trap address in p->i instead of in
p->def_arg_reg[3].
|
|
Store arguments for a trap in the X register array to allow
traps to have any number of arguments.
|
|
Taking advantage of the new calling convention for BIFs, we
only need one instruction to handle BIFs with any number of
arguments. This change eliminates the limit of three arguments
for BIFs, but traps are still limited to three arguments.
|
|
The current calling convention for BIFs makes it necessary to
handle each arity specially, since each argument for the BIF
also becomes an argument for the C function implementing the BIF,
which makes it hard to allow BIFs with any number of arguments.
Change the calling convention for BIFs, so that BIF arguments are
passed in an array to the C function implementing the BIF.
|
|
As a preparation for changing the calling convention for
BIFs, make sure that all BIFs use the macros. Also, eliminate
all calls from one BIF to another, since that also breaks
the calling convention abstraction.
|
|
* bjorn/unicode-noncharacters/OTP-9624:
Allow noncharacter code points in unicode encoding and decoding
|
|
|
|
* fm/enif_is_number:
Add NIF function enif_is_number
Conflicts:
erts/emulator/beam/erl_nif_api_funcs.h
OTP-9629
|
|
The two noncharacter code points 16#FFFE and 16#FFFF were not
allowed to be encoded or decoded using the unicode module or
bit syntax. That causes an inconsistency, since the noncharacters
16#FDD0 to 16#FDEF could be encoded/decoded.
There is two ways to fix that inconsistency.
We have chosen to allow 16#FFFE and 16#FFFF to be encoded and
decoded, because the noncharacters could be useful internally
within an application and it will make encoding and decoding
slightly faster.
Reported-by: Alisdair Sullivan
|
|
On 32 bit we know that a comparison with a lossfull double
and a short will always give the float is being superior.
So therefore we only have to check the sign on the double.
|
|
|
|
|
|
This is needed for use on 32 bit with very large floats.
|
|
|
|
These tests are useful when the difference between the
bignum and float is larger than one bignum segment.
|
|
As it is possible to assume that bignums are bigger than smalls,
we can just check the sign of the bignum.
|
|
For floating point values which are greater than 9007199254740990.0 or
smaller than -9007199254740990.0, the floating point numbers are now
converted to integers during comparison with an integer. This makes
number comparisons transitive for large floating point numbers.
|
|
Each gc_bif[123] instruction must have both a transformation in
ops.tab and special code in gen_guard_bif[123]().
Rewrite it to do most of the work in gen_guard_bif[123]().
|
|
In the handling of generic instructions, we used to always
test whether the instruction was 'too_old_compiler' and abort
loading with a special error message.
Refactor the code so that we only do test if we an error
has occurred. That will allow us to make the test more expensive
in the future, allowing us to customize error messages for certain
opcode without any cost in the successful case.
|
|
|
|
'store_var' is always followed by 'next_arg'.
|
|
'next_instr' is always followed by 'is_op'.
|
|
Since the 'new_instr' instruction always occurs before the
'store_op' instruction, we can merge the instructions into one.
Also, there is no need to include the arity of the BEAM
instruction as an operand, since the arity can be looked up
based on the opcode.
|
|
A 'call' instruction in the loader transformation language is
always followed by an 'end' instruction, so we can replace the
'call' instruction with a 'call_end' instruction.
|
|
We don't need type constraints that essentially are assertions;
the wrong type will be detected and loading aborted when no specific
instruction can be found.
|
|
If the left part of a transformation will always match, omit the
the 'try_me_else' and 'fail' instructions.
As part of this optimization, make it an error to have a
transformation that can never be reached because of a previous
transformation that will always match. (Remove one transformation
from ops.tab that was found to be unreachable.)
|
|
is_list/2 and other test instructions with a zero label was last
generated by the v1 BEAM compiler which was last supported in R6B.
Since BEAM modules produced by that compiler will be rejected with
a nice error message for other reasons (e.g. by the test for the
module_info/0,1 functions), retaining those transformations serves
no useful purpose.
|
|
The hybrid-heap emulator is broken since R12, so there is no
need to keep those instructions.
|
|
Ancient versions of BEAM compiler could generate move instruction with
the same source and destination registers, so the loader would optimize
away such instructions.
|
|
Pre-building the tuples returned by os:type/0 (system_info(os_type))
and os:version() (system_info(os_version)) saves some run-time and
avoids building garbage in the calling process.
|
|
* dev:
Update copyright years
|