aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_term.h
AgeCommit message (Collapse)Author
2017-05-04Update copyright yearRaimo Niskanen
2017-03-28erts: Fix faulty assert for refs in copy sharingBjörn-Egil Dahlberg
2017-02-06Implement magic referencesRickard Green
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.
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-07erts: Support 32-bit creation for external pid,port,refsSverker Eriksson
from future nodes.
2016-03-29erts: inline tag_val_defLukas Larsson
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%.
2016-03-15update copyright-yearHenrik Nord
2015-11-12Merge branch 'rickard/ohmq/OTP-13047'Rickard Green
* 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
2015-11-12Introduce literal tagRickard Green
2015-09-07Merge branch 'maint'Sverker Eriksson
2015-09-02Merge branch 'maint' into sverk/trace-process_dump-matchstateSverker Eriksson
Conflicts: erts/emulator/beam/erl_printf_term.c erts/emulator/beam/erl_term.c erts/emulator/beam/utils.c
2015-09-01erts: Fix bug when tracing with 'process_dump'Sverker Eriksson
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.
2015-07-03Allow X and Y registers to be overloaded with any literalBjörn Gustavsson
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.
2015-07-03Eliminate R_REG_DEFBjörn Gustavsson
2015-07-01erts: Remove halfword !HEAP_ON_C_STACKBjörn-Egil Dahlberg
2015-06-24erts: Remove halfword CHECK_POINTER_MASKBjörn-Egil Dahlberg
2015-06-24erts: Remove halfword is_same bases macroBjörn-Egil Dahlberg
Keep is_same macro for readability but remove base pointers.
2015-06-24erts: Remove halfword pointer compressionBjörn-Egil Dahlberg
* Removed COMPRESS_POINTER and EXPAND_POINTER
2015-06-24erts: Remove halfword basic relative heap operationsBjörn-Egil Dahlberg
2015-06-24erts: Remove HALFWORD_HEAP definitionBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-18erts: Fix warning about const pointer to make_boxed and make_listSverker Eriksson
2015-04-13erl_term.h: Add is_not_map() macroBjörn Gustavsson
For consistency with other data types, add the is_not_map() macro.
2015-04-10erts: Remove code that was commented outBjörn-Egil Dahlberg
2015-03-25erts: Combine flat and hash maps under one unifying tagBjörn-Egil Dahlberg
2015-03-12erts: Reintroduce is_map macroSverker Eriksson
as shorthand for is_flatmap || is_hashmap
2015-03-12erts: Fix various map vs hamt size bugsSverker Eriksson
2015-03-12erts: Fix compare order of hamt vs other typesSverker Eriksson
MAP_DEF and HASHMAP_DEF must have adjacent values
2015-03-12erts: Move erlang:is_hashmap/1 to mapsBjörn-Egil Dahlberg
2015-03-12erts: Refactor erl_hashmap header includesBjörn-Egil Dahlberg
2015-03-12erts: Fix bug in _make_header macroSverker Eriksson
Called with a signed int 'sz' argument on 64 bit would cause sign extension 'sz' was larger than 33554431.
2015-03-12Initial Persistent HAMT - Map frameworkBjörn-Egil Dahlberg
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
2014-03-27erts: Adjust is_external_header() for new map tagSverker Eriksson
to not mistake a map for an external term (pid, port or ref).
2014-03-26Change the subtag used for maps from 0xB to 0xFKostis Sagonas
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.
2014-01-28erts: Initial Map instructions, type and structureBjörn-Egil Dahlberg
2014-01-22erts: Refactor big-float compare on HALFWORD to use C-stackSverker Eriksson
for the temporary conversion from float to big. Preparation for coming bugfix of 'big_buf' array size.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2012-12-12Merge branch 'egil/enforce-tuple-specification-size/OTP-10633'Björn-Egil Dahlberg
* 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
2012-12-03Improve configuration of process and port tablesRickard Green
2012-12-03Remove R9 compatibility featuresRickard Green
2012-11-27erts: Define max tuple size to 24 bitsBjörn-Egil Dahlberg
Erlang specification 4.7.3 defines max tuple size to 65535 elements It is now defined to 16777215 elements (24 bits)
2011-12-02Get cerl and distribution working in Win64Patrik Nyblom
Can still not setup -a, but cerl works.
2011-12-02Build Win64 Erlang emulator using MSYSunknown
Still does not run, just compiles.
2011-10-26erts-hipe: Change THE_NON_VALUE for HiPE enabled debug emulatorSverker Eriksson
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
2011-02-03HALFWORD Make more allocators use high mem (binary, fixed and driver)Sverker Eriksson
2011-02-03HALFWORD ETS 32-bit arch fixes and other cleanupsSverker Eriksson
2011-02-03HALFWORD ETS relative termsSverker Eriksson
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.
2010-12-15Remove stray semicolons in erl_term.hRickard Green
2010-07-22Mending halfword heap emulatorSverker Eriksson
2010-07-20One off-heap list, to eliminate two words per ETS object.Sverker Eriksson
Merging the three off-heap lists (binaries, funs and externals) into one list. This reduces memory consumption by two words (pointers) per ETS object.