Skip to content

Try Removing added atomize calls. I am admittedly hazy on why i adde…#443

Open
prozacchiwawa wants to merge 1 commit into20260122-start-resolvefrom
20260415-remove-atomize
Open

Try Removing added atomize calls. I am admittedly hazy on why i adde…#443
prozacchiwawa wants to merge 1 commit into20260122-start-resolvefrom
20260415-remove-atomize

Conversation

@prozacchiwawa
Copy link
Copy Markdown
Contributor

@prozacchiwawa prozacchiwawa commented Apr 15, 2026

…d these (probably defensiveness).


Note

Medium Risk
Changes helper-form parsing to require SExp::Atom in positions 0 and 1 (no implicit atomize()), which could reject previously accepted round-tripped/non-strict inputs and surface new compile errors.

Overview
Removes the defensive atomize() calls in match_op_name_4 when matching helper forms, so the frontend now matches helper keywords and names only when pl[0]/pl[1] are already SExp::Atom.

This tightens parsing behavior for helper definitions (e.g., defun, defconst, defmacro, namespace, import) and may change how non-atom encodings in those positions are handled.

Reviewed by Cursor Bugbot for commit 4d9fbad. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4d9fbad. Configure here.

Comment thread src/compiler/frontend.rs
// clvm, which happens when modern tools such as use check are used on classic programs.
// The modern frontend requires atom representation in positions 0 and 1 of helpers anyway.
match &pl[0].atomize() {
match &pl[0] {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removing atomize breaks traditional CLVM round-trip compatibility

High Severity

Removing the .atomize() calls means SExp::Integer and SExp::QuotedString values will no longer be converted to SExp::Atom before matching. The match arms only accept SExp::Atom, so when pl[0] or pl[1] arrive as Integer or QuotedString (which the preserved comment on lines 654–657 explicitly says happens during traditional CLVM round-tripping), the function will return None instead of a valid OpName4Match, silently failing to parse helper forms like defun, defmacro, etc.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4d9fbad. Configure here.

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.

1 participant