Skip to content

fix: preserve String trim alias identity - #23

Draft
ShiroKSH wants to merge 1 commit into
alii:masterfrom
ShiroKSH:fix/string-trim-alias-identity
Draft

fix: preserve String trim alias identity#23
ShiroKSH wants to merge 1 commit into
alii:masterfrom
ShiroKSH:fix/string-trim-alias-identity

Conversation

@ShiroKSH

Copy link
Copy Markdown

Summary

  • make trimLeft share the exact function object used by trimStart
  • make trimRight share the exact function object used by trimEnd
  • add regression coverage for alias identity and canonical function names

Root cause

alloc_methods allocated a new native function for every property entry. Reusing the same native dispatch variant therefore did not preserve function-object identity, and the aliases exposed trimLeft and trimRight as their function names.

The canonical trim functions are now allocated once. Each alias installs the same function reference in a restamped property descriptor, preserving independent property ordering metadata.

Validation

  • gleam check
  • gleam test: 1561 passed, 0 failed
  • filtered test262 trim suite: 8 execution passes, 0 execution failures
  • gleam format --check for the changed files
  • git diff --check

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

@ShiroKSH is attempting to deploy a commit to the alistair Team on Vercel.

A member of the Team first needs to authorize it.

@ShiroKSH
ShiroKSH marked this pull request as ready for review July 10, 2026 20:39
@ShiroKSH

Copy link
Copy Markdown
Author

@alii - Vercel is blocked on team authorization for this fork. Could you authorize the deployment or let me know if the PR can be reviewed without a preview? I can make any requested changes. Thanks!

@ShiroKSH

ShiroKSH commented Aug 8, 2026

Copy link
Copy Markdown
Author

Hi maintainers, this PR has been open for over two weeks. When you have a moment, I would appreciate a review. Thank you.

@ShiroKSH
ShiroKSH force-pushed the fix/string-trim-alias-identity branch from c3efd49 to 8ceec34 Compare August 12, 2026 10:24
@alii

alii commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Hello! Thank you for the contribution. Arc is currently a very early research project. It's not clear to me yet the direction that Arc should even head in at the moment. For this reason I am hesitant to accept contributions while I figure out the design of Arc.

What is the motivation for this change? Are you using Arc in production anywhere? It would be helpful to know how you are using Arc!

Thank you!

@alii
alii marked this pull request as draft August 15, 2026 04:45
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