Skip to content

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Oct 25, 2025

Add a new term_reuse_binary to reuse a refc binary, taking advantage
of private_append compiler optimization.

Add handling of out of memory errors in term_alloc_refc_binary by raising
out of memory error instead of aborting.

Replaced uses of term_create_empty_binary with
term_create_uninitialized_binary since we don't need to set the binary
content to zeroes.

Update and_/3 signature in JIT backends to handle and with a new register,
and performed few optimizations accordingly by removing unnecessary copy.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot pguyot force-pushed the w43/private-append branch from 101c8da to 47b4330 Compare October 25, 2025 16:05
@pguyot pguyot changed the title Implement private_append Implement support for private_append Oct 25, 2025
@pguyot pguyot marked this pull request as ready for review October 25, 2025 16:06
@pguyot pguyot force-pushed the w43/private-append branch from 47b4330 to eeb4f7b Compare October 25, 2025 20:43
@pguyot pguyot marked this pull request as draft October 26, 2025 05:10
@pguyot pguyot force-pushed the w43/private-append branch 2 times, most recently from 3be1eae to 6b06240 Compare October 26, 2025 13:09
Add a new `term_reuse_binary` to reuse a refc binary, taking advantage
of private_append compiler optimization.

Add handling of out of memory errors in term_alloc_refc_binary by raising
out of memory error instead of aborting.

Update `and_/3` signature in JIT backends to handle and with a new register,
and performed few optimizations accordingly by removing unnecessary copy.

Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot force-pushed the w43/private-append branch from 6b06240 to 322301b Compare October 27, 2025 22:47
@pguyot pguyot marked this pull request as ready for review October 27, 2025 22:53
@bettio bettio merged commit 0f80cf6 into atomvm:main Oct 28, 2025
215 of 217 checks passed
@pguyot pguyot deleted the w43/private-append branch October 28, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants