This Pull Request is part of #279.
It adds a string interner to Boa, which allows many types to not contain heap-allocated strings, and just contain a `NonZeroUsize` instead. This can move types to the stack (hopefully I'll be able to move `Token`, for example, maybe some `Node` types too.
Note that the internet is for now only available in the lexer. Next steps (in this PR or future ones) would include also using interning in the parser, and finally in execution. The idea is that strings should be represented with a `Sym` until they are displayed.
Talking about display. I have changed the `ParseError` type in order to not contain anything that could contain a `Sym` (basically tokens), which might be a bit faster, but what is important is that we don't depend on the interner when displaying errors.
The issue I have now is in order to display tokens. This requires the interner if we want to know identifiers, for example. The issue here is that Rust doesn't allow using a `fmt::Formatter` (only in nightly), which is making my head hurt. Maybe someone of you can find a better way of doing this.
Then, about `cursor.expect()`, this is the only place where we don't have the expected token type as a static string, so it's failing to compile. We have the option of changing the type definition of `ParseError` to contain an owned string, but maybe we can avoid this by having a `&'static str` come from a `TokenKind` with the default values, such as "identifier" for an identifier. I wanted for you to think about it and maybe we can just add that and avoid allocations there.
Oh, and this depends on the VM-only branch, so that has to be merged before :)
Another thing to check: should the interner be in its own module?
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26.
<details>
<summary>Commits</summary>
<ul>
<li><a href="97e92a3755"><code>97e92a3</code></a> v0.3.26</li>
<li><a href="2bdd6b49ad"><code>2bdd6b4</code></a> Clarification on maintenance since clap v3 is out</li>
<li><a href="2736281a64"><code>2736281</code></a> Upgrade heck</li>
<li><a href="358cccf9af"><code>358cccf</code></a> [docs] Add output to all examples</li>
<li><a href="4c1a8fcb2f"><code>4c1a8fc</code></a> Link to the clap API in the documentation that says all clap methods can be used</li>
<li><a href="ffd4772156"><code>ffd4772</code></a> Typo</li>
<li>See full diff in <a href="https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=structopt&package-manager=cargo&previous-version=0.3.25&new-version=0.3.26)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.73 to 1.0.75.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p>
<blockquote>
<h2>v1.0.74</h2>
<ul>
<li>Allow creating RawValues from references to unsized values (<a href="https://github-redirect.dependabot.com/serde-rs/json/issues/841">#841</a>, thanks <a href="https://github.com/EFanZh"><code>@EFanZh</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a22b686f49"><code>a22b686</code></a> Release 1.0.75</li>
<li><a href="36c43bfed5"><code>36c43bf</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/848">#848</a> from serde-rs/num</li>
<li><a href="d541381455"><code>d541381</code></a> Deserialize small numbers as integers in arbitrary_precision</li>
<li><a href="0ca5a69d73"><code>0ca5a69</code></a> Add regression test for issue 845</li>
<li><a href="66919777d0"><code>6691977</code></a> Disable buggy iter_not_returning_iterator lint</li>
<li><a href="aebe84cb09"><code>aebe84c</code></a> Raise toolchain version for preserve_order to rust 1.46</li>
<li><a href="3f459308f5"><code>3f45930</code></a> Set miriflags once for whole miri job</li>
<li><a href="c79d9ad2e1"><code>c79d9ad</code></a> Run miri also with some features enabled</li>
<li><a href="58d40de6ed"><code>58d40de</code></a> Release 1.0.74</li>
<li><a href="ef7794f87f"><code>ef7794f</code></a> Detect warnings in CI</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/v1.0.73...v1.0.75">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.73&new-version=1.0.75)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
This Pull Request fixes some warnings and clips errors. It conflicts with the VM/non-VM PR, so should probably go in first, so that this branch gets properly updated and we get the list of real warnings/errors there.
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.131 to 1.0.132.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde's releases</a>.</em></p>
<blockquote>
<h2>v1.0.132</h2>
<ul>
<li>Enable Serialize and Deserialize impls for <code>std::sync::atomic::{AtomicI64, AtomicU64}</code> on riscv64 arch (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2141">#2141</a>, thanks <a href="https://github.com/Avimitin"><code>@Avimitin</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="77ae1c3bf7"><code>77ae1c3</code></a> Release 1.0.132</li>
<li><a href="b85e28166c"><code>b85e281</code></a> Update path to rustc target spec files</li>
<li><a href="0508cb50fc"><code>0508cb5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2141">#2141</a> from Avimitin/risc-v</li>
<li><a href="84fdc7df69"><code>84fdc7d</code></a> Enable atomic64 on riscv64 arch</li>
<li>See full diff in <a href="https://github.com/serde-rs/serde/compare/v1.0.131...v1.0.132">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.131&new-version=1.0.132)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.8.0 to 1.9.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>
<h1>Changelog</h1>
<h2>1.9</h2>
<ul>
<li>Added an <code>atomic-polyfill</code> optional dependency to compile <code>race</code> on platforms without atomics</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="44852cc72d"><code>44852cc</code></a> Merge <a href="https://github-redirect.dependabot.com/matklad/once_cell/issues/165">#165</a></li>
<li><a href="12ccfec475"><code>12ccfec</code></a> Bump version and edit Changelog</li>
<li><a href="133096dbca"><code>133096d</code></a> Add an atomic-polyfill optional dependancy</li>
<li><a href="7b2943b382"><code>7b2943b</code></a> Merge <a href="https://github-redirect.dependabot.com/matklad/once_cell/issues/160">#160</a></li>
<li><a href="702ff21cd4"><code>702ff21</code></a> Remove an unwrap</li>
<li><a href="f92720a4ca"><code>f92720a</code></a> Merge <a href="https://github-redirect.dependabot.com/matklad/once_cell/issues/154">#154</a></li>
<li><a href="c559b03d45"><code>c559b03</code></a> Document the allowed violation of the "once" invariant for <code>&mut self</code> methods.</li>
<li>See full diff in <a href="https://github.com/matklad/once_cell/compare/v1.8.0...v1.9.0">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=once_cell&package-manager=cargo&previous-version=1.8.0&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.72 to 1.0.73.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p>
<blockquote>
<h2>v1.0.73</h2>
<ul>
<li>Update <code>itoa</code> dependency to 1.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="296f718e18"><code>296f718</code></a> Release 1.0.73</li>
<li><a href="48455de674"><code>48455de</code></a> Update to itoa 1.0</li>
<li><a href="b66b0eb322"><code>b66b0eb</code></a> Track raw pointers in miri CI run</li>
<li><a href="52eec5e2ee"><code>52eec5e</code></a> Add a miri test job in CI</li>
<li><a href="aaaf125f0b"><code>aaaf125</code></a> Disable TcpStream test on miri</li>
<li><a href="f0774c482a"><code>f0774c4</code></a> Raise required rustc from 1.31 to 1.36</li>
<li><a href="c3eddcdf40"><code>c3eddcd</code></a> Collect imports to top of test suite</li>
<li><a href="a28529ddc9"><code>a28529d</code></a> Skip ui test when running in miri</li>
<li><a href="7db1ea907d"><code>7db1ea9</code></a> Ignore needless_late_init Clippy lint</li>
<li><a href="fc0ca07b10"><code>fc0ca07</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/831">#831</a> from serde-rs/from_u32</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/v1.0.72...v1.0.73">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.72&new-version=1.0.73)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.21 to 0.8.23.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/serde-yaml/releases">serde_yaml's releases</a>.</em></p>
<blockquote>
<h2>0.8.23</h2>
<ul>
<li>Fix handling of YAML 1.1-style octals that begin with <code>+</code> or <code>-</code> sign (<a href="https://github-redirect.dependabot.com/dtolnay/serde-yaml/issues/228">#228</a>)</li>
</ul>
<h2>0.8.22</h2>
<ul>
<li>Switch float serializer to use the same float formatting library as serde_json</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="44ba87954d"><code>44ba879</code></a> Release 0.8.23</li>
<li><a href="f850da3d4b"><code>f850da3</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/serde-yaml/issues/228">#228</a> from dtolnay/octal</li>
<li><a href="983b5b3f5f"><code>983b5b3</code></a> Suppress blocks_in_if_conditions clippy lint</li>
<li><a href="57f2e661b8"><code>57f2e66</code></a> Treat YAML 1.1 style octals with sign as string, not base 10 number</li>
<li><a href="f424a15c74"><code>f424a15</code></a> Add test of cases that are NOT supposed to be numbers</li>
<li><a href="75a43c4dbc"><code>75a43c4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/serde-yaml/issues/218">#218</a> from rukai/add_unit_struct_test</li>
<li><a href="1db8fdbb85"><code>1db8fdb</code></a> Release 0.8.22</li>
<li><a href="6b836037b5"><code>6b83603</code></a> Switch float serializer from dtoa to ryu</li>
<li><a href="7a02d73770"><code>7a02d73</code></a> Delete disabled borrowed string deserializer test</li>
<li><a href="eb31d62693"><code>eb31d62</code></a> Update from dtoa 0.4 to 1.0</li>
<li>Additional commits viewable in <a href="https://github.com/dtolnay/serde-yaml/compare/0.8.21...0.8.23">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_yaml&package-manager=cargo&previous-version=0.8.21&new-version=0.8.23)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
This PR fixes some vm implementation code. All our internal tests should now pass with the vm enabled.
There are only a few (~100) 262 tests left that currently break with the vm, that previously worked.
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.130 to 1.0.131.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde's releases</a>.</em></p>
<blockquote>
<h2>v1.0.131</h2>
<ul>
<li>Avoid <code>unused_results</code> being triggered in generated code for adjacently tagged enum (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2116">#2116</a>, thanks <a href="https://github.com/tyranron"><code>@tyranron</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="ab1ca04b2e"><code>ab1ca04</code></a> Release 1.0.131</li>
<li><a href="fb2fe409c8"><code>fb2fe40</code></a> Touch up PR 2116</li>
<li><a href="549fac7235"><code>549fac7</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2116">#2116</a> from tyranron/fix-unused-results</li>
<li><a href="c375d8b19b"><code>c375d8b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2124">#2124</a> from dtolnay/cbor</li>
<li><a href="6cf507f808"><code>6cf507f</code></a> Change cbor link to new repo</li>
<li><a href="c3c1641c06"><code>c3c1641</code></a> Remove workaround for redundant_field_names Clippy bug</li>
<li><a href="1fcda0ebdb"><code>1fcda0e</code></a> Enable pedantic lints on test suite in CI</li>
<li><a href="8f16ac0a94"><code>8f16ac0</code></a> Move deny(clippy) to command line arguments in the CI job</li>
<li><a href="737f78c315"><code>737f78c</code></a> Ignore enum_variant_names Clippy lint in test suite</li>
<li><a href="4a97386cb9"><code>4a97386</code></a> Clippy if_then_panic lint has been renamed to manual_assert</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/serde/compare/v1.0.130...v1.0.131">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.130&new-version=1.0.131)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Previously when we had the `context.throw_` methods (like `context.thtrow_type_error()`) they were limited as to where we could call them, e.i. a function that returned `JsResult<JsValue>`. So we had to call the `context.construct_` methods with an explicit `Err()` enum wrap to throw in functions that returned non-jsvalues (which happens a lot).
Now, with this PR the throw methods have a generic `JsResult<R>` return that can return in any `JsResult<T>` returning function. Which cleans the API and makes the user experience a bit better.
```rust
return Err(context.construct_type_error("..."));
// to
return context.throw_type_error("...");
```
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.71 to 1.0.72.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p>
<blockquote>
<h2>v1.0.72</h2>
<ul>
<li>Interpret <code>\u</code>-encoded lone surrogates when deserializing into a byte string (<a href="https://github-redirect.dependabot.com/serde-rs/json/issues/828">#828</a>, <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/829">#829</a>, thanks <a href="https://github.com/lucacasonato"><code>@lucacasonato</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="76e376c8d1"><code>76e376c</code></a> Release 1.0.72</li>
<li><a href="77915ebaa6"><code>77915eb</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/829">#829</a> from serde-rs/surrogate</li>
<li><a href="265fb7ee40"><code>265fb7e</code></a> Move discard of expected byte immediately after peek</li>
<li><a href="142207623a"><code>1422076</code></a> Rearrange the early return on lone or encoded surrogate</li>
<li><a href="311f185d8e"><code>311f185</code></a> Use binary mask to line up visually with the bits being |'d in</li>
<li><a href="11d3464f1c"><code>11d3464</code></a> Extract common logic of surrogate encode</li>
<li><a href="cb4a2517b2"><code>cb4a251</code></a> Document why the parse_escape recursion is not dangerous</li>
<li><a href="7911e704a0"><code>7911e70</code></a> Tail recurse on parse_escape</li>
<li><a href="48dad22b3f"><code>48dad22</code></a> Collapse surrogate encode into extend_from_slice call</li>
<li><a href="683832a343"><code>683832a</code></a> Touch up doc changes from PR 828</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/v1.0.71...v1.0.72">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.71&new-version=1.0.72)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.70 to 1.0.71.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p>
<blockquote>
<h2>v1.0.71</h2>
<ul>
<li>Add serde_json::Map::get_key_value (<a href="https://github-redirect.dependabot.com/serde-rs/json/issues/821">#821</a>, thanks <a href="https://github.com/timothee-haudebourg"><code>@timothee-haudebourg</code></a>)</li>
<li>Add impl From<Box<RawValue>> for Box<str> (<a href="https://github-redirect.dependabot.com/serde-rs/json/issues/824">#824</a>, thanks <a href="https://github.com/jplatte"><code>@jplatte</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="379412b138"><code>379412b</code></a> Release 1.0.71</li>
<li><a href="4125560711"><code>4125560</code></a> Consolidate unsafe RawValue transmutes in one place</li>
<li><a href="dee8161ce5"><code>dee8161</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/824">#824</a> from jplatte/box-raw-value-to-underlying</li>
<li><a href="584f47674a"><code>584f476</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/821">#821</a> from timothee-haudebourg/get_key_value</li>
<li><a href="1ae5566f01"><code>1ae5566</code></a> Disable <code>get_key_value</code> with older Rust versions.</li>
<li><a href="37fe6b5fa8"><code>37fe6b5</code></a> Add impl From<Box<!-- raw HTML omitted -->> for Box<str></li>
<li><a href="c4b6b97ccb"><code>c4b6b97</code></a> Add <code>Map::get_key_value</code> method.</li>
<li>See full diff in <a href="https://github.com/serde-rs/json/compare/v1.0.70...v1.0.71">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.70&new-version=1.0.71)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.23 to 0.13.24.
<details>
<summary>Commits</summary>
<ul>
<li><a href="6f3905dcc8"><code>6f3905d</code></a> Bump versions</li>
<li><a href="979d2d542a"><code>979d2d5</code></a> Mark <code>OdbReader</code> and <code>OdbWriter</code> <code>Send</code> (<a href="https://github-redirect.dependabot.com/rust-lang/git2-rs/issues/765">#765</a>)</li>
<li><a href="33b14ce7f1"><code>33b14ce</code></a> Make <code>Odb</code> <code>Send</code> and <code>Sync</code> (<a href="https://github-redirect.dependabot.com/rust-lang/git2-rs/issues/763">#763</a>)</li>
<li><a href="494964727f"><code>4949647</code></a> Consistently derive Copy, Clone, Debug, PartialEq, and Eq for types (<a href="https://github-redirect.dependabot.com/rust-lang/git2-rs/issues/764">#764</a>)</li>
<li><a href="2afab9f084"><code>2afab9f</code></a> Derive <code>Debug</code> for <code>IndexEntry</code>, <code>IndexTime</code>, and <code>Time</code> (<a href="https://github-redirect.dependabot.com/rust-lang/git2-rs/issues/762">#762</a>)</li>
<li><a href="4461b171f6"><code>4461b17</code></a> Add binding for <code>git_message_trailers</code> (<a href="https://github-redirect.dependabot.com/rust-lang/git2-rs/issues/749">#749</a>)</li>
<li><a href="43486948d5"><code>4348694</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-lang/git2-rs/issues/756">#756</a> from saimen/fix-diffstat-doc-typo</li>
<li><a href="37f581a8c6"><code>37f581a</code></a> Fix <code>DiffStat</code> doc typo</li>
<li>See full diff in <a href="https://github.com/rust-lang/git2-rs/compare/0.13.23...0.13.24">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=git2&package-manager=cargo&previous-version=0.13.23&new-version=0.13.24)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.69 to 1.0.70.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p>
<blockquote>
<h2>v1.0.70</h2>
<ul>
<li>Add <code>serde_json::Map::retain</code> method (<a href="https://github-redirect.dependabot.com/serde-rs/json/issues/822">#822</a>, thanks <a href="https://github.com/deankarn"><code>@deankarn</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a050481b85"><code>a050481</code></a> Release 1.0.70</li>
<li><a href="24f85d2ecf"><code>24f85d2</code></a> Reorder Map::retain to keep keys() and values() adjacent</li>
<li><a href="37da27fc77"><code>37da27f</code></a> Merge pull request 822 from deankarn/master</li>
<li><a href="2e5b990995"><code>2e5b990</code></a> Merge branch 'master' of github.com:deankarn/json</li>
<li><a href="debd7d07fc"><code>debd7d0</code></a> remove duplicate function</li>
<li><a href="9e36f611db"><code>9e36f61</code></a> Update build.rs</li>
<li><a href="68d3b45c97"><code>68d3b45</code></a> fix function signature</li>
<li><a href="29a58a3077"><code>29a58a3</code></a> don't include indexmap retain without BTreeMap retain</li>
<li><a href="eaa1a319c0"><code>eaa1a31</code></a> fix no_btreemap_retain name</li>
<li><a href="09c5892433"><code>09c5892</code></a> test order</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/v1.0.69...v1.0.70">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.69&new-version=1.0.70)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.68 to 1.0.69.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p>
<blockquote>
<h2>v1.0.69</h2>
<ul>
<li>Implement Hash for serde_json::Number (<a href="https://github-redirect.dependabot.com/serde-rs/json/issues/814">#814</a>, thanks <a href="https://github.com/timothee-haudebourg"><code>@timothee-haudebourg</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="5c4f8b2254"><code>5c4f8b2</code></a> Release 1.0.69</li>
<li><a href="0035947522"><code>0035947</code></a> Touch up PR 814</li>
<li><a href="a28b1b1934"><code>a28b1b1</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/814">#814</a> from timothee-haudebourg/hash-numbers-only</li>
<li><a href="f53ae31df6"><code>f53ae31</code></a> Use the same hash for +0 and -0.</li>
<li><a href="8b35517540"><code>8b35517</code></a> Revert "Disable broken fuzz build in CI"</li>
<li><a href="d12fbb9520"><code>d12fbb9</code></a> Fix <code>NaN</code> typo.</li>
<li><a href="48393aba40"><code>48393ab</code></a> Better justification for the use of <code>f64::to_bits</code></li>
<li><a href="9046e3fa86"><code>9046e3f</code></a> Avoid <code>Self::</code> for older Rust versions.</li>
<li><a href="c3ac6c0077"><code>c3ac6c0</code></a> Manual implementation of <code>Number</code>'s <code>PartialEq</code>.</li>
<li><a href="10655c7639"><code>10655c7</code></a> Use <code>core::hash</code> instead of <code>std::hash</code>.</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/v1.0.68...v1.0.69">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.68&new-version=1.0.69)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
<!---
Thank you for contributing to Boa! Please fill out the template below, and remove or add any
information as you feel neccesary.
--->
Hi, first time contributor :)
I was playing with getting the test262 test runner working and found a couple small things that I thought would've made my life a bit easier. I've split them into separate commits. Just let me know if you disagree with any and we can drop that commit. And of course, let me know of any changes you'd like to see :)
The changes are:
- Adds details to the documentation on the `--suite` command to `boa_tester`. I was trying to pass a path starting with `./test262/` for a bit before I looked at the code and saw what it was doing.
- Changes the individual test output when verbosity is > 1. Because the tests are run in parallel, the "Result" line for a given test was frequently not immediately after the "Started" line. This made it hard to determine which test had failed. The new output includes the test name in the result line, and also changes the format of all the individual-test-output lines to begin with the test name.
- Adds a `--disable-parallelism` flag. Even with the adjustments to the test output, it was still a bit hard to follow. Running serially for small sub-suites produces output that can be more easily scanned IMO. I added this as a "disable" flag (as opposed to "enable parallelism") in order to maintain the current default of running in parallel.
Co-authored-by: Grant Orndorff <grant@orndorff.me>
This PR adds conformance results for the VM branch both for PRs and for the conformance results in GitHub pages (even if these are not currently being shown). I'm not 100% sure how this will really work, as I'm not very used to the syntax to concatenate strings.
Co-authored-by: João Borges <rageknify@gmail.com>
Co-authored-by: RageKnify <RageKnify@gmail.com>
* Add strict mode flag to `Context`
* Add strict mode handling of `delete`
* Add strict mode test
* Handle non-strict functions in strict functions
* Enable strict mode for functions defined in a strict context