mirror of https://github.com/boa-dev/boa.git
Tree:
0babe195fb
add-vhs-ci
benchmarks
control-flow-graph
expect-lints
feature/node_span
feature/snapshot
features
gh-readonly-queue/main/pr-2877-b0ddf5eed00a53281d67fc7d846233fc0d99ce9c
gh-readonly-queue/main/pr-3144-8e48cec73fae708420b9af88813d4870243c491a
main
nan-boxing
optimization/static-shapes
real_conformance
reduce-environment-allocations
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.3.0
v0.4.0
v0.5.0
v0.5.1
v0.6.0
v0.7.0
v0.8.0
v0.9.0
${ noResults }
40 Commits (0babe195fb6108d25cc216abfea32d6297ca2615)
Author | SHA1 | Message | Date |
---|---|---|---|
raskad | e286d9fbb7 |
Add AST node for parenthesized expressions (#2738)
Currently we have no explicit representation for parenthesized expressions which makes some behaviours impossible to detect. A bonus is that we can now turn AST that contains parenthesized expressions back to code. This Pull Request changes the following: - Add an AST node for parenthesized expressions. - Adjust some conversions and checks to "ignore"/"expand" parenthesized expressions. - Fix some tests that had parenthesized expressions. |
2 years ago |
Haled Odat | 6c438b5516 |
Implement constant folding optimization (#2679)
This PR implements an optimizer, It currently implements the [constant folding optimization][cfo]. this optimization is responsible for "folding"/evaluating constant expressions. For example: ```js let x = ((1 + 2 + -4) * 8) << 4 ``` Generates the following instruction(s) (`cargo run -- -t`): ``` 000000 0000 PushOne 000001 0001 PushInt8 2 000003 0002 Add 000004 0003 PushInt8 4 000006 0004 Neg 000007 0005 Add 000008 0006 PushInt8 8 000010 0007 Mul 000011 0008 PushInt8 4 000013 0009 ShiftLeft 000014 0010 DefInitLet 0000: 'x' ``` With constant folding it generates the following instruction(s) (`cargo run -- -t -O`): ``` 000000 0000 PushInt8 -128 000002 0001 DefInitLet 0000: 'x' ``` It changes the following: - Implement ~~WIP~~ constant folding optimization, ~~only works with integers for now~~ - Add `--optimize, -O` flag to boa_cli - Add `--optimizer-statistics` flag to boa_cli for optimizer statistics - Add `--optimize, -O` flag to boa_tester After I finish with this, will try to implement other optimizations :) [cfo]: https://en.wikipedia.org/wiki/Constant_folding |
2 years ago |
dependabot[bot] | d134a0acee |
Bump serde from 1.0.158 to 1.0.159 (#2755)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.158 to 1.0.159. <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.159</h2> <ul> <li>Accept empty #[serde()] attribute (<a href="https://redirect.github.com/serde-rs/serde/issues/2422">#2422</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
Iban Eguia Moraza | 6ea4848bb5 |
Fix documentation links (#2741)
This PR changes the following: - Adds a new (very simple) security policy, to comply with GitHub standards - Changes the internal links of the documentation to point to the new boajs.dev domain - The developer documentation link now lies in the CONTRIBUTING.md file |
2 years ago |
raskad | 431a358b2f |
Implement `with` and object environments (#2692)
This Pull Request changes the following: - Implement `with` statement parsing, ast node, compilation and excution. - Implement object environments that are used in the `with` statement excution. The implementation of object environments can probably be optimized further by using more compile-time information about when object environments can exist. Maybe there could also be a separate environment stack for object environments to reduce the filtering and iteration that is needed with the current implementation. This does not fix all tests in the `test/language/statements/with` suite yet. But for most failing tests that I have looked at we are missing other features / have bugs elsewhere. As a note for the review: The functions in the `impl Context` block in `boa_engine/src/environments/runtime.rs` are mostly copied / moved from the existing functions. The only change there should be the addition of the object environment logic. They had to be moved to `Context` because of borrow semantics. |
2 years ago |
dependabot[bot] | 7b2564e126 |
Bump bitflags from 2.0.1 to 2.0.2 (#2701)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.0.1 to 2.0.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/bitflags/bitflags/releases">bitflags's releases</a>.</em></p> <blockquote> <h2>2.0.2</h2> <h2>What's Changed</h2> <ul> <li>Fix up missing isize and usize Bits impls by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/321">bitflags/bitflags#321</a></li> <li>Prepare for 2.0.2 release by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/322">bitflags/bitflags#322</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2">https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md">bitflags's changelog</a>.</em></p> <blockquote> <h1>2.0.2</h1> <h2>What's Changed</h2> <ul> <li>Fix up missing isize and usize Bits impls by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/321">bitflags/bitflags#321</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2">https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | 65bb0d890e |
Bump bitflags from 2.0.0 to 2.0.1 (#2677)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.0.0 to 2.0.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/bitflags/bitflags/releases">bitflags's releases</a>.</em></p> <blockquote> <h2>2.0.1</h2> <h2>What's Changed</h2> <ul> <li>Fix up some docs issues by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/309">bitflags/bitflags#309</a></li> <li>Make empty_flag() const. by <a href="https://github.com/tormeh"><code>@tormeh</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/313">bitflags/bitflags#313</a></li> <li>Fix formatting of multi-bit flags with partial overlap by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/316">bitflags/bitflags#316</a></li> <li>Prepare for 2.0.1 release by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/317">bitflags/bitflags#317</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/tormeh"><code>@tormeh</code></a> made their first contribution in <a href="https://redirect.github.com/bitflags/bitflags/pull/313">bitflags/bitflags#313</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1">https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md">bitflags's changelog</a>.</em></p> <blockquote> <h1>2.0.1</h1> <h2>What's Changed</h2> <ul> <li>Fix up some docs issues by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/309">bitflags/bitflags#309</a></li> <li>Make empty_flag() const. by <a href="https://github.com/tormeh"><code>@tormeh</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/313">bitflags/bitflags#313</a></li> <li>Fix formatting of multi-bit flags with partial overlap by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/bitflags/bitflags/pull/316">bitflags/bitflags#316</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/tormeh"><code>@tormeh</code></a> made their first contribution in <a href="https://redirect.github.com/bitflags/bitflags/pull/313">bitflags/bitflags#313</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1">https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
Iban Eguia Moraza | 0a843d2096 |
Bump bitflags to 2.0.0 (#2666)
Updated `bitflags`, overrides #2665. |
2 years ago |
dependabot[bot] | 6173a7343f |
Bump serde from 1.0.155 to 1.0.156 (#2662)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.155 to 1.0.156. <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.156</h2> <ul> <li>Documentation improvements</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | b138a3088a |
Bump serde from 1.0.154 to 1.0.155 (#2650)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.154 to 1.0.155. <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.155</h2> <ul> <li>Support <code>Serialize</code> and <code>Deserialize</code> impls for <code>core::ffi::CStr</code> and <code>alloc::ffi::CString</code> without "std" feature (<a href="https://redirect.github.com/serde-rs/serde/issues/2374">#2374</a>, thanks <a href="https://github.com/safarir"><code>@safarir</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | 3d3191654d |
Bump serde from 1.0.153 to 1.0.154 (#2645)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.153 to 1.0.154. <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.154</h2> <ul> <li>Fix "undeclared lifetime" error in generated code when deriving Deserialize for an enum with both <code>flatten</code> and <code>'static</code> fields (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2383">#2383</a>, thanks <a href="https://github.com/Mingun"><code>@Mingun</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | 718fea378a |
Bump serde from 1.0.152 to 1.0.153 (#2640)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.153. <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.153</h2> <ul> <li>Support <code>serde(alias = "…")</code> attribute used inside of flattened struct (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2387">#2387</a>, thanks <a href="https://github.com/bebecue"><code>@bebecue</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
raskad | 310c67195a |
Remove Syntax Errors from Bytecompiler (#2598)
This Pull Request closes #1907. It changes the following: - Implement several early errors relating to labels, `break` and `continue` in the parser. - Implement an early error for invalid cover grammar of object literals in the parser. - Remove all remaining syntax errors from the bytecompiler. |
2 years ago |
Iban Eguia Moraza | 3f9f6f0fce |
Module parsing (#2411)
I'm creating this draft PR, since I wanted to have some early feedback, and because I though I would have time to finish it last week, but I got caught up with other stuff. Feel free to contribute :) The main thing here is that I have divided `eval()`, `parse()` and similar functions so that they can decide if they are parsing scripts or modules. Let me know your thoughts. Then, I was checking the import & export parsing, and I noticed we are using `TokenKind::Identifier` for `IdentifierName`, so I changed that name. An `Identifier` is an `IdentifierName` that isn't a `ReservedWord`. This means we should probably also adapt all `IdentifierReference`, `BindingIdentifier` and so on parsing. I already created an `Identifier` parser. Something interesting there is that `await` is not a valid `Identifier` if the goal symbol is `Module`, as you can see in the [spec](https://tc39.es/ecma262/#prod-LabelIdentifier), but currently we don't have that information in the `InputElement` enumeration, we only have `Div`, `RegExp` and `TemplateTail`. How could we approach this? Co-authored-by: jedel1043 <jedel0124@gmail.com> |
2 years ago |
raskad | 3725ff85f7 |
Implement binary `in` operation with private names (#2582)
This Pull Request changes the following: - Implement binary `in` operation with private names. - Adding a separate `BinaryInPrivate` expression in addition to the existing `Binary` expression seems like the best way to implement this in a typesafe manner. Other methods like adding an enum for the `Binary` lhs result in having to make assertions. |
2 years ago |
raskad | b76050df44 |
Move increment and decrement operations to `Update` expression (#2565)
This Pull Request changes the following: - Move postfix/prefix increment and decrement operations from the `Unary` expression to a new `Update` expression. - Add a special type for the `Update` expression target as it is very limited in comparision to an `Unary` target. - This makes bytecode compilation more typesafe for these operations and removes syntax errors from the bytecompiler without introducing panics (see #1907). |
2 years ago |
José Julián Espina | ddf00c8c03 |
Improve identifier parsing (#2581)
Another change extracted from #2411. This PR changes the following: - Improves our identifier parsing with a new `Identifier` parser that unifies parsing for `IdentifierReference`, `BindingIdentifier` and `LabelIdentifier`. - Slightly improves some error messages. - Extracts our manual initialization of static `Sym`s with a new `static_syms` proc macro. - Adds `set_module_mode` and `module_mode` to the cursor to prepare for modules. |
2 years ago |
raskad | e6a1c3789d |
Fix rust 1.67 lints (#2567)
This Pull Request changes the following: - Fix rust 1.67 lints |
2 years ago |
José Julián Espina | 097f85e409 |
First batch of `no_std` support for some sub-crates (#2544)
<!--- 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 enables support for `no_std` targets on some of our sub-crates. I intentionally left out `boa_ast` and `boa_cli` because they're the largest crates we have after `boa_engine`. `boa_gc` is a monster on its own, because we'll need to design a `no_std` multithreaded GC. Anyways, this changes the following: - Adds support for `no_std` on `boa_unicode`. - Adds support for `no_std` on `boa_profiler`. - Adds support for `no_std` on `boa_interner`. - Adds support for `no_std` on `boa_icu_provider`. |
2 years ago |
raskad | f19467ab1d |
Fix some HoistableDeclaration parsing errors (#2532)
This Pull Request hanges the following: - Add early errors for invalid `yield` and `await` usage in function parameters. - Add missing function types to hoistable ordering. - Do not attempt to parse `async` with a following line terminator as an async function. |
2 years ago |
raskad | f52d1d3eb5 |
Recognize Directive Prologues correctly (#2521)
This Pull Request changes the following: - Recognize the `"use strict"` directive prologue correctly. - Refactor parsers to remove a setter function. |
2 years ago |
raskad | 3dca430588 |
Refactor some class features (#2513)
This Pull Request fixes various bugs related to classes. The biggest changes are: - Changed private names to be unique across multiple classes. - Changed private name resolution to work via a visitor after a class is parsed. The way class early errors are defined makes it impossible to perform private name resolution while parsing. - Added function names to class methods. - Added class name binding to method function environments. - Separated opcodes for `static` and non-`static` class method definitions to make the above operations possible. There are still some bugs and further issues with classes but this is already a lot. |
2 years ago |
raskad | f998a1c1ec |
Add early errors for 'eval' or 'arguments' in parameters (#2515)
This Pull Request changes the following: - Add early errors for functions to make sure that 'eval' or 'arguments' cannot be used as binding identifiers in function parameters. When the function body contains a strict directive, this also has to be accounted for. - Fix early errors for function identifiers to make sure they cannot be 'eval' or 'arguments' when a function body contains a strict directive. |
2 years ago |
Veera | 616b7a4513 |
Remove `Literal::Undefined` (#2518)
<!--- 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 fixes/closes #2512 . Removes `Literal::Undefined` so that `undefined` is treated as an identifier name. Ran the parser's idempotency fuzzer and ensured the bug doesn't reproduce. |
2 years ago |
dependabot[bot] | dcacc638aa |
Bump serde from 1.0.151 to 1.0.152 (#2509)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.151 to 1.0.152. <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.152</h2> <ul> <li>Documentation improvements</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
José Julián Espina | 3bf5de2929 |
Redesign Intl API and implement some services (#2478)
This Pull Request fixes/closes #1180. (I'll open a tracking issue for the progress) It changes the following: - Redesigns the internal API of Intl to (hopefully!) make it easier to implement a service. - Implements the `Intl.Locale` service. - Implements the `Intl.Collator` service. - Implements the `Intl.ListFormat` service. On the subject of the failing tests. Some of them are caused by missing locale data in the `icu_testdata` crate; we would need to regenerate that with the missing locales, or vendor a custom default data. On the other hand, there are some tests that are bugs from the ICU4X crate. The repo https://github.com/jedel1043/icu4x-test262 currently tracks the found bugs when running test262. I'll sync with the ICU4X team to try to fix those. cc @sffc |
2 years ago |
José Julián Espina | cc45a827ca |
Cleanup inline annotations (#2493)
Per the [Standard Library development guide](https://std-dev-guide.rust-lang.org/code-considerations/performance/inline.html): > You can add `#[inline]`: > > - To public, small, non-generic functions. > > You shouldn't need `#[inline]`: > - On methods that have any generics in scope. > - On methods on traits that don't have a default implementation. > > `#[inline]` can always be introduced later, so if you're in doubt they can just be removed. This PR follows this guideline to reduce the number of `#[inline]` annotations in our code, removing the annotation in: - Non-public functions - Generic functions - Medium and big functions. Hopefully this shouldn't impact our perf at all, but let's wait to see the benchmark results. |
2 years ago |
dependabot[bot] | 69067cac22 |
Bump serde from 1.0.150 to 1.0.151 (#2497)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.150 to 1.0.151. <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.151</h2> <ul> <li>Update <code>serde::</code>{<code>ser</code>,<code>de</code>}<code>::StdError</code> to re-export <code>core::error::Error</code> when serde is built with <code>feature="std"</code> <strong>off</strong> and <code>feature="unstable"</code> <strong>on</strong> (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2344">#2344</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | af4292181b |
Bump serde from 1.0.149 to 1.0.150 (#2481)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.149 to 1.0.150. <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.150</h2> <ul> <li>Relax some trait bounds from the <code>Serialize</code> impl of <code>HashMap</code> and <code>BTreeMap</code> (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2334">#2334</a>)</li> <li>Enable <code>Serialize</code> and <code>Deserialize</code> impls of <code>std::sync::atomic</code> types on more platforms (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2337">#2337</a>, thanks <a href="https://github.com/badboy"><code>@badboy</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
dependabot[bot] | eec4b8f804 |
Bump serde from 1.0.148 to 1.0.149 (#2472)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.148 to 1.0.149. <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.149</h2> <ul> <li>Relax some trait bounds from the <code>Serialize</code> impl of <code>BinaryHeap</code>, <code>BTreeSet</code>, and <code>HashSet</code> (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2333">#2333</a>, thanks <a href="https://github.com/jonasbb"><code>@jonasbb</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
Kevin | c79b9023df |
Documentation Updates (#2463)
<!--- Thank you for contributing to Boa! Please fill out the template below, and remove or add any information as you feel necessary. ---> Submitting this as a draft for feedback/second opinions. This draft contains some changes to the documentation. Quick Overview: - Potential `Boa` header for Boa's crates added to `boa_engine`. - Changes the wording to a lot of module headers (See `builtins` module and `object/builtins` module). - Updating built-in wrapper's code examples to use `?` operator. - Adds the doc logo URL to a few crates that didn't have it. The main idea of this draft is to move away from the "This module implements" wording as it feels a bit duplicative when listed under the Modules section (mainly focusing around changes in `boa_engine` to start). While working on this, I had a question about whether we should be using JavaScript or ECMAScript in the Boa's documentation. We do seem to currently use both, and this draft uses JavaScript heavily in the wording. |
2 years ago |
dependabot[bot] | b59d996a3b |
Bump serde from 1.0.147 to 1.0.148 (#2465)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.147 to 1.0.148. <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.148</h2> <ul> <li>Support <code>remote</code> derive for generic types that have private fields (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2327">#2327</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
2 years ago |
raskad | 9b56912ea7 |
Set function names in object literal methods (#2460)
This Pull Request changes the following: - Implement `SetFunctionName` opcode based on [`SetFunctionName`](https://tc39.es/ecma262/#sec-setfunctionname) |
2 years ago |
raskad | a6e5c2d4e0 |
Restructure lint lists in `boa_ast` (#2433)
This Pull Request restructures the lint deny/warn/allow lists in `boa_ast` and fixes some clippy lints in the crate. The most relevant change should be in `boa_ast/src/lib.rs`. I went trough all the lints that are available in rustc/rustdoc/clippy with the goal to have most in the deny list, either trough groups or individually. Some clippy lints remain allowed, because they trigger false positives (I fixed them as far as possible). I'm interested in how everyone feels about denying most lints, as it may impact individual development workflows. If we agree on how we want to structure this, I will apply the restructured lists to all other creates aswell. |
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 | 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 | 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 |