Skip to content

refactor: TypedArray uses usize instead of u64 for internal properties#5263

Open
zhuzhu81998 wants to merge 4 commits intoboa-dev:mainfrom
zhuzhu81998:zhuzhu/TypedArray-use-usize-internally
Open

refactor: TypedArray uses usize instead of u64 for internal properties#5263
zhuzhu81998 wants to merge 4 commits intoboa-dev:mainfrom
zhuzhu81998:zhuzhu/TypedArray-use-usize-internally

Conversation

@zhuzhu81998
Copy link
Contributor

@zhuzhu81998 zhuzhu81998 commented Mar 26, 2026

Part of #4766 .
2nd atttempt after #4787 .
Compared to the previous attempt, this PR limits the scope of change to TypedArray only (as opposed to touching Array as well like in #4787 ).

We also keep the spec-defined checks (for which u64 is used).

TypedArray test262 tests pass on 32-bit (well 4 failed ones actually but main also fails 4 so).

If this approach is perceived as good/reasonable, i will do this for DataView too.

@zhuzhu81998 zhuzhu81998 requested a review from a team as a code owner March 26, 2026 16:27
@github-actions github-actions bot added C-Builtins PRs and Issues related to builtins/intrinsics Waiting On Review Waiting on reviews from the maintainers labels Mar 26, 2026
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 26, 2026
@zhuzhu81998 zhuzhu81998 changed the title refactor: TypedArray uses usize refactor: TypedArray uses usize instead of u64 for internal properties Mar 26, 2026
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,732 50,732 0
Ignored 1,426 1,426 0
Failed 805 805 0
Panics 0 0 0
Conformance 95.79% 95.79% 0.00%

Tested main commit: 2437b6704c4315f6ec8f0766bf229fba23e0e61e
Tested PR commit: 7361b3262430121a3416cfff0034f68771082c21
Compare commits: 2437b67...7361b32

@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 62.76596% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.74%. Comparing base (6ddc2b4) to head (7361b32).
⚠️ Report is 919 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/builtins/typed_array/builtin.rs 59.42% 28 Missing ⚠️
core/engine/src/builtins/typed_array/object.rs 70.00% 3 Missing ⚠️
core/engine/src/value/display/typed_array.rs 0.00% 3 Missing ⚠️
core/engine/src/builtins/typed_array/mod.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5263       +/-   ##
===========================================
+ Coverage   47.24%   59.74%   +12.50%     
===========================================
  Files         476      589      +113     
  Lines       46892    63422    +16530     
===========================================
+ Hits        22154    37893    +15739     
- Misses      24738    25529      +791     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Builtins PRs and Issues related to builtins/intrinsics Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant