| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This saves us from having to convert them to lists on the fly at
runtime, which is extremely annoying because of the special case
for "module_name.erl"
This also means that file paths can be arbitrarily long in the
future.
|
|
|
|
|
| |
Now that we no longer execute code inside them, they no longer
need to be allocated at runtime.
|
| |
|
|
|
|
|
|
|
|
| |
This allows the JIT to be used on systems that enforce a W^X
policy.
To help catch related errors at compile time, all code pointers
have been marked `const`.
|
|
|
|
|
|
| |
Co-authored-by: John Högberg <john@erlang.org>
Co-authored-by: Dan Gudmundsson <dgud@erlang.org>
Co-authored-by: Björn Gustavsson <bjorn@erlang.org>
|
|
|
|
|
|
|
|
| |
This is needed as BeamAsm needs the export entries to
be executable, which means that we need to allocate them.
Co-authored-by: John Högberg <john@erlang.org>
Co-authored-by: Dan Gudmundsson <dgud@erlang.org>
|
|\
| |
| |
| |
| | |
* maint:
Update copyright year
|
| | |
|
|/
|
|
|
| |
This hides traps when BIFs are traced, making them appear as a
single call + return pair.
|
| |
|
|
|
|
| |
I noticed this seconds after merging... :(
|
|
|
|
|
| |
This makes them roughly as fast as integer_to_list/1 and
integer_to_binary/1.
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
When supplied without an enclosing list, bitstrings were returned
as-is instead of badarging.
|
|/
|
|
| |
into utility functions.
|
| |
|
|
|
|
|
| |
Only term_to_binary needed some extra attention
as it used to initialize refc as 0 instead of 1.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* fix-source-typos: (25 commits)
Fixed typos in system/doc
Fixed typos in lib/xmerl
Fixed typos in lib/wx
Fixed typos in lib/stdlib
Fixed typos in lib/snmp
Fixed typos in lib/ssl
Fixed typos in lib/ssh
Fixed typos in PKCS-8.asn1 file
Fixed typos in lib/parsetools
Fixed typos in lib/orber
Fixed typos in lib/mnesia
Fixed typos in lib/megaco
Fixed typos in lib/kernel
Fixed typos in lib/jinterface
Fixed typos in lib/inets
Fixed typos in lib/hipe
Fixed typos in lib/eunit
Fixed typos in lib/erl_interface
Fixed typos in lib/eldap
Fixed typos in lib/edoc
...
|
| | |
|
|/
|
|
|
| |
A magic destructor can return 0 and thereby take control
and prolong the lifetime of a magic binary.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Magic references are *intentionally* indistinguishable from ordinary
references for the Erlang software. Magic references do not change
the language, and are intended as a pure runtime internal optimization.
An ordinary reference is typically used as a key in some table. A
magic reference has a direct pointer to a reference counted magic
binary. This makes it possible to implement various things without
having to do lookups in a table, but instead access the data directly.
Besides very fast lookups this can also improve scalability by
removing a potentially contended table. A couple of examples of
planned future usage of magic references are ETS table identifiers,
and BIF timer identifiers.
Besides future optimizations using magic references it should also
be possible to replace the exposed magic binary cludge with magic
references. That is, magic binaries that are exposed as empty
binaries to the Erlang software.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Avoid yield in the BIF when input is small. This either yielding
before beginning to work in the BIF, or by allowing some more
reductions before yielding.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly a pure refactoring.
Except for the buggy cases when calling erlang:halt() with a positive
integer in the range -(INT_MIN+2) to -INT_MIN that got confused with
ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT.
Outcome OLD erl_exit(n, ) NEW erts_exit(n, )
------- ------------------- -------------------------------------------
exit(Status) n = -Status <= 0 n = Status >= 0
crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0
The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and
ERTS_DUMP_EXIT are the same as before (even though their values have
changed).
|
| |
|
|\
| |
| |
| |
| |
| | |
* sverk/hipe-inline-reserve-trap-frame:
erts: Extend usage of ASM macro to avoid including asm macros in C code
erts: Make hipe_{un}reserve_beam_trap_frame INLINE
|
| | |
|
|/
|
|
|
| |
except the reference counter 'refc', as different callers
have different strategies regarding the lifetime of the binary.
|
|
|
|
|
|
|
| |
- erlang:list_to_binary/1
- erlang:iolist_to_binary/1
- erlang:list_to_bitstring/1
- binary:list_to_bin/1
|
|
|
|
|
|
| |
- erlang:binary_to_list/1
- erlang:binary_to_list/3
- erlang:bitstring_to_list/1
|
|
|
|
|
|
| |
A common case is to wrap an argument to list_to_binary in a list
to ensure conversion can happen even though the argument may already
be a binary. Use fast path for this case.
|
|
|
|
| |
Added: binary_to_integer/1,2, integer_to_binary/1,2
|
| |
|
| |
|
|
|
|
| |
Can still not setup -a, but cerl works.
|
| |
|
|
|
|
| |
Noticed-by: Jon Meredith
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The io_list_len() function returns an int, where a negative return
value indicates a type error. One problem is that an int only consists
of 32 bits in a 64-bit emulator. Changing the return type to Sint
will solve that problem, but in the 32-bit emulator, a large iolist
and a iolist with a type error will both return a negative number.
(Noticed by Jon Meredith.)
Another problem is that for iolists whose total size exceed the
word size, the result would be truncated, leading to a subsequent
buffer overflow and emulator crash.
Therefore, introduce the new erts_iolist_size() function which
returns a status indication and writes the result size through
a passed pointer. If the result size does not fit in a word,
return an overflow indication.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new_binary() function takes a size argument that is an
int. In the 64-bit emulator (sizeof(int) == 4, sizeof(Uint) == 8),
any sizes >= 0x8000000 become 0xffffffff80000000 and above and
triggers a memory allocation failure.
Change the type of the size argument to Uint, and change any
callers that cast the argument to an int.
Correction-by: Jon Meredith
|
| |
|
|
|
|
|
|
|
|
|
| |
This will reduce the risk of integer wrapping in bin vheap counting.
The vheap size series will now use the golden ratio instead of doubling
and fibonacci sequences.
OTP #8730
|