summaryrefslogtreecommitdiff
path: root/bootstrap/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update primary bootstrapBjörn Gustavsson2023-03-17246-0/+0
|
* Update primary bootstrapBjörn Gustavsson2023-02-1062-0/+0
|
* Update primary bootstrapRaimo Niskanen2023-02-084-0/+0
|
* Update primary bootstrapBjörn Gustavsson2023-02-0628-0/+0
|
* Update primary bootstrapBjörn Gustavsson2023-01-3155-0/+0
|
* Update erl_lint.beam in primary bootstrapBjörn Gustavsson2023-01-301-0/+0
|
* Update deprecationsBjörn Gustavsson2023-01-271-0/+0
|
* Merge branch 'maint'Björn Gustavsson2023-01-12151-7/+9
|\ | | | | | | | | * maint: Update primary bootstrap
| * Update primary bootstrapBjörn Gustavsson2023-01-1231-0/+0
| |
* | Update primary bootstrapBjörn Gustavsson2022-10-28133-0/+0
| |
* | Update primary bootstrapLukas Larsson2022-10-1428-0/+0
| |
* | Update primary bootstrapBjörn Gustavsson2022-10-061-0/+0
| |
* | Update primary bootstrapBjörn Gustavsson2022-09-167-0/+0
| |
* | Merge branch 'maint'Björn Gustavsson2022-09-02131-3/+4
|\ \ | |/ | | | | | | * maint: Update primary bootstrap
| * Update primary bootstrapBjörn Gustavsson2022-09-0226-7/+7
| |
* | Optimize binary matching for fixed-width segmentsBjörn Gustavsson2022-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this function: foo(<<A:6, B:6, C:6, D:6>>) -> {A, B, C, D}. The compiler in Erlang/OTP 25 and earlier would generate the following code for doing the binary matching: {test,bs_start_match3,{f,1},1,[{x,0}],{x,1}}. {bs_get_position,{x,1},{x,0},2}. {test,bs_get_integer2, {f,3}, 2, [{x,1}, {integer,6}, 1, {field_flags,[{anno,[4,{file,"t.erl"}]},unsigned,big]}], {x,2}}. {test,bs_get_integer2, {f,3}, 3, [{x,1}, {integer,6}, 1, {field_flags,[{anno,[4,{file,"t.erl"}]},unsigned,big]}], {x,3}}. {test,bs_get_integer2, {f,3}, 4, [{x,1}, {integer,6}, 1, {field_flags,[{anno,[4,{file,"t.erl"}]},unsigned,big]}], {x,4}}. {test,bs_get_integer2, {f,3}, 5, [{x,1}, {integer,6}, 1, {field_flags,[{anno,[4,{file,"t.erl"}]},unsigned,big]}], {x,5}}. {test,bs_test_tail2,{f,3},[{x,1},0]}. That is, there would be one instruction for each segment being matched. Having separate match instructions for each segment makes it difficult for the JIT to do any serious optimization. Currently, when matching a segment with a size that is not a multiple of 8, the JIT will generate code that calls a helper function. Common sizes such as 8, 16, and 32 are specially optimized with inline code in the x86 JIT and in the non-JIT BEAM VM. This commit introduces a new `bs_match` instruction for matching of integer and binary segments of fixed size. Here is the generated code for the example: {test,bs_start_match3,{f,1},1,[{x,0}],{x,1}}. {bs_get_position,{x,1},{x,0},2}. {bs_match,{f,3}, {x,1}, {commands,[{ensure_exactly,24}, {integer,2,{literal,[]},6,1,{x,2}}, {integer,3,{literal,[]},6,1,{x,3}}, {integer,4,{literal,[]},6,1,{x,4}}, {integer,5,{literal,[]},6,1,{x,5}}]}}. Having only one instruction for the matching allows the JIT to generate faster code. The generated code will do the following: * Test that the size of the binary being matched is exactly 24 bits. * Read 24 bits from the binary into a temporary CPU register. * For each segment, extract the integer from the temporary register by shifting and masking. Because of the before-mentioned optimization for certain common segment sizes, the main part of the Base64 encoding in the `base64` module is currently implemented in the following non-intuitive way: encode_binary(<<B1:8, B2:8, B3:8, Ls/bits>>, A) -> BB = (B1 bsl 16) bor (B2 bsl 8) bor B3, encode_binary(Ls, <<A/bits,(b64e(BB bsr 18)):8, (b64e((BB bsr 12) band 63)):8, (b64e((BB bsr 6) band 63)):8, (b64e(BB band 63)):8>>) With the new optimization, it is now possible to express the Base64 encoding in a more natural way, which is also faster than before: encode_binary(<<B1:6, B2:6, B3:6, B4:6, Ls/bits>>, A) -> encode_binary(Ls, <<A/bits, (b64e(B1)):8, (b64e(B2)):8, (b64e(B3)):8, (b64e(B4)):8>>)
* | Merge branch 'maint'Björn Gustavsson2022-06-2715-0/+0
|\ \ | |/ | | | | | | | | | | * maint: Update preloaded modules Update primary bootstrap [features] General tweaks and fixes
| * Update primary bootstrapCons T Åhs2022-06-2320-0/+0
| |
* | Update primary bootstrapBjörn Gustavsson2022-06-17241-21/+23
| |
* | Update primary bootstrapBjörn Gustavsson2022-06-1318-7/+7
| |
* | Update primary bootstrapJohn Högberg2022-06-03167-0/+0
| |
* | Merge branch 'maint'Rickard Green2022-05-311-0/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * maint: [kernel] Replace rpc usage with erpc usage in global_group [kernel] Introduce connect_all kernel parameter [kernel] global fixes [kernel] Monitor nodeup/nodedown directly from global [kernel] Fix global group configuration [erts,kernel] Connection ID information kernel: Fix test case monitor_nodess_down_up Guarantee nodedown before nodeup messages
| * Merge branch 'rickard/global-fixes/24.3.3/OTP-17934' into ↵Rickard Green2022-05-251-0/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rickard/global-fixes/25.0/OTP-17934 * rickard/global-fixes/24.3.3/OTP-17934: [kernel] Introduce connect_all kernel parameter [kernel] global fixes [kernel] Monitor nodeup/nodedown directly from global [kernel] Fix global group configuration [erts,kernel] Connection ID information kernel: Fix test case monitor_nodess_down_up Guarantee nodedown before nodeup messages
| | * Merge branch 'rickard/global-fixes/23.3.4/OTP-17934' into ↵Rickard Green2022-05-251-0/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rickard/global-fixes/24.3.3/OTP-17934 * rickard/global-fixes/23.3.4/OTP-17934: [kernel] Introduce connect_all kernel parameter [kernel] global fixes [kernel] Monitor nodeup/nodedown directly from global [kernel] Fix global group configuration [erts,kernel] Connection ID information kernel: Fix test case monitor_nodess_down_up Guarantee nodedown before nodeup messages
| | | * Merge branch 'rickard/global-fixes/22.3.4/OTP-17934' into ↵Rickard Green2022-05-251-0/+0
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rickard/global-fixes/23.3.4/OTP-17934 * rickard/global-fixes/22.3.4/OTP-17934: [kernel] Introduce connect_all kernel parameter [kernel] global fixes [kernel] Monitor nodeup/nodedown directly from global [kernel] Fix global group configuration [erts,kernel] Connection ID information kernel: Fix test case monitor_nodess_down_up Guarantee nodedown before nodeup messages
| | | | * [erts,kernel] Connection ID informationRickard Green2022-05-031-0/+0
| | | | |
* | | | | Improve the type analysisBjörn Gustavsson2022-05-261-30/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the type analysis modules in the Erlang compiler to be able to derive type information from relational operators in guards. Consider this function: f(A) when is_integer(A), 0 =< A, A =< 1000 -> A + 1. From the guard, a human can easily figure out that `A` must be an integer in the range 0 through 1000. The compiler in OTP 25 cannot: {test,is_integer,{f,1},[{x,0}]}. {test,is_ge,{f,1},[{tr,{x,0},{t_integer,any}},{integer,0}]}. {test,is_ge,{f,1},[{integer,1000},{tr,{x,0},{t_integer,any}}]}. {gc_bif,'+',{f,0},1,[{tr,{x,0},{t_integer,any}},{integer,1}],{x,0}}. With this commit, the compiler generates the following code: {test,is_integer,{f,1},[{x,0}]}. {test,is_ge,{f,1},[{tr,{x,0},{t_integer,any}},{integer,0}]}. {test,is_ge,{f,1},[{integer,1000},{tr,{x,0},{t_integer,{0,'+inf'}}}]}. {gc_bif,'+',{f,0},1,[{tr,{x,0},{t_integer,{0,1000}}},{integer,1}],{x,0}}. The compiler can now also derive better types for the following function: g(A) when 0 =< A, A =< 1000 -> A + 1. Since `A` is sandwiched between two numbers, `A` must be a number: {test,is_ge,{f,3},[{x,0},{integer,0}]}. {test,is_ge, {f,3}, [{integer,1000}, {tr,{x,0}, {t_union,{t_atom,any}, {t_list,any,any}, {t_number,{0,'+inf'}}, {t_tuple,0,false,#{}}, other}}]}. {gc_bif,'+',{f,0},1,[{tr,{x,0},{t_number,{0,1000}}},{integer,1}],{x,0}}. The JIT will generate slightly better code for known numeric operands than for unknown operands. As part of this commit, the following major changes were made: * Ranges for integers can now extend to infinity at one endpoint. That is, a range can go from negative infinity to some integer, or from some integer to positive infinity. That change allows the compiler to represent the type for the variable `A` when `A` is known to be an integer and `A >= 0` is true. * Changed the number type to also include a (potentially infinite) range. * Introduced an `other` type as a mean to construct a union type that is equivalent to the `any` type. That makes it possible to represent the type for `A` when all we know is that `A >= 0` (see the type in in the second `is_ge` test in the generated code for `g/1` above). * The API for the `beam_bounds` module was changed to avoid having to create functions with the same name as operators and BIFs. Having functions named `min` and `max` in the module would have been error-prone and painful.
* | | | Update primary bootstrapHenrik Nord2022-05-102-0/+0
| | | |
* | | | Update primary bootstrapCons T Åhs2022-05-0311-0/+0
| | | |
* | | | Update primary bootstrapBjörn Gustavsson2022-04-23240-5/+3
| | | |
* | | | Update primary bootstrapBjörn Gustavsson2022-04-0538-2/+3
| | | |
* | | | Update deprecationsBjörn Gustavsson2022-03-281-0/+0
| | | |
* | | | Update primary bootstrapCons T Åhs2022-03-228-4/+8
| | | |
* | | | Update primary bootstrapCons T Åhs2022-03-2116-3/+4
| | | |
* | | | Update primary bootstrapBjörn Gustavsson2022-03-15104-91/+139
| | | |
* | | | Update deprecationsJohn Högberg2022-02-211-0/+0
| | | |
* | | | Update primary bootstrapBjörn Gustavsson2022-02-1321-2/+3
| | | |
* | | | Merge pull request #5700 from u3s/kuba/stdlib/uri_string_quote/OTP-17778Jakub Witczak2022-02-111-0/+0
|\ \ \ \ | | | | | | | | | | | | | | | stdlib: add quote, unquote functions in uri_string OTP-17778
| * | | | Update deprecationsJakub Witczak2022-02-111-0/+0
| | | | |
* | | | | Merge branch ↵Rickard Green2022-02-112-0/+0
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'rickard/prevent-overlapping-partitions/master/ERIERL-732/OTP-17843' * rickard/prevent-overlapping-partitions/master/ERIERL-732/OTP-17843: global: Preventing overlapping partitions fix global: Propagate and save version between all nodes
| * | | | Merge branch ↵Rickard Green2022-02-062-0/+0
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'rickard/prevent-overlapping-partitions/24.2/ERIERL-732/OTP-17843' into rickard/prevent-overlapping-partitions/master/ERIERL-732/OTP-17843 * rickard/prevent-overlapping-partitions/24.2/ERIERL-732/OTP-17843: global: Preventing overlapping partitions fix global: Propagate and save version between all nodes
| | * | | Merge branch ↵Rickard Green2022-02-062-0/+0
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'rickard/prevent-overlapping-partitions/23.3.4/ERIERL-732/OTP-17843' into rickard/prevent-overlapping-partitions/24.2/ERIERL-732/OTP-17843 * rickard/prevent-overlapping-partitions/23.3.4/ERIERL-732/OTP-17843: global: Preventing overlapping partitions fix global: Propagate and save version between all nodes
| | | * | Merge branch ↵Rickard Green2022-02-062-0/+0
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'rickard/prevent-overlapping-partitions/22.3.4/ERIERL-732/OTP-17843' into rickard/prevent-overlapping-partitions/23.3.4/ERIERL-732/OTP-17843 * rickard/prevent-overlapping-partitions/22.3.4/ERIERL-732/OTP-17843: global: Preventing overlapping partitions fix global: Propagate and save version between all nodes kernel: Fix a race condition in Global
| | | | * global: Preventing overlapping partitions fixRickard Green2022-02-062-0/+0
| | | | |
| | * | | Update primary bootstrapRickard Green2021-12-1323-3/+3
| | | | |
* | | | | Update deprecationsHans Nilsson2022-02-111-0/+0
| | | | |
* | | | | Update primary bootstrapBjörn Gustavsson2022-02-11108-0/+0
| | | | |
* | | | | Update deprecationsJakub Witczak2022-02-081-0/+0
|/ / / /
* | | | Update primary bootstrapBjörn Gustavsson2022-02-02241-10/+9
| | | |
* | | | Update deprecationsHans Nilsson2022-01-191-0/+0
| | | |