Skip to content

add bitwise not, unsigned right shift, and exponentiation operators#235

Merged
cs01 merged 1 commit intomainfrom
unskip-passing-tests
Mar 11, 2026
Merged

add bitwise not, unsigned right shift, and exponentiation operators#235
cs01 merged 1 commit intomainfrom
unskip-passing-tests

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 11, 2026

Summary

  • Implement ~ (bitwise NOT) unary operator — ~0 now correctly returns -1
  • Implement >>> (unsigned/logical right shift) binary operator — 255 >>> 4 returns 15
  • Implement ** (exponentiation) binary operator — 2 ** 3 returns 8, uses llvm.pow.f64
  • Add ** to both TS and native parsers
  • Unskip bitwise/basic-bitwise.ts test (all bitwise ops now work)
  • Add arithmetic/exponentiation.ts test fixture

Test plan

  • npm run verify:quick passes
  • Both JS and native compilers pass all new tests
  • Self-hosting Stage 1 passes

@cs01 cs01 merged commit 55a8c7b into main Mar 11, 2026
12 checks passed
@cs01 cs01 deleted the unskip-passing-tests branch March 12, 2026 05:05
cs01 added a commit that referenced this pull request Mar 12, 2026
cs01 added a commit that referenced this pull request Mar 12, 2026
…al value (#235) (#289)

Co-authored-by: cs01 <cs01@users.noreply.github.com>
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