CrazyboyQCD
ddc8b42128
Refactor `RawJsString`'s representation to make `JsString`s construction from string literal heap-allocation free ( #3935 )
...
* feat: add a way to create `JsString` from ASCII literal
* chore: add todo comment to change `DUMMY_RAW_JS_STRING` to constant
* chore: make `ORIGINAL_JS_STR` a static reference to reduce binary size
* chore: replace `static` to `const` and simplify the code
* chore: add generic parameters to `transmute`
* chore: try to use union to represent
* chore: make miri happy
* Optimize const accesses for static strings
* perf: set LITERAL a constant reference to avoid duplication on data segment
* chore: add comments
* chore: add comments
* chore : fix `refcount` test
* chore: remove unnessnary assertion
* chore: modify definition of `JsString::is_static`
* chore: add more tests
* chore: mark `StaticJsString` as `repr[C]`
* chore: improve comment
* chore: Mark `TaggedLen` as `repr(transparent)`
---------
Co-authored-by: jedel1043 <jedel0124@gmail.com>
4 months ago
Hans Larsen
a9d19bdd22
Add a Source::with_path method to set the path on a Source ( #3941 )
...
* Add a Source::with_path method to set the path on a Source
* .
* Align the doc to other with_... methods
4 months ago
Hans Larsen
6f1d7d11ce
Add a JsError::from_rust constructor to create native errors from Rust ( #3921 )
...
* Add a JsError::from_std constructor to create native errors from Rust
* Address comment
4 months ago
raskad
3a6f4a5c68
Fix various parser idempotency issues and parsing errors ( #3917 )
...
* Fix various parser idempotency issues and parsing errors
* fix lints
4 months ago
José Julián Espina
4c76af8c67
Fix lints from rustc 1.80.0 ( #3936 )
5 months ago
raskad
e205b567be
Fix destructuring assignment evaluation order ( #3934 )
5 months ago
CrazyboyQCD
6e6d67c56f
Fix wrong `neg` operation ( #3926 )
...
* fix: fix wrong neg operation
* chore: merge match arm
* chore: add tests
5 months ago
Hans Larsen
816e1bb648
Add a way to add setters/getters in js_class! ( #3911 )
...
* Add a way to add setters/getters in js_class!
* Address cargo clippies
* Add new interface and update doc
* Setters can now return a value, which can be a JsResult
* Remove clippy warning
* Fix having both get and set with a return type fails to match
5 months ago
Kevin Ness
99642be976
Fix temporal builtin properties ( #3930 )
...
* Update length and builtin properties
* Split tags and names as two different statics
* Missed YearMonth and MonthDay length
* Fix length on some methods
* Missed one length
* cargo fmt
5 months ago
Kevin Ness
523bdd0038
Update Instant for new Temporal functionality ( #3928 )
5 months ago
Hans Larsen
d8b8066a58
Add a js_error! macro to create opaque errors ( #3920 )
...
* Add a js_error! macro to create opaque errors
And as a bonus since I needed it, simplify comparison of strings
and add PartialEq<&str> for JsString.
* Add PartialEq<str> for JsStr. PartialEq<&str> uses the other
* Cargo clippy
* Remove conversion of non-string literals and remove From<String> for JsValue
5 months ago
Kevin Ness
7d025bc6ee
Implement more Temporal functionality ( #3924 )
...
* Implement more Temporal functionality
* Correct equals method length
* patch withPlainTime docs
* Correct time method binding
* Add ParseTemporalTimeString handling
* cargo fmt
* Update temporal_rs and add compare methods
5 months ago
magic-akari
fbdd178dad
Implement `Math.pow` function according to ECMAScript specification ( #3916 )
...
Refactor the `Math::pow` function to adhere to the ECMAScript specification.
5 months ago
José Julián Espina
532c00862c
Remove `boa_macros` from `boa_string` ( #3913 )
5 months ago
Haled Odat
5b1621abd2
Implement lossless TryFromJs for integers from f64 ( #3907 )
...
* Implement lossless TryFromJs for integers from f64
* Use `num_traits::AsPrimitive`
5 months ago
raskad
ab0854f76b
Refactor environment stack to remove some panics ( #3893 )
...
* Refactor environment stack to remove some panics
* Fix formatting and enum size difference
* fix typo
5 months ago
Jason Williams
a6822463c8
update versions and ABOUT files ( #3903 )
...
* update versions and ABOUT files
* update about
* add publish false to interop
* remove interop link
5 months ago
Jason Williams
38d0324607
bump gc threshold ( #3908 )
...
* bump gc threshold
* add comment for threshold
* cmoments
* make number 2^20 for better alignment
5 months ago
CrazyboyQCD
6bc78bf523
Add `get_unchecked` method to `JsString` and `JsStr` ( #3898 )
...
* feat: add `get_unchecked` method to `JsString` and `JsStr`
* Clippy: fix
* chore: apply docs suggestions
5 months ago
Kevin Ness
d47254b826
Patch regression from change to to-relative-to-object ( #3906 )
5 months ago
Kevin Ness
5889a767d1
Updates to temporal_rs version and temporal methods ( #3900 )
...
* Updates to temporal_rs version and temporal methods
* Apply review feedback for relativeTo
* Forgot Date.prototype.toPlainDateTime
* Fix doc on toPlainDateTime
5 months ago
raskad
36eeea1c72
Fix evaluation order in destructive property assignments ( #3895 )
5 months ago
raskad
5bf2e92d2f
Fix HomeObject for private class methods ( #3897 )
5 months ago
Hans Larsen
58d0fe64d2
Add a js_class to implement the Class trait without boilerplate ( #3872 )
...
* Add a js_class to implement the Class trait without boilerplate
This also adds a JsInstance that verifies that `this` is of the proper
class, and an `Ignore` that ignore arguments.
The syntax is a bit special because of limitations of macro_rules. For
example, the way fields are defined. It was impossible to keep both
assignments (e.g. `public field = 123;`) and dynamic fields.
This reduces significantly the boilerplate for declaring classes. The
example in class.rs is more than twice as long (if you remove comments)
than the macro is.
* clippies
* Fix usage of macros
* Fix some imports issues
* Fix some imports issues, again
* Add a way to alias a function, e.g. change case
* Address comment and get rid of unwraps
5 months ago
Jason Williams
6a6fa6ae8c
format code in comments ( #3902 )
5 months ago
Kevin Ness
fc2a6e0996
Update Temporal rounding and implement additional methods ( #3892 )
...
* Impl methods and update temporal for new rounding
* implement PlainDate until and since methods
* Bump temporal-rs commit
5 months ago
José Julián Espina
8e76836c8c
Remove `Temporal.Calendar` and `Temporal.TimeZone` ( #3890 )
...
* Remove `Temporal.Calendar` and `Temporal.TimeZone`
* bump test262
* add new test262 features
* fix bug
5 months ago
raskad
961d7b4d82
Refactor call frame access to avoid panic checks ( #3888 )
5 months ago
dependabot[bot]
bb2d028faa
Bump rustc-hash from 1.1.0 to 2.0.0 ( #3887 )
...
* Bump rustc-hash from 1.1.0 to 2.0.0
Bumps [rustc-hash](https://github.com/rust-lang/rustc-hash ) from 1.1.0 to 2.0.0.
- [Changelog](https://github.com/rust-lang/rustc-hash/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/rustc-hash/commits )
---
updated-dependencies:
- dependency-name: rustc-hash
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* fix build
* fix profiler build
* cargo clippy
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jedel1043 <jedel0124@gmail.com>
Co-authored-by: José Julián Espina <julian.espina@canonical.com>
6 months ago
raskad
eb439557ed
Remove some environment clones ( #3884 )
6 months ago
raskad
9738d44749
Combine `HasProperty` and `Get` operations when possible ( #3883 )
6 months ago
Haled Odat
2d91cd1e2c
Remove `FormalParameterList` from CodeBlock ( #3882 )
...
It is not used in strict mode and in non-strict mode it's only used to
construct the binding indices for the `MappedArguments`.
6 months ago
José Julián Espina
2458d73669
Bump temporal_rs to latest commit ( #3880 )
...
* Bump temporal_rs to latest commit
* Fix build
* update test262
* bump temporal pt. 2
* bump temporal pt. 3
* bump temporal (last time)
6 months ago
Hans Larsen
149693ae8b
Adding TryFromJs implementations for tuples ( #3843 )
...
* Adding TryFromJs implementations for tuples
* rustfmt and clippies
* rustfmt
* Remove unit type
* Clippies
6 months ago
José Julián Espina
69ea2f52ed
Fix AsyncGenerator to correctly handle `return` inside `then` ( #3879 )
...
* Fix invalid assumptions for `AsyncGenerator`
* Patch AsyncGenerator functions
* Progress
* Progress 2
* Finish implementation
* cargo fmt
* cargo clippy
* Fix await resumptions
* Assert count in queue test
6 months ago
raskad
1eaf9230ae
Fix hashbang comments by using proper goal symbols ( #3876 )
6 months ago
Hans Larsen
109dd3d395
Adding TryFromJs implementations for BTreeMap and HashMap ( #3844 )
6 months ago
raskad
4419e6df04
Fix base objects in `with` statements ( #3870 )
6 months ago
José Julián Espina
8c727f6d52
Bump ICU4X to 1.5 and cleanup Intl ( #3868 )
7 months ago
leoflalv
fd1a348601
add group_collapsed function executing group inside it ( #3867 )
7 months ago
José Julián Espina
6130adf6d9
Group dependabot updates ( #3863 )
...
* Group dependabot updates
* Add missing winapi feature
7 months ago
dependabot[bot]
52bc17d1a8
Bump thiserror from 1.0.59 to 1.0.60 ( #3851 )
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.59 to 1.0.60.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.59...1.0.60 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7 months ago
Haled Odat
ced222fdba
Separate `JsString` into its own crate ( #3837 )
7 months ago
Haled Odat
5af3f7c079
Fix Rust 1.78.0 Clippy lints ( #3838 )
8 months ago
Haled Odat
3f6ee2276c
Implement Latin1 JsString ( #3450 )
8 months ago
Haled Odat
6febf7eda0
Implement object keys access ( #3832 )
8 months ago
Haled Odat
6ee208fc5d
Decouple `Context` from `ByteCompiler` ( #3829 )
...
* Decouple GlobalDeclarationInstantiation from Context
* Decouple EvalDeclarationInstantiation from Context
* Remove `Context` from `ByteCompiler`
* Fix typo
* Apply review
8 months ago
Hans Larsen
61567687cf
Implement TryFromJs for Either<L, R> ( #3822 )
...
* Implement TryFromJs for Either<L, R>
* Add explicit feature in Cargo.toml
8 months ago
dependabot[bot]
c9d914ca55
Bump syn from 2.0.59 to 2.0.60 ( #3827 )
...
Bumps [syn](https://github.com/dtolnay/syn ) from 2.0.59 to 2.0.60.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.59...2.0.60 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8 months ago
dependabot[bot]
7f079ae689
Bump thiserror from 1.0.58 to 1.0.59 ( #3824 )
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8 months ago