Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
from future nodes.
|
|
The tag_val_def function was called and multiple switch statements
had to be traversed in term.c, and then a big switch in the calling
code to branch on the term types. By inlining the switches are
merged by the compiler and a lot fewer branches have to be taken.
Benchmarks show that this increases performance of enc_term by as
much as 10%.
|
|
|
|
* rickard/ohmq/OTP-13047:
Fragmented young heap generation and off_heap_message_queue option
Refactor GC
Introduce literal tag
Conflicts:
erts/doc/src/erlang.xml
erts/emulator/beam/erl_gc.c
|
|
|
|
|
|
Conflicts:
erts/emulator/beam/erl_printf_term.c
erts/emulator/beam/erl_term.c
erts/emulator/beam/utils.c
|
|
If the process stack contained a match state
the print function would crash the vm as it was not
recognized by tag_val_def().
Add new MATCHSTATE_DEF returned by tag_val_def().
All other callers either ignore it or has a default
clause to handle invalid terms.
|
|
Consider the try_case_end instruction:
try_case_end s
The 's' operand type means that the operand can either be a
literal of one of the types atom, integer, or empty list, or
a register. That worked well before R12. In R12 additional
types of literals where introduced. Because of way the
overloading was done, an 's' operand cannot handle the
new types of literals. Therefore, code such as the following
is necessary in ops.tab to avoid giving an 's' operand a
literal:
try_case_end Literal=q => move Literal x | try_case_end x
While this work, it is error-prone in that it is easy to
forget to add that kind of rule. It would also be complicated
in case we wanted to introduce a new kind of addition operator
such as:
i_plus jssd
Since there are two 's' operands, two scratch registers and
two 'move' instructions would be needed.
Therefore, we'll need to find a smarter way to find tag
register operands. We will overload the pid and port tags
for X and Y register, respectively. That works because pids
and port are immediate values (fit in one word), and there
are no literals for pids and ports.
|
|
|
|
|
|
|
|
Keep is_same macro for readability but remove base pointers.
|
|
* Removed COMPRESS_POINTER and EXPAND_POINTER
|
|
|
|
|
|
|
|
|
|
For consistency with other data types, add the is_not_map() macro.
|
|
|
|
|
|
as shorthand for is_flatmap || is_hashmap
|
|
|
|
MAP_DEF and HASHMAP_DEF must have adjacent values
|
|
|
|
|
|
Called with a signed int 'sz' argument on 64 bit
would cause sign extension 'sz' was larger than 33554431.
|
|
Conflicts:
erts/emulator/Makefile.in
erts/emulator/beam/bif.tab
erts/emulator/beam/erl_gc.c
erts/emulator/beam/erl_gc.h
erts/emulator/beam/erl_printf_term.c
erts/emulator/beam/erl_term.c
erts/emulator/beam/erl_term.h
|
|
to not mistake a map for an external term (pid, port or ref).
|
|
The subtag chosen for maps breaks crucial assumptions in other parts of
the system, in particular the native code generation scheme used in the
HiPE compiler. Therefore it is better to use 'the other' unused subtag.
The main change here is the use of 0xF subtag for maps instead of 0xB.
The rest of the differences are changes to and additions of comments.
One more comment from my part.
I noticed that the file contains the following two lines:
The comment of the second line is most certainly a copy and paste error
and should be appropriately fixed by the OTP developers. More importantly,
it would be great if that subtag (0x7) turned out to be unused and could
be used for maps instead of the 0xF one. This might turn out very handy
in the future. I can elaborate on this, if needed.
|
|
|
|
for the temporary conversion from float to big.
Preparation for coming bugfix of 'big_buf' array size.
|
|
|
|
* egil/enforce-tuple-specification-size/OTP-10633:
erts: Use memcpy instead of while in setelement/3
test: Refactor away ?line macro in tuple_SUITE
erts: Enforce tuple max size on BIFs
erts: Define max tuple size to 24 bits
|
|
|
|
|
|
Erlang specification 4.7.3 defines max tuple size to 65535 elements
It is now defined to 16777215 elements (24 bits)
|
|
Can still not setup -a, but cerl works.
|
|
Still does not run, just compiles.
|
|
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
|
|
|
|
|
|
In halfword emulator, make ETS use a variant of the internal term
format that uses relative offsets instead of absolute pointers. This
will allow storage in high memory (>4G). Preprocessor macros (like
list_val_rel(TERM,BASE)) are used to make normal (fullword) emulator
almost completely unchanged while still reusing most of the code.
|
|
|
|
|
|
Merging the three off-heap lists (binaries, funs and externals) into
one list. This reduces memory consumption by two words (pointers) per
ETS object.
|