Skip to content

Add support for atoms longer than 255 bytes (but less than 256 chars) #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

pguyot
Copy link
Collaborator

@pguyot pguyot commented Mar 16, 2025

Also optimize storage and computation of atoms here and there.
Also fix hash of atom table (last character wasn't hashed).

See #1536

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 w11/optimize-atoms branch 5 times, most recently from 2f3c4e9 to ec78e91 Compare March 18, 2025 07:13
Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round of comments here.

@pguyot pguyot force-pushed the w11/optimize-atoms branch 5 times, most recently from 833adb7 to 7eeab10 Compare March 23, 2025 07:41
@pguyot pguyot force-pushed the w11/optimize-atoms branch from 7eeab10 to f019778 Compare March 30, 2025 05:54
@pguyot
Copy link
Collaborator Author

pguyot commented Apr 15, 2025

CI is broken with 32 bits.

@pguyot pguyot force-pushed the w11/optimize-atoms branch 3 times, most recently from 314d282 to ef806cb Compare April 18, 2025 06:11
@pguyot
Copy link
Collaborator Author

pguyot commented Apr 18, 2025

CI is broken with 32 bits.

Last issue is fixed in #1634

@pguyot pguyot force-pushed the w11/optimize-atoms branch from ef806cb to 88abd1a Compare April 25, 2025 05:47
@pguyot pguyot force-pushed the w11/optimize-atoms branch from 88abd1a to 2f44f18 Compare May 9, 2025 04:02
@pguyot pguyot force-pushed the w11/optimize-atoms branch 4 times, most recently from 824fa1a to 0e5d7f0 Compare May 29, 2025 05:41
Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just few minor comments here, let's rebase it on latest main and we are good.

pguyot added 6 commits July 1, 2025 20:15
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
`atom_index_t` type represents a valid atom index.

Signature of functions that returned an atom index that could be an error
were modified consequently, introducing a type for the error results of
`atom_table_ensure_atoms` and `atom_table_ensure_atom` and removing
now redundant `globalcontext_insert_atom` in favor of `globalcontext_make_atom`
that returns a term.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Update signature of `atom_write_mfa` so it takes atom length and data separately
to prepare for longer atoms.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Change signature of `globalcontext_get_module` to get an `atom_index_t` to
refer to a given module.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Update atom_table API so it uses pointers to characters with a length, and
reduce further usage of AtomString which represent shorter atoms

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@pguyot pguyot force-pushed the w11/optimize-atoms branch from 0e5d7f0 to f260b37 Compare July 1, 2025 18:33
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