summaryrefslogtreecommitdiff
path: root/lib/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Prepare releaseErlang/OTP2023-05-153-2/+119
|
* Update copyright yearErlang/OTP2023-05-153-3/+3
|
* Merge pull request #7207 from frej/frej/private-append-fixBjörn Gustavsson2023-05-054-4/+65
|\ | | | | Fix bug in private-append transform
| * compiler: Avoid invalid code for bs_create_bin with initial literalFrej Drejhammar2023-05-042-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change stops the compiler from generating invalid code when bs_create_bin is given a literal <<>> as its first fragment. As the type analyzer considers a literal <<>> an appendable bitstring, code sequences such as: _6 = bs_create_bin `append`, `[8,{segment,1}]`, `<<>>`, `all` ... _14 = bs_create_bin `append`, `[8,{segment,1}]`, _6, `all` would be rewritten to: _6 = bs_create_bin `private_append`, `[8,{segment,1}]`, `<<>>`, `all` ... _14 = bs_create_bin `private_append`, `[8,{segment,1}]`, _6, `all` which is not legal, as private_append on a literal will crash the runtime system. By inserting a bs_init_writable in front of bs_create_bin instructions with a literal <<>> as the first fragment, and then using the freshly created writable binary instead of the literal, the code sequence becomes valid: _1 = bs_init_writable `256` _6 = bs_create_bin `private_append`, `[8,{segment,1}]`, _1, `all` ... _14 = bs_create_bin `private_append`, `[8,{segment,1}]`, _6, `all`
| * compiler: Fix bug in SSA-checkerFrej Drejhammar2023-05-042-3/+18
| | | | | | | | | | Fix a bug in the SSA-checker where it trashes the environment after matching a literal bitstring.
* | Merge branch 'maint' into masterSverker Eriksson2023-05-052-1/+16
|\ \ | | | | | | | | | | | | | | | | | | * maint: Updated OTP version Prepare release Update copyright year
| * | Prepare releaseErlang/OTP2023-05-042-1/+16
| | |
| * | Update copyright yearErlang/OTP2023-05-043-3/+3
| | |
| * | Merge branch 'bjorn/compiler/beam_validator/25/GH-7147/OTP-18565' into maint-25Erlang/OTP2023-05-044-9/+110
| |\ \ | | | | | | | | | | | | | | | | * bjorn/compiler/beam_validator/25/GH-7147/OTP-18565: Fix two type-related bugs
| | * | Fix two type-related bugsBjörn Gustavsson2023-05-024-9/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #7147 uncovered two bugs in the compiler. The first one is in the swapping of operands for commutative operands, that the compiler does to simplify for the JIT. When the operands were swapped, types for the operands in the annotation were not updated. The second one is in `beam_validator`, which assumed that if the binary construction `<<F/float>>` succeeded, then `F` must be a float. That is not correct, because `F` could also be an integer. Closes #7147
* | | | Merge pull request #7200 from bjorng/bjorn/compiler/fix-beam_types-crash/GH-7198Björn Gustavsson2023-05-042-14/+17
|\ \ \ \ | | | | | | | | | | Eliminate crash in beam_types
| * | | | Eliminate crash in beam_typesBjörn Gustavsson2023-05-032-14/+17
| | |_|/ | |/| | | | | | | | | | Closes #7198
* | | | Eliminate crash in beam_ssa_typeBjörn Gustavsson2023-05-032-15/+34
|/ / / | | | | | | | | | Closes #7197
* | | Merge pull request #7188 from bjorng/bjorn/compiler/fix-beam_jump/GH-7180Björn Gustavsson2023-05-022-0/+9
|\ \ \ | | | | | | | | Eliminate unsafe sharing optimization in beam_jump
| * | | Eliminate unsafe sharing optimization in beam_jumpBjörn Gustavsson2023-04-282-0/+9
| | | | | | | | | | | | | | | | Closes #7180
* | | | Merge pull request #7186 from bjorng/bjorn/compiler/fix-is_function-type/GH-7179Björn Gustavsson2023-05-022-7/+31
|\ \ \ \ | | | | | | | | | | Eliminate crash in beam_ssa_type
| * | | | Eliminate crash in beam_ssa_typeBjörn Gustavsson2023-04-282-7/+31
| |/ / / | | | | | | | | | | | | Closes #7179
* | | | Eliminate internal error in beam_types:float_from_range/1Björn Gustavsson2023-04-282-4/+52
|/ / / | | | | | | | | | Closes #7178
* | | Merge branch 'maint' into masterJakub Witczak2023-04-272-1/+23
|\ \ \ | |/ / | | | | | | | | | | | | | | | * maint: Updated OTP version Prepare release Update copyright year
| * | Prepare releaseErlang/OTP2023-04-252-1/+23
| | |
| * | Update copyright yearErlang/OTP2023-04-255-5/+5
| | |
| * | Merge branch 'john/erts/fix-hd-tl-loader-transformations/GH-7024/OTP-18519' ↵Erlang/OTP2023-04-251-2/+26
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | into maint-25 * john/erts/fix-hd-tl-loader-transformations/GH-7024/OTP-18519: jit: Fix hd/1 and tl/1 BIF specialization
| * \ \ Merge branch 'john/compiler/fix-inert-update-type/GH-6969/OTP-18516' into ↵Erlang/OTP2023-04-252-2/+19
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | maint-25 * john/compiler/fix-inert-update-type/GH-6969/OTP-18516: beam_validator: Skip unnecessary type updates
| * \ \ \ Merge branch 'bjorn/compiler/fix-lost-map-exception/GH-6960/OTP-18497' into ↵Erlang/OTP2023-04-252-17/+31
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | maint-25 * bjorn/compiler/fix-lost-map-exception/GH-6960/OTP-18497: Fix lost exception from map update
* | | | | Merge pull request #7172 from bjorng/bjorn/compiler/fix-min-max-bool/GH-7170Björn Gustavsson2023-04-272-3/+46
|\ \ \ \ \ | | | | | | | | | | | | Eliminate compiler crash in beam_ssa_codegen
| * | | | | Eliminate compiler crash in beam_ssa_codegenBjörn Gustavsson2023-04-262-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | Closes #7170
* | | | | | Merge pull request #7173 from ↵John Högberg2023-04-272-3/+30
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | jhogberg/john/compiler/improve-validator-range-inference/GH-7171 beam_validator: Improve arithmetic range inference
| * | | | | | beam_validator: Improve arithmetic range inferenceJohn Högberg2023-04-262-3/+30
| |/ / / / / | | | | | | | | | | | | | | | | | | Fixes #7171
* | | | | | Merge pull request #7163 from ↵Björn Gustavsson2023-04-264-5/+108
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | bjorng/bjorn/compiler/beam_validator/26/GH-7147/OTP-18565 Fix two type-related bugs
| * | | | | | Fix two type-related bugsBjörn Gustavsson2023-04-254-5/+108
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #7147 uncovered two bugs in the compiler. The first one is in the swapping of operands for commutative operands, which the compiler does to simplify for the JIT. When the operands were swapped, types for the operands in the annotation were not updated. The second one is in `beam_validator`, which assumed that if the binary construction `<<F/float>>` succeeded, then `F` must be a float. That is not correct, because `F` could also be an integer. Closes #7147
* | | | | | Merge pull request #7143 from ↵John Högberg2023-04-262-2/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | jhogberg/john/compiler/fix-private-append-issue/GH-7142 beam_ssa_private_append: Fix crash on oddly structured code
| * | | | | | beam_ssa_private_append: Fix crash on oddly structured codeJohn Högberg2023-04-212-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private append pass didn't expect to append anything to literals other than `<<>>`. Rare interactions with the type or bool passes could sneak in things like atoms in unexpected places, crashing the pass.
* | | | | | | beam_bounds: Make 'bnot' converge fasterJohn Högberg2023-04-242-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #7145
* | | | | | | beam_validator: Improve error reporting for bad typed registersJohn Högberg2023-04-241-1/+7
| |/ / / / / |/| | | | |
* | | | | | Merge pull request #7139 from ↵Kiko Fernandez-Reyes2023-04-211-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kikofernandez/kiko/dbg/deprecate-stop_clear-function/GH-6903/OTP-18478 Deprecate `stop_clear` function OTP-18478
| * | | | | | dbg: deprecates function dbg:stop_clear/1Kiko Fernandez-Reyes2023-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function `dbg:stop_clear/1` is not documented in the API but was kept for compatibility reasons. in this commit we make a step forward to deprecating its use such that it will be eventually removed. closes GH-6903.
* | | | | | | Merge pull request #7135 from bjorng/bjorn/compiler/fix-make-clean/GH-7134Björn Gustavsson2023-04-191-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fix broken `make clean && make`
| * | | | | | Fix broken `make clean && make`Björn Gustavsson2023-04-191-1/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4006e3719403d1 broke `make clean && make`. Closes #7134
* | | | | | Fix failure to load module with disabled optimizationsBjörn Gustavsson2023-04-182-1/+16
|/ / / / / | | | | | | | | | | | | | | | Closes #7128
* | | | | beam_ssa_alias: Fix alias analysis for funsJohn Högberg2023-04-142-13/+22
| | | | | | | | | | | | | | | | | | | | Fixes #7121
* | | | | Merge pull request #7099 from frej/frej/fix-make-warningBjörn Gustavsson2023-04-141-0/+1
|\ \ \ \ \ | | | | | | | | | | | | Eliminate make warning about ignored old recipe
| * | | | | Eliminate make warning about ignored old recipeFrej Drejhammar2023-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The makefiles for lib/compiler/ and lib/stdlib/ both include $(ERL_TOP)/make/app_targets.mk and defines their own `test` target. As this leads to warnings about: Makefile:48: warning: overriding recipe for target 'test' $ERL_TOP/make/app_targets.mk:26:warning: ignoring old recipe for target 'test' which are annoying as even a clean build produces warnings, this patch conditionally avoids defining the default target in app_targets.mk when included from lib/compiler/Makefile and lib/stdlib/Makefile.
* | | | | | Merge pull request #7101 from frej/frej/ignore-generated-fileBjörn Gustavsson2023-04-131-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | compiler: Ignore generated file
| * | | | | | compiler: Ignore generated fileFrej Drejhammar2023-04-111-0/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | Commit 4006e3719403d15438e87f5a1bbcbed94a675e18 solved a make race condition by using a flag file which wasn't added to .gitignore.
* | | | | | Revert "Prepare release"Henrik Nord2023-04-123-87/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4e4511b19f4126d9271a6e3a8fa2eb716da7e85.
* | | | | | Prepare releaseErlang/OTP2023-04-113-2/+87
| | | | | |
* | | | | | Update copyright yearErlang/OTP2023-04-112-2/+2
|/ / / / /
* | | | | Fix race conditionBjörn Gustavsson2023-04-041-3/+5
| | | | |
* | | | | beam_disasm: Deserialize the version 1 type table formatMichael Davis2023-04-032-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OTP 26 introduced a new version 2 type table format. This change deserializes the OTP 25 version 1 type table format as well within 'beam_disasm'. This fixes crashes when running 'beam_disasm:file/1' on BEAM file created by the OTP 25 compiler. Co-authored-by: John Högberg <john@erlang.org>
* | | | | Merge branch 'maint'John Högberg2023-03-221-2/+26
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint: jit: Fix hd/1 and tl/1 BIF specialization