Spec alignment create method property#5013
Merged
jedel1043 merged 8 commits intoboa-dev:mainfrom Mar 12, 2026
Merged
Conversation
added 3 commits
March 12, 2026 11:11
Implemented entries, keys, values, @@iterator, and toString wrapper methods on JsTypedArray and its subclasses. Added unit tests for verification. Resolves boa-dev#3252
…rigin fix/js-typed-array-missing-methods
Test262 conformance changes
Tested main commit: |
jedel1043
requested changes
Mar 12, 2026
This Pull Request fixes/closes boa-dev#4981. It changes the following: * Make `JsNativeError::kind` a private field instead of `pub`. * Add a `JsNativeError::kind(&self) -> &JsNativeErrorKind` accessor as the stable API. * Update internal usages (engine tests, runtime tests, URI tests, tester helpers, docs/examples) to call `kind()` instead of reading the field directly. Testing: * `cargo test -p boa_engine`
This Pull Request fixes/closes [boa-dev#4986](boa-dev#4986) It changes the following: - Trace a new call frame whenever a new frame is pushed onto the stack. - Ensure each code block’s compiled output is printed only once.
… it in VM opcodes Address PR review feedback: - Rename create_method_property to define_method_property per ECMAScript 2026 spec (10.2.8) - Update return type to JsResult<()> since the spec returns 'unused' - Use define_method_property in DefineClassMethodByName, DefineClassStaticMethodByName, and DefineClassMethodByValue VM opcodes instead of manual PropertyDescriptor construction - Remove unrelated TypedArray wrapper methods (entries, keys, values, iterator, to_string) and associated tests from jstypedarray.rs - Revert pub(crate) visibility changes in builtin.rs - Move CopyDataProperties from jsobject.rs to operations.rs
b59b0f5 to
5ea7a2b
Compare
Contributor
Author
|
@jedel1043 I have done the changes ,please review it once and do lemme know ,thanks |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5013 +/- ##
===========================================
+ Coverage 47.24% 58.47% +11.22%
===========================================
Files 476 559 +83
Lines 46892 61450 +14558
===========================================
+ Hits 22154 35930 +13776
- Misses 24738 25520 +782 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aligns Boa more closely with the ECMAScript specification by implementing missing abstract operations and centralizing them in operations.rs.
1. Implement
CreateMethodProperty(§7.3.5)Added the create_method_property helper to core/engine/src/object/operations.rs.
Before:
After:
2. Move CopyDataProperties (§7.3.26)
Moved the implementation from jsobject.rs to operations.rs to center abstract operations as suggested by internal
todocomments.Before:
// todo: CopyDataProperties.After:
Tests
cargo check -p boa_engine.cargo fmt.