mirror of https://github.com/boa-dev/boa.git
Tree:
850a20b988
add-vhs-ci
benchmarks
control-flow-graph
dependabot/cargo/rust-dependencies-50dc4690b8
expect-lints
feature/node_span
feature/snapshot
features
gh-readonly-queue/main/pr-2877-b0ddf5eed00a53281d67fc7d846233fc0d99ce9c
gh-readonly-queue/main/pr-3144-8e48cec73fae708420b9af88813d4870243c491a
local-parameters-if-mapped-arguments-object-not-accessed
main
nan-boxing
optimization/static-shapes
patch-pdt-since
real_conformance
refactor/interner
refactor/register-vm
releases/0.17
releases/0.19
semver_checks
tco
utility-crate
wasm-debugger
nightly
v0.10
v0.11
v0.12
v0.13
v0.14
v0.15
v0.16
v0.17
v0.17.1
v0.17.2
v0.17.3
v0.18
v0.19
v0.19.1
v0.2.0
v0.2.1
v0.20
v0.3.0
v0.4.0
v0.5.0
v0.5.1
v0.6.0
v0.7.0
v0.8.0
v0.9.0
${ noResults }
1951 Commits (850a20b98882bc2b941f4c7ebc40e3c812614e94)
Author | SHA1 | Message | Date |
---|---|---|---|
José Julián Espina | 9c7b4d5531 |
Cleanup `boa_tester` (#2440)
Just some quality changes to improve the maintainability of the tester: - Replaces `anyhow` with `color_eyre` to have a better output on errors/panics. - Changes the ignore file to a TOML file and replaces all parsing logic with the `toml` crate. - Adds a `ignored` field on all `Test`s to simplify run logic. - Replaces the global `IGNORED` with an `ignored` argument on the CLI. |
2 years ago |
dependabot[bot] | ace098fcc5 |
Bump clap from 4.0.24 to 4.0.25 (#2441)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.24 to 4.0.25. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.0.25</h2> <h2>[4.0.25] - 2022-11-15</h2> <h3>Features</h3> <ul> <li><em>(error)</em> Report available subcommands when required subcommand is missing</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.0.25] - 2022-11-15</h2> <h3>Features</h3> <ul> <li><em>(error)</em> Report available subcommands when required subcommand is missing</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
José Julián Espina | 79f638d667 |
Implement the `WeakRef` builtin (#2438)
52/60 tests passing. The remaining tests are either features not implemented ([FinalizationRegistry](https://tc39.es/ecma262/multipage/managing-memory.html#sec-finalization-registry-objects)) or features still in development ([symbols-as-weakmap-keys](https://github.com/tc39/proposal-symbols-as-weakmap-keys)). |
2 years ago |
Addison Crump | c1b5f38d11 |
VM Fuzzer (#2401)
This Pull Request offers a basic VM fuzzer which relies on implied oracles (namely, "does it crash or timeout?"). It changes the following: - Adds an insns_remaining field to Context, denoting the number of instructions remaining to execute (only available when fuzzing) - Adds a JsNativeError variant, denoting when the number of instructions has been exceeded (only available when fuzzing) - Adds a VM fuzzer which looks for cases where Boa may crash on an input This offers no guarantees about correctness, only assertion violations. Depends on #2400. Any issues I raise in association with this fuzzer will link back to this fuzzer. You may run the fuzzer using the following commands: ```bash $ cd boa_engine $ cargo +nightly fuzz run -s none vm-implied ``` Co-authored-by: Addison Crump <addison.crump@cispa.de> |
2 years ago |
dependabot[bot] | ff02cd07f1 |
Bump clap from 4.0.23 to 4.0.24 (#2439)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.23 to 4.0.24. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.0.24</h2> <h2>[4.0.24] - 2022-11-14</h2> <h3>Fixes</h3> <ul> <li>Avoid panic when printing an argument that isn't built</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.0.24] - 2022-11-14</h2> <h3>Fixes</h3> <ul> <li>Avoid panic when printing an argument that isn't built</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
Kevin | 98e6dd36cb |
Boa Gc implementation draft (#2394)
<!---
Thank you for contributing to Boa! Please fill out the template below, and remove or add any
information as you feel necessary.
--->
Not sure if anyone else may be working on something more substantial/in-depth, but I thought I'd post this. 😄
The basic rundown is that this is more of an untested (and in some ways naïve) draft than anything else. It builds rather heavily on `rust-gc`, and tries to keep plenty of the core aspects so as to not break anything too much, and also to minimize overarching changes were it to actually be merged at some point.
This implementation does add ~~a generational divide (although a little unoptimized) to the heap,~~ a GcAlloc/Collector struct with methods, and an ephemeron implementation that allows for the WeakPair and WeakGc pointers.
|
2 years ago |
dependabot[bot] | 41d57f49e2 |
Bump clap from 4.0.22 to 4.0.23 (#2435)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.22 to 4.0.23. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.0.23</h2> <h2>[4.0.23] - 2022-11-11</h2> <h3>Fixes</h3> <ul> <li>Don't panic on reporting invalid-long errors when followed by invalid UTF8</li> <li><em>(help)</em> Clarified argument to <code>help</code> subcommand</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.0.23] - 2022-11-11</h2> <h3>Fixes</h3> <ul> <li>Don't panic on reporting invalid-long errors when followed by invalid UTF8</li> <li><em>(help)</em> Clarified argument to <code>help</code> subcommand</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | 4493254de7 |
Bump chrono from 0.4.22 to 0.4.23 (#2436)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.22 to 0.4.23. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/chronotope/chrono/releases">chrono's releases</a>.</em></p> <blockquote> <p>0.4.23 is the next 0.4 release of the popular chrono date and time library for Rust. After the 0.4.20-0.4.22 series that brought chrono back to life after a long hiatus, development has been fairly quiet, allowing us to start planning changes for the 0.5.0 release. As such, we've started deprecating some APIs that are likely to be removed in 0.5. If you have any feedback on these changes, please let us know in the issue tracker!</p> <h3>Deprecations</h3> <ul> <li>Deprecate methods that have an <code>_opt()</code> alternative (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/827">#827</a>)</li> <li>Deprecate usage of the <code>Date<Tz></code> type (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/851">#851</a>)</li> </ul> <h3>Features</h3> <ul> <li>Optimize RFC 3339 (and RFC 2822) encoding (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/844">#844</a>, thanks to <a href="https://github.com/conradludgate"><code>@conradludgate</code></a>)</li> <li>Addition and subtraction with the <code>Days</code> type (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/784">#784</a>)</li> <li>Add <code>NaiveDateTime::from_timestamp_millis(_opt)</code> (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/818">#818</a>, thanks to <a href="https://github.com/Pscheidl"><code>@Pscheidl</code></a> -- backported in <a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/823">#823</a>)</li> <li>Allow for changing TZ variable and cache it for <code>Local</code> timezone (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/853">#853</a>)</li> <li>Add optional support for the <code>arbitrary::Arbitrary</code> trait (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/849">#849</a>, thanks to <a href="https://github.com/greyblake"><code>@greyblake</code></a> and <a href="https://github.com/asayers"><code>@asayers</code></a>)</li> </ul> <h3>Fixes</h3> <ul> <li>Support tzdb location on AIX (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/826">#826</a>)</li> <li>Fix warnings in documentation (<a href="https://github-redirect.dependabot.com/chronotope/chrono/issues/847">#847</a>)</li> </ul> <p>On behalf of <a href="https://github.com/esheppa"><code>@esheppa</code></a> and <a href="https://github.com/djc"><code>@djc</code></a>, thanks to all contributors!</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | fcab8051d4 |
Bump css-loader from 6.7.1 to 6.7.2 (#2434)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 6.7.1 to 6.7.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/webpack-contrib/css-loader/releases">css-loader's releases</a>.</em></p> <blockquote> <h2>v6.7.2</h2> <h3><a href="https://github.com/webpack-contrib/css-loader/compare/v6.7.1...v6.7.2">6.7.2</a> (2022-11-13)</h3> <h3>Bug Fixes</h3> <ul> <li>css modules generation with inline syntax (<a href="https://github-redirect.dependabot.com/webpack-contrib/css-loader/issues/1480">#1480</a>) (<a href=" |
2 years ago |
dependabot[bot] | e8e95f2311 |
Bump test262 from `f6c48f3` to `1d5dc6b` (#2437)
Bumps [test262](https://github.com/tc39/test262) from `f6c48f3` to `1d5dc6b`. <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
João Borges | c2dd0271d0 |
Switch tarpaulin to llvm engine (#2432)
Trying this to see if it makes coverage numbers more accurate |
2 years ago |
José Julián Espina | fdac8ece5b |
Fix some Date tests (#2431)
Found some tests on the `Date` builtin that were failing for incorrect length attributes and missing checks. |
2 years ago |
dependabot[bot] | 2362f7353c |
Bump webpack from 5.74.0 to 5.75.0 (#2427)
Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.75.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/webpack/webpack/releases">webpack's releases</a>.</em></p> <blockquote> <h2>v5.75.0</h2> <h1>Bugfixes</h1> <ul> <li><code>experiments.*</code> normalize to <code>false</code> when opt-out</li> <li>avoid <code>NaN%</code></li> <li>show the correct error when using a conflicting chunk name in code</li> <li>HMR code tests existance of <code>window</code> before trying to access it</li> <li>fix <code>eval-nosources-*</code> actually exclude sources</li> <li>fix race condition where no module is returned from processing module</li> <li>fix position of standalong semicolon in runtime code</li> </ul> <h1>Features</h1> <ul> <li>add support for <code>@import</code> to extenal CSS when using experimental CSS in node</li> <li>add <code>i64</code> support to the deprecated WASM implementation</li> </ul> <h1>Developer Experience</h1> <ul> <li>expose <code>EnableWasmLoadingPlugin</code></li> <li>add more typings</li> <li>generate getters instead of readonly properties in typings to allow overriding them</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
raskad | 6eff7ca00e |
Handle `__proto__` fields in object literals (#2423)
This Pull Request changes the following: - Handle `__proto__` fields in object literals |
2 years ago |
Anuvrat | 70f73b45d8 |
Safe wrapper for `JsDate` (#2181)
This PR adds a safe wrapper around JavaScript `JsDate` from `builtins::date`, and is being tracked at #2098. #### Implements following methods - [x] `new Date()` - [x] `Date.prototype.getDate()` - [x] `Date.prototype.getDay()` - [x] `Date.prototype.getFullYear()` - [x] `Date.prototype.getHours()` - [x] `Date.prototype.getMilliseconds()` - [x] `Date.prototype.getMinutes()` - [x] `Date.prototype.getMonth()` - [x] `Date.prototype.getSeconds()` - [x] `Date.prototype.getTime()` - [x] `Date.prototype.getTimezoneOffset()` - [x] `Date.prototype.getUTCDate()` - [x] `Date.prototype.getUTCDay()` - [x] `Date.prototype.getUTCFullYear()` - [x] `Date.prototype.getUTCHours()` - [x] `Date.prototype.getUTCMilliseconds()` - [x] `Date.prototype.getUTCMinutes()` - [x] `Date.prototype.getUTCMonth()` - [x] `Date.prototype.getUTCSeconds()` - [x] `Date.prototype.getYear()` - [x] `Date.now()` - [ ] `Date.parse()` Issue 4 - [x] `Date.prototype.setDate()` - [x] `Date.prototype.setFullYear()` - [ ] `Date.prototype.setHours()` Issue 3 - [x] `Date.prototype.setMilliseconds()` - [ ] `Date.prototype.setMinutes()` Issue 3 - [x] `Date.prototype.setMonth()` - [x] `Date.prototype.setSeconds()` - [x] `Date.prototype.setTime()` - [x] `Date.prototype.setUTCDate()` - [x] `Date.prototype.setUTCFullYear()` - [x] `Date.prototype.setUTCHours()` - [x] `Date.prototype.setUTCMilliseconds()` - [x] `Date.prototype.setUTCMinutes()` - [x] `Date.prototype.setUTCMonth()` - [x] `Date.prototype.setUTCSeconds()` - [x] `Date.prototype.setYear()` - [ ] `Date.prototype.toDateString()` Issue 5 - [ ] `Date.prototype.toGMTString()` Issue 5 - [ ] `Date.prototype.toISOString()` Issue 5 - [ ] `Date.prototype.toJSON()` Issue 5 - [ ] `Date.prototype.toLocaleDateString()` Issue 5 and 6 - [ ] `Date.prototype.toLocaleString()` Issue 5 and 6 - [ ] `Date.prototype.toLocaleTimeString()` Issue 5 and 6 - [ ] `Date.prototype.toString()` Issue 5 - [ ] `Date.prototype.toTimeString()` Issue 5 - [ ] `Date.prototype.toUTCString()` Issue 5 - [x] `Date.UTC()` - [x] `Date.prototype.valueOf()` ### Issues 1. ~~`get_*()` and some other methods - They take `&self` as input internally, and internal struct shouldn't be used in a wrapper API. Therefore, these would require input to be `this: &JsValue, args: &[JsValue], context: &mut Context` like others and use `this_time_value()`?~~ Fixed using `this_time_value()` 2. ~~`to_string()`- how can I use `Date::to_string()` rather than `alloc::string::ToString`.~~ My bad it compiles, just `rust-analyzer` was showing it as an issue. 3. `set_hours()` and `set_minutes()` - they subtract local timezones when setting the value, e.g. - On further look: ```rust // both function call `builtins:📅:mod.rs#L1038 this.set_data(ObjectData::date(t)); // `ObjectData::date` creates a new `Date` object `object::mods.rs#L423 // | this date is chrono::Date<Tz(TimezoneOffset)> and Tz default is being used here which is GMT+0 pub fn date(date: Date) -> Self { Self { kind: ObjectKind::Date(date), internal_methods: &ORDINARY_INTERNAL_METHODS, } } ``` - BTW, in `object::mod.rs`'s `enum ObjectKind` there is `Date(chrono::Date)` and it requires the generic argument, how is it being bypassed here? - Also in `set_minutes()` step 6, `LocalTime` should be used. ```rust // reference date = 2000-01-01T06:26:53.984 date.set_hours(&[23.into(), 23.into(), 23.into(), 23.into()], context)?; // would add tiemzone(+5:30) to it // Is 2000-01-01T17:53:23.023 // Should be 2000-01-01T23:23:23.023 ``` 4. `parse()` - it uses `chrono::parse_from_rfc3339` internally, while es6 spec recommends ISO8601. And it can also parse other formats like from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse) `04 Dec 1995 00:12:00 GMT` which fails. So what should be done about it. 5. `to_*()` - This is more general, as the internal date object uses `chrono::NaiveDateTime` which doesn't have timezone. It doesn't account for `+4:00` in example below. ```rust // Creates new `Date` object from given rfc3339 string. let date = JsDate::new_from_parse(&JsValue::new("2018-01-26T18:30:09.453+04:00"), context); println!("to_string: {:?}", date2.to_string(context)?); // IS: Sat Jan 27 2018 00:00:09 GMT+0530 // Should: Fri Jan 26 2018 20:00:09 GMT+0530 ``` 6. `to_locale_*()` - requires [`ToDateTimeOptions`](https://402.ecma-international.org/9.0/#sec-todatetimeoptions) and localization would require chrono's `unstable-locales` feature, which is available for `DateTime` and not for `NaiveDateTime`. - I should have looked properly, `to_date_time_options` is already implemented in `builtins::intl`. Anyway, I would still need some tips on how to use it. What would function signature be like in wrapper API, how would `options` be passed to the said API. - So `to_date_time_options()` takes `options: &JsValue` as an argument and build an object from it and fetch properties through `Object.get()`. If I want `options` to be `{ weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }` what would `JsValue` look like to make it all work. ```rust date.to_locale_date_string(&[JsValue::new("en_EN"), OPTIONS], context)?; // OPTIONS need to be a JsValue which when converted into an object // have these properties { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; ``` ### Possible improvements 1. Right now, `object::jsdate::set_full_year()` and alike (input is a slice) are like below, `into()` doesn't feel ergonomic. ```rust #[inline] pub fn set_full_year(&self, values: &[JsValue], context: &mut Context) -> JsResult<JsValue> { Date::set_full_year(&self.inner.clone().into(), values, context) } // Usage date.set_full_year(&[2000.into(), 0.into(), 1.into()], context)?; // How can something like this be made to work #[inline] pub fn set_full_year<T>(&self, values: &[T], context: &mut Context) -> JsResult<JsValue> where T: Into<JsValue>, { | expected reference `&[value::JsValue]` | found reference `&[T]` Date::set_full_year(&self.inner.clone().into(), values, context) } ``` 2. Any other suggestion? |
2 years ago |
dependabot[bot] | 2ffae5b6f3 |
Bump loader-utils from 2.0.2 to 2.0.3 (#2421)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/webpack/loader-utils/releases">loader-utils's releases</a>.</em></p> <blockquote> <h2>v2.0.3</h2> <h3><a href="https://github.com/webpack/loader-utils/compare/v2.0.1...v2.0.3">2.0.3</a> (2022-10-20)</h3> <h3>Bug Fixes</h3> <ul> <li><strong>security:</strong> prototype pollution exploit (<a href="https://github-redirect.dependabot.com/webpack/loader-utils/issues/217">#217</a>) (<a href=" |
2 years ago |
dependabot[bot] | 7f1a7aeac9 |
Bump clap from 4.0.18 to 4.0.22 (#2419)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.18 to 4.0.22. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.0.22</h2> <h2>[4.0.22] - 2022-11-07</h2> <h3>Fixes</h3> <ul> <li><em>(help)</em> Don't overflow into next-line-help early due to stale (pre-v4) padding calculations</li> </ul> <h2>v4.0.21</h2> <h2>[4.0.21] - 2022-11-07</h2> <h3>Features</h3> <ul> <li><em>(derive)</em> <code>long_about</code> and <code>long_help</code> attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help)</li> </ul> <h2>v4.0.20</h2> <h2>[4.0.20] - 2022-11-07</h2> <h3>Fixes</h3> <ul> <li><em>(derive)</em> Allow defaulted value parser for '()' fields</li> </ul> <h2>v4.0.19</h2> <h2>[4.0.19] - 2022-11-04</h2> <h3>Features</h3> <ul> <li><code>ColorChoice</code> now implements <code>ValueEnum</code></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.0.22] - 2022-11-07</h2> <h3>Fixes</h3> <ul> <li><em>(help)</em> Don't overflow into next-line-help early due to stale (pre-v4) padding calculations</li> </ul> <h2>[4.0.21] - 2022-11-07</h2> <h3>Features</h3> <ul> <li><em>(derive)</em> <code>long_about</code> and <code>long_help</code> attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help)</li> </ul> <h2>[4.0.20] - 2022-11-07</h2> <h3>Fixes</h3> <ul> <li><em>(derive)</em> Allow defaulted value parser for '()' fields</li> </ul> <h2>[4.0.19] - 2022-11-04</h2> <h3>Features</h3> <ul> <li><code>ColorChoice</code> now implements <code>ValueEnum</code></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | e1f90a8025 |
Bump regex from 1.6.0 to 1.7.0 (#2418)
Bumps [regex](https://github.com/rust-lang/regex) from 1.6.0 to 1.7.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex's changelog</a>.</em></p> <blockquote> <h1>1.7.0 (2022-11-05)</h1> <p>This release principally includes an upgrade to Unicode 15.</p> <p>New features:</p> <ul> <li>[FEATURE <a href="https://github-redirect.dependabot.com/rust-lang/regex/issues/832">#832</a>](<a href="https://github-redirect.dependabot.com/rust-lang/regex/issues/916">rust-lang/regex#916</a>): Upgrade to Unicode 15.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | a7a51d2411 |
Bump benchmark-action/github-action-benchmark from 1.14.0 to 1.15.0 (#2417)
Bumps [benchmark-action/github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark) from 1.14.0 to 1.15.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/benchmark-action/github-action-benchmark/releases">benchmark-action/github-action-benchmark's releases</a>.</em></p>
<blockquote>
<h2>v1.15.0</h2>
<ul>
<li><strong>Feat:</strong> Add support for Java via JMH (<a href="https://github-redirect.dependabot.com/benchmark-action/github-action-benchmark/issues/134">#134</a>)</li>
<li><strong>Chore:</strong> Update <code>@actions/core</code>, <code>@actions/exec</code> and <code>@actions/io</code> to the latest version (<a href="https://github-redirect.dependabot.com/benchmark-action/github-action-benchmark/issues/137">#137</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/benchmark-action/github-action-benchmark/blob/master/CHANGELOG.md">benchmark-action/github-action-benchmark's changelog</a>.</em></p>
<blockquote>
<h1><a href="https://github.com/benchmark-action/github-action-benchmark/releases/tag/v1.15.0">v1.15.0</a> - 03 Nov 2022</h1>
<ul>
<li><strong>Feat</strong> Add support for Java via JMH (<a href="https://github-redirect.dependabot.com/benchmark-action/github-action-benchmark/issues/134">#134</a>)</li>
<li><strong>Chore</strong> Update <code>@actions/core</code>, <code>@actions/exec</code> and <code>@actions/io</code> to the latest version (<a href="https://github-redirect.dependabot.com/benchmark-action/github-action-benchmark/issues/137">#137</a>)</li>
</ul>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="
|
2 years ago |
dependabot[bot] | fe280ec268 |
Bump sys-locale from 0.2.1 to 0.2.3 (#2420)
Bumps [sys-locale](https://github.com/1Password/sys-locale) from 0.2.1 to 0.2.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/1Password/sys-locale/releases">sys-locale's releases</a>.</em></p> <blockquote> <h2>v0.2.3</h2> <p>See <a href="https://github.com/1Password/sys-locale/blob/main/CHANGELOG.md#023---2022-11-06">the changelog</a> for details.</p> <h2>v0.2.2</h2> <p>See <a href="https://github.com/1Password/sys-locale/blob/main/CHANGELOG.md#022---2022-11-06">the changelog</a> for details.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/1Password/sys-locale/blob/main/CHANGELOG.md">sys-locale's changelog</a>.</em></p> <blockquote> <h2>[0.2.3] - 2022-11-06</h2> <h3>Fixed</h3> <ul> <li>Re-release 0.2.2 and correctly maintain <code>no_std</code> compatibility on Apple targets.</li> </ul> <h2>[0.2.2] - 2022-11-06</h2> <h3>Changed</h3> <ul> <li>The Apple backend has been rewritten in pure Rust instead of Objective-C.</li> </ul> <h3>Fixed</h3> <ul> <li>The locale returned on UNIX systems is now always a correctly formatted BCP-47 tag.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
raskad | 6c7240195a |
Add early error for `yield` in `GeneratorExpression` parameters (#2413)
This Pull Request changes the following: - Add early error for `yield` in `GeneratorExpression` parameters |
2 years ago |
dependabot[bot] | bc61243351 |
Bump test262 from `85373b4` to `f6c48f3` (#2414)
Bumps [test262](https://github.com/tc39/test262) from `85373b4` to `f6c48f3`. <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
Addison Crump | e64a20e2a6 |
Parser Idempotency Fuzzer (#2400)
This Pull Request offers a fuzzer which is capable of detecting faults in the parser and interner. It does so by ensuring that the parsed AST remains the same between a parsed source and the result of parsing the `to_interned_string` result of the first parsed source. It changes the following: - Adds a fuzzer for the parser and interner. Any issues I raise in association with this fuzzer will link back to this fuzzer. You may run the fuzzer using the following commands: ```bash $ cd boa_engine $ cargo +nightly fuzz run -s none parser-idempotency ``` Co-authored-by: Addison Crump <addison.crump@cispa.de> |
2 years ago |
José Julián Espina | b88736a5c9 |
Extract the parser into a crate (#2409)
Depends on #2408. This finally separates parsing from execution, which should make compilations a bit faster. |
2 years ago |
Iban Eguia Moraza | 23f0335bf1 |
Reduced boilerplate code in the parser (#2410)
This PR adds an `OrAbrupt` trait, with the `or_abrupt()` function. This function is equivalent to the previous `?.ok_or(ParseError::AbruptEnd)`, but it's cleaner. It's implemented for the parser cursor results types. It also adds an `advance()` function to the parser cursor (which might be possible to optimize further), that just advances the cursor without returning any token. This shows a clearer intent in many places where it's being used. I also used `ParseResult` in more places, since we were not using it in many places. |
2 years ago |
José Julián Espina | 8a664f2f24 |
Make `JsString` conform to miri tests (#2412)
This PR rewrites some patterns of the `JsString` implementation in order to pass all its miri tests. This can be verified by running: ```bash cargo +nightly miri test -p boa_engine string::tests -- --skip builtins --skip parser ``` Basically, we were doing two operations that were Undefined Behaviour per the [Stacked Borrows](https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md) model: - Casting `&JsString` to `&mut RawJsString` to `&[u16]`. The intermediate mutable borrow must not exist, or Miri considers this as Undefined Behaviour. - Trying to access `RawJsString.data` using the dot operator. Miri complains with `this is a zero-size retag ([0x10..0x10]) so the tag in question does not exist anywhere`. To fix this, we can recompute the position of `data` every time we want to access it. |
2 years ago |
José Julián Espina | 8e14d76893 |
Rewrite scope analysis operations using visitors (#2408)
This PR rewrites all syntax-directed operations that find declared names and variables using visitors.
Hopefully, this should be the last step before finally being able to separate the parser from the engine.
I checked the failing [tests](
|
2 years ago |
José Julián Espina | aad78154cf |
Pretty print promise objects (#2407)
Right now our promises print `{ }` on display. This PR improves a bit the display and ergonomics of promises in general. Now, promises will print... - When pending: `Promise { <pending> }` - When fulfilled: `Promise { "hi" }` - When rejected: `Promise { <rejected> ReferenceError: x is not initialized }` |
2 years ago |
José Julián Espina | 73d23ead7f |
Fix async tests result values (#2406)
So, there were some tests that weren't reporting the result of async evaluations correctly. This PR fixes this. It also ignores tests with the `IsHTMLDDA` feature, since we haven't implemented it. On another note, this also changes the symbols of the test suite to 'F' (failed) and '-' (ignored), which is clearer for colorless terminals. |
2 years ago |
José Julián Espina | 91235c77fe |
Rewrite some patterns with let-else and ok_or_else (#2404)
This Pull Request updates the codebase to the newest version of rustc (1.65.0). It changes the following: - Bumps `rust-version` to 1.65.0. - Rewrites some snippets to use the new let else, ok_or_else and some other utils. - Removes the `rustdoc::missing_doc_code_examples` allow lint from our codebase. (Context: https://github.com/rust-lang/rust/pull/101732) |
2 years ago |
raskad | dc3b09a001 |
Implement async arrow functions (#2393)
This Pull Request fixes #1805. It changes the following: - Implement async arrow function parsing and execution. - Handle special case when a function expressions binding identifier need to be bound in the function body. - Implement special silent ignored assignment for the above case. - Fix issue with getting the correct promise capability for function returns. - Complete function object `toString` todo. I will fix the two failing assignmenttargettype tests in a follow up PR. |
2 years ago |
José Julián Espina | 49a58675cc |
Replace `contains` and friends with visitors (#2403)
This Pull Request replaces `contains`, `contains_arguments`, `has_direct_super` and `function_contains_super` with visitors. (~1000 removed lines!) Also, the new visitor implementation caught a bug where we weren't setting the home object of async functions, generators and async generators for methods of classes, which caused a stack overflow on `super` calls, and I think that's pretty cool! Next is `var_declared_names`, `lexically_declared_names` and friends, which will be on another PR. |
2 years ago |
José Julián Espina | b4da172f91 |
Extract the ast to a crate (#2402)
This should hopefully improve our compilation times, both from a clean build and from an incremental compilation snapshot. Next would be the parser, but it imports `Context`, so it'll require a bit more work. The number of file changes is obviously big, but almost nothing was changed, I just moved everything to another crate and readjusted the imports of the `parser` module. (Though, I did have to change some details, because there were some functions on the ast that returned `ParseError`s, and the tests had to be moved to the parser) |
2 years ago |
Addison Crump | b5b8cdfa18 |
Implement AST Visitor pattern (attempt #3) (#2392)
This Pull Request closes no specific issue, but allows for analysis and post-processing passes by both internal and external developers. It changes the following: - Adds a Visitor trait, to be implemented by visitors of a particular node type. - Adds `Type`Visitor traits which offer access to private members of a node. - Adds an example which demonstrates the use of Visitor traits by walking over an AST and printing its contents. At this time, the PR is more of a demonstration of intent rather than a full PR. Once it's in a satisfactory state, I'll mark it as not a draft. Co-authored-by: Addison Crump <addison.crump@cispa.de> |
2 years ago |
José Julián Espina | c72e4c20c9 |
Implement delete for references (#2395)
This Pull Request implements `delete` for variable references: ```Javascript x = 5; console.log(x) // 5; delete x; console.log(x) // ReferenceError ``` It changes the following: - Implements delete for references. - Fixes tests related to deletions of function definitions inside `eval`. - Implements an op to throw an error on super property deletion. This puts us at a conformance of 97.98% for the `test/language/expressions/delete` suite. The last 2 failing tests are related to `with` statements ([11.4.1-4.a-5.js]( |
2 years ago |
dependabot[bot] | 6c70dd6243 |
Bump once_cell from 1.15.0 to 1.16.0 (#2396)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.15.0 to 1.16.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/matklad/once_cell/blob/master/CHANGELOG.md">once_cell's changelog</a>.</em></p> <blockquote> <h2>1.16.0</h2> <ul> <li>Add <code>no_std</code> implementation based on <code>critical-section</code>, <a href="https://github-redirect.dependabot.com/matklad/once_cell/pull/195">#195</a>.</li> <li>Deprecate <code>atomic-polyfill</code> feature (use the new <code>critical-section</code> instead)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | 8c58339b38 |
Bump test262 from `b5d3192` to `85373b4` (#2397)
Bumps [test262](https://github.com/tc39/test262) from `b5d3192` to `85373b4`. <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
Halid Odat | bc2dd9c4bd |
Fix order dependent execution in assignment. (#2378)
Fixes #1917 (fixes the code example given with the hashes) Fixes the order dependent execution of assignment, so the following code works correctly: ```javascript function f(x) { console.log(x) } // used to check the order of execution let a = [[]] (f(1), a)[(f(2), 0)][(f(3), 0)] = (f(4), 123) // 🤮 ``` Prints out: ```bash 1 2 3 4 123 ``` As expected This introduces some opcodes: - ~~`Swap3`: currently used only to keep some previous code working that needs refactoring.~~ - ~~`RotateRight n`: Rotates the `n` top values from the top of the stack to the right by `1`.~~ Already added by #2390 ~~Besides the new opcodes,~~ Some opcodes pop and push order of values on the stack have been changed. To eliminate many swaps and to make this change easier. ~~This PR is still a WIP and needs more refactoring~~ This is now ready for review/merge :) |
2 years ago |
José Julián Espina | 18824baba8 |
Generate `Opcode` impl using macro (#2391)
This reduces a lot of the repetition from the `Opcode` functions and makes it easier to add a new Op. |
2 years ago |
José Julián Espina | 4b892a931d |
Implement optional chains (#2390)
This Pull Request implements optional chains.
Example:
```Javascript
const adventurer = {
name: 'Alice',
cat: {
name: 'Dinah'
}
};
console.log(adventurer.cat?.name); // Dinah
console.log(adventurer.dog?.name); // undefined
```
Since I needed to implement `Opcode::RotateLeft`, and #2378 had an implementation for `Opcode::RotateRight`, I took the opportunity to integrate both ops into this PR (big thanks to @HalidOdat for the original implementation!).
This PR almost has 100% conformance for the `optional-chaining` test suite. However, there's this one [test](
|
2 years ago |
raskad | f446c0970f |
Remove invalid optimization in addition (#2387)
This Pull Request changes the following: - Remove invalid optimization in addition where `ToPrimitive` calls where skipped. |
2 years ago |
raskad | b67596bc9b |
Add named evaluation of logical assignments (#2389)
This Pull Request changes the following: - Add named evaluation of logical assignments |
2 years ago |
raskad | 203c1961bb |
Skip prototype field definition for arrow function (#2388)
This Pull Request changes the following: - Skip prototype field definition for arrow function - Add `GetArrowFunction` opcode |
2 years ago |
raskad | 786357919f |
Set `in` to `true` when parsing AssignmentExpression in ConditionalExpression (#2386)
This Pull Request fixes the following: - Set `in` to `true` when parsing AssignmentExpression in ConditionalExpression |
2 years ago |
Kevin | f026f2005a |
Implement `JsGenerator` and wrapper docs clean up (#2380)
<!--- Thank you for contributing to Boa! Please fill out the template below, and remove or add any information as you feel necessary. ---> This Pull Request is related to #2098. It changes the following: - Implements a wrapper for the `Generator` built-in object - Adds to some of the documentation across the builtin wrappers with the goal of trying to clean up the documentation by making it a bit more consistent [on boa's docs](https://boa-dev.github.io/boa/doc/boa_engine/object/builtins/index.html) |
2 years ago |
José Julián Espina | 762dd93d44 |
Fix var collisions in strict eval calls (#2382)
This Pull Request allows collisions of var declarations with already existing lexical bindings if the `eval` call is strict or occurs within strict code. In short, it allows: ```Javascript { let x; { eval('"use strict"; var x;'); } } ``` and ```Javascript "use strict"; { let x; { eval('var x;'); } } ``` This is valid since in strict code all `eval` calls get their own function environment, making it impossible to declare a new var in the outer function environment. This change also skips poisoning environments on strict code, because `eval` cannot add new declarations for the current environment in that situation. |
2 years ago |
José Julián Espina | 8a5f141125 |
Reduce documentation size in blog (#2383)
The documentation page of our blog is a whooping 532 MB in size. This is because we're uploading the whole documentation of all our deps instead of only our crates. This PR modifies our CI to only upload a lightweight version of our documentation, which excludes all deps (replaces all hyperlinks with crates.io links) and only builds our crates docs. This brings the total size of our docs down to 87 MB. |
2 years ago |
José Julián Espina | 447fca4cc0 |
Implement member accessors in initializer of for loops (#2381)
This Pull Request implements member accessors in `for ... in` and `for ... of` loops. This unlocks patterns like: ```Javascript let obj = {a: 0, b: 1}; for (obj.a of [1,2,3]) { } console.log(obj.a) // 3 ``` |
2 years ago |
José Julián Espina | 89e3081672 |
Document the AST (#2377)
As promised in https://github.com/boa-dev/boa/pull/2319#issuecomment-1280095047. There are still some style inconsistencies (which require a bit more time and effort), but having the whole module documented is a lot better for clarity. |
2 years ago |
Iban Eguia Moraza | 6a43878b04 |
Updated the Code of Conduct (#2365)
This updates the Code of Conduct to the Contributor Covenant v2.1 version (we were using the 2.0 version until now). Changes are very minor. As far as I can tell, the only content difference is the explicit mention of _caste_ and _color_ among the potential traits that could cause harassment. Then it just changes the format a bit to make links a bit more user friendly, by not posting URLs directly. But I have a question: should we update the contact method? It currently says the following: > Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [discord](https://discord.gg/tUFFk9Y) by contacting _JaseW_. Maybe we should mention the `@boa-dev` group, and that they can contact anyone there. What do you think? I would also like to update this before https://github.com/boa-dev/ryu-js/pull/22 |
2 years ago |