Skip to content

fix(semantic): resolve escape sequences in private name comparison#182

Merged
ohah merged 2 commits intomainfrom
feature/private-name-escape-semantics
Mar 20, 2026
Merged

fix(semantic): resolve escape sequences in private name comparison#182
ohah merged 2 commits intomainfrom
feature/private-name-escape-semantics

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Mar 20, 2026

Summary

  • private name의 StringValue 비교 시 unicode escape 해석
  • #\u{6F}#o를 동일한 private name으로 인식
  • resolvePrivateName() 메서드 추가 (analyzer.zig)

Test plan

  • zig build test 통과
  • zig fmt --check src/ 통과
  • Test262 private name semantics ~24건 통과 확인

🤖 Generated with Claude Code

ECMAScript specifies that private names should be compared by their
StringValue (after resolving escape sequences), not by raw source text.
For example, #\u{6F} and #o are the same private name.

Added resolvePrivateName() that decodes unicode escape sequences (\uXXXX
and \u{XXXX} forms) before comparison in collectPrivateNames and
usePrivateName paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah added the enhancement New feature or request label Mar 20, 2026
@ohah ohah self-assigned this Mar 20, 2026
@ohah ohah added the enhancement New feature or request label Mar 20, 2026
- ArrayList.dupe → toOwnedSlice로 이중 할당 제거
- OOM 시 silent fallback → @Panic (프로젝트 컨벤션)
- codepoint > 0x10FFFF 범위 검증 추가
- u21 intCast 안전성 확보

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah merged commit 7afcd39 into main Mar 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant