|
|
|
[package]
|
|
|
|
name = "boa_engine"
|
|
|
|
keywords = ["javascript", "js", "compiler", "lexer", "parser"]
|
|
|
|
categories = ["parser-implementations", "compilers"]
|
|
|
|
readme = "../README.md"
|
|
|
|
description.workspace = true
|
|
|
|
version.workspace = true
|
|
|
|
edition.workspace = true
|
|
|
|
authors.workspace = true
|
|
|
|
license.workspace = true
|
|
|
|
repository.workspace = true
|
|
|
|
rust-version.workspace = true
|
|
|
|
|
|
|
|
[features]
|
|
|
|
profiler = ["boa_profiler/profiler"]
|
|
|
|
deser = ["boa_interner/serde", "boa_ast/serde"]
|
|
|
|
intl = [
|
|
|
|
"boa_icu_provider/full",
|
|
|
|
"icu_normalizer/serde",
|
|
|
|
"icu_normalizer/std",
|
|
|
|
"dep:icu_locid_transform",
|
|
|
|
"dep:icu_locid",
|
|
|
|
"dep:icu_datetime",
|
|
|
|
"dep:icu_plurals",
|
|
|
|
"dep:icu_provider",
|
|
|
|
"dep:icu_calendar",
|
|
|
|
"dep:icu_collator",
|
|
|
|
"dep:icu_casemapping",
|
|
|
|
"dep:icu_list",
|
|
|
|
"dep:icu_segmenter",
|
|
|
|
"dep:writeable",
|
|
|
|
"dep:sys-locale",
|
|
|
|
"dep:yoke",
|
|
|
|
"dep:zerofrom",
|
|
|
|
]
|
|
|
|
|
|
|
|
fuzz = ["boa_ast/arbitrary", "boa_interner/arbitrary"]
|
|
|
|
|
|
|
|
# Enable Boa's VM instruction flowgraph generator.
|
|
|
|
flowgraph = []
|
|
|
|
|
|
|
|
# Enable Boa's VM instruction tracing.
|
|
|
|
trace = []
|
|
|
|
|
|
|
|
# Enable Boa's additional ECMAScript features for web browsers.
|
|
|
|
annex-b = ["boa_parser/annex-b"]
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
boa_interner.workspace = true
|
|
|
|
boa_gc = { workspace = true, features = [ "thinvec" ] }
|
|
|
|
boa_profiler.workspace = true
|
|
|
|
boa_macros.workspace = true
|
|
|
|
boa_ast.workspace = true
|
|
|
|
boa_parser.workspace = true
|
|
|
|
boa_icu_provider.workspace = true
|
|
|
|
serde = { version = "1.0.164", features = ["derive", "rc"] }
|
|
|
|
serde_json = "1.0.97"
|
|
|
|
rand = "0.8.5"
|
Bump num-traits from 0.2.14 to 0.2.15 (#2056)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.14 to 0.2.15.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rust-num/num-traits/blob/master/RELEASES.md">num-traits's changelog</a>.</em></p>
<blockquote>
<h1>Release 0.2.15 (2022-05-02)</h1>
<ul>
<li><a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/195">The new <code>Euclid</code> trait calculates Euclidean division</a>, where the
remainder is always positive or zero.</li>
<li><a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/210">The new <code>LowerBounded</code> and <code>UpperBounded</code> traits</a> separately describe
types with lower and upper bounds. These traits are automatically implemented
for all fully-<code>Bounded</code> types.</li>
<li><a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/207">The new <code>Float::copysign</code> method copies the sign of the argument</a> to
to the magnitude of <code>self</code>.</li>
<li><a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/205">The new <code>PrimInt::leading_ones</code> and <code>trailing_ones</code> methods</a> are the
complement of the existing methods that count zero bits.</li>
<li><a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/202">The new <code>PrimInt::reverse_bits</code> method reverses the order of all bits</a>
of a primitive integer.</li>
<li><a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/201">Improved <code>Num::from_str_radix</code> for floats</a>, also <a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/214">ignoring case</a>.</li>
<li><a href="https://github-redirect.dependabot.com/rust-num/num-traits/pull/196"><code>Float</code> and <code>FloatCore</code> use more from <code>libm</code></a> when that is enabled.</li>
</ul>
<p><strong>Contributors</strong>: <a href="https://github.com/alion02"><code>@alion02</code></a>, <a href="https://github.com/clarfonthey"><code>@clarfonthey</code></a>, <a href="https://github.com/cuviper"><code>@cuviper</code></a>, <a href="https://github.com/ElectronicRU"><code>@ElectronicRU</code></a>,
<a href="https://github.com/ibraheemdev"><code>@ibraheemdev</code></a>, <a href="https://github.com/SparrowLii"><code>@SparrowLii</code></a>, <a href="https://github.com/sshilovsky"><code>@sshilovsky</code></a>, <a href="https://github.com/tspiteri"><code>@tspiteri</code></a>, <a href="https://github.com/XAMPPRocky"><code>@XAMPPRocky</code></a>, <a href="https://github.com/Xiretza"><code>@Xiretza</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/rust-num/num-traits/commit/1597c1c4d1b3e33548e4661c519b7246a5fc1c28"><code>1597c1c</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-num/num-traits/issues/236">#236</a></li>
<li><a href="https://github.com/rust-num/num-traits/commit/4a2e648d9325810dcaf627f743c0fc5df066a820"><code>4a2e648</code></a> Release 0.2.15</li>
<li><a href="https://github.com/rust-num/num-traits/commit/edb4821d42bfd055792a72234798b76b8068fe56"><code>edb4821</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-num/num-traits/issues/207">#207</a></li>
<li><a href="https://github.com/rust-num/num-traits/commit/e4e52de40fdf4fa5f2ef260a482cf51c915581c5"><code>e4e52de</code></a> Fix copysign tests for 1.8.0</li>
<li><a href="https://github.com/rust-num/num-traits/commit/30077120f96ff00de46cab3c6ce693eb892c18bd"><code>3007712</code></a> Don't use an explicit copysign feature</li>
<li><a href="https://github.com/rust-num/num-traits/commit/30f8d3ab4bfb590f742f592309109e00b207b23d"><code>30f8d3a</code></a> Make sure test_copysignf uses Float</li>
<li><a href="https://github.com/rust-num/num-traits/commit/70b5c579ab6a001435208d8d3811407c8f07fa94"><code>70b5c57</code></a> Update float.rs</li>
<li><a href="https://github.com/rust-num/num-traits/commit/cabfb0b90497ba5d908d14a908dd269f03cc5f4d"><code>cabfb0b</code></a> Update float.rs</li>
<li><a href="https://github.com/rust-num/num-traits/commit/7ca2456e9c1b3f89a6bb749fc54d8a153ff51704"><code>7ca2456</code></a> Update float.rs</li>
<li><a href="https://github.com/rust-num/num-traits/commit/64db6c32936c1cd00c3074b847e10c7e6f8b20b3"><code>64db6c3</code></a> Add copysign</li>
<li>Additional commits viewable in <a href="https://github.com/rust-num/num-traits/compare/num-traits-0.2.14...num-traits-0.2.15">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=num-traits&package-manager=cargo&previous-version=0.2.14&new-version=0.2.15)](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>
3 years ago
|
|
|
num-traits = "0.2.15"
|
|
|
|
regress = "0.6.0"
|
|
|
|
rustc-hash = "1.1.0"
|
|
|
|
num-bigint = { version = "0.4.3", features = ["serde"] }
|
|
|
|
num-integer = "0.1.45"
|
|
|
|
bitflags = "2.3.2"
|
|
|
|
indexmap = "1.9.3"
|
|
|
|
ryu-js = "0.2.2"
|
|
|
|
chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] }
|
|
|
|
fast-float = "0.2.0"
|
|
|
|
once_cell = "1.18.0"
|
|
|
|
tap = "1.0.1"
|
|
|
|
sptr = "0.3.2"
|
|
|
|
static_assertions = "1.1.0"
|
|
|
|
thiserror = "1.0.40"
|
Make `JsSymbol` thread-safe (#2539)
The section about `Symbol` on the [specification](https://tc39.es/ecma262/#sec-ecmascript-language-types-symbol-type) says:
> The Symbol type is the set of all non-String values that may be used as the key of an Object property ([6.1.7](https://tc39.es/ecma262/#sec-object-type)).
Each possible Symbol value is unique and immutable.
Our previous implementation of `JsSymbol` used `Rc` and a thread local `Cell<usize>`. However, this meant that two different symbols in two different threads could share the same hash, making symbols not unique.
Also, the [GlobalSymbolRegistry](https://tc39.es/ecma262/#table-globalsymbolregistry-record-fields) is meant to be shared by all realms, including realms that are not in the same thread as the main one; this forces us to replace our current thread local global symbol registry with a thread-safe one that uses `DashMap` for concurrent access. However, the global symbol registry uses `JsString`s as keys and values, which forces us to either use `Vec<u16>` instead (wasteful and needs to allocate to convert to `JsString` on each access) or make `JsString` thread-safe with an atomic counter. For this reason, I implemented the second option.
This PR changes the following:
- Makes `JsSymbol` thread-safe by using Arc instead of Rc, and making `SYMBOL_HASH_COUNT` an `AtomicU64`.
- ~~Makes `JsString` thread-safe by using `AtomicUsize` instead of `Cell<usize>` for its ref count.~~ EDIT: Talked with @jasonwilliams and we decided to use `Box<[u16]>` for the global registry instead, because this won't penalize common usage of `JsString`, which is used a LOT more than `JsSymbol`.
- Makes the `GLOBAL_SYMBOL_REGISTRY` truly global, using `DashMap` as our global map that is shared by all threads.
- Replaces some thread locals with thread-safe alternatives, such as static arrays and static indices.
- Various improvements to all related code for this.
2 years ago
|
|
|
dashmap = "5.4.0"
|
|
|
|
num_enum = "0.6.1"
|
|
|
|
pollster = "0.3.0"
|
|
|
|
thin-vec = "0.2.12"
|
|
|
|
itertools = { version = "0.11.0", default-features = false }
|
|
|
|
icu_normalizer = "1.2.0"
|
|
|
|
|
|
|
|
# intl deps
|
|
|
|
icu_locid_transform = { version = "1.2.1", features = ["std", "serde"], optional = true }
|
|
|
|
icu_locid = { version = "1.2.0", features = ["serde"], optional = true }
|
|
|
|
icu_datetime = { version = "1.2.0", features = ["serde", "experimental"], optional = true }
|
|
|
|
icu_calendar = { version = "1.2.0", optional = true }
|
|
|
|
icu_collator = { version = "1.2.0", features = ["serde"], optional = true }
|
|
|
|
icu_plurals = { version = "1.2.0", features = ["serde"], optional = true }
|
|
|
|
icu_provider = { version = "1.2.0", optional = true }
|
|
|
|
icu_list = { version = "1.2.0", features = ["serde"], optional = true }
|
|
|
|
icu_casemapping = { version = "0.7.2", features = ["serde"], optional = true}
|
|
|
|
icu_segmenter = { version = "1.2.1", features = ["serde"], optional = true }
|
Bump writeable from 0.5.1 to 0.5.2 (#2819)
Bumps [writeable](https://github.com/unicode-org/icu4x) from 0.5.1 to 0.5.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/unicode-org/icu4x/blob/main/CHANGELOG.md">writeable's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>icu4x 1.2 (Apr 13, 2023)</h2>
<ul>
<li>General
<ul>
<li>All updated crates:
<ul>
<li>Add missing <code>Debug</code> impls (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3206">#3206</a>)</li>
<li>Update Rust edition to 2021 (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3075">#3075</a>)</li>
<li>Internal clippy fixes</li>
<li>Unless otherwise specified, all crate updates are to version 1.2.</li>
<li>Out-of-cycle releases do not get their own changelog entries, so some entries may span multiple patch or pre-1.0 minor versions.</li>
</ul>
</li>
</ul>
</li>
<li>Data model and providers
<ul>
<li><code>icu_provider</code>:
<ul>
<li>Add support for silencing expected <code>DataError</code>s (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3262">#3262</a>)</li>
<li>Removing <code>dhat</code> dependency (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3138">#3138</a>)</li>
<li>Make trait <code>DataMarker: 'static</code> (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3137">#3137</a>)</li>
</ul>
</li>
<li><code>icu_datagen</code>: (includes patch updates 1.1.1 and 1.1.2)
<ul>
<li>(lib) Add <code>Out::Baked</code> and <code>BakedOptions</code>; deprecate <code>Out::Module</code> (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3130">#3130</a>)</li>
<li>(cli) Bump clap to 4.0, move to using derive (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3149">#3149</a>)</li>
<li>Pare down datagen deps (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3160">#3160</a>)</li>
<li>Support changes from CLDR 43 (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3182">#3182</a>, <a href="https://redirect.github.com/unicode-org/icu4x/issues/3201">#3201</a>, <a href="https://redirect.github.com/unicode-org/icu4x/issues/3204">#3204</a>, <a href="https://redirect.github.com/unicode-org/icu4x/issues/3205">#3205</a>)</li>
<li>Add support for complemented range iterators (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3198">#3198</a>)</li>
<li>Using byte string literals in databake (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3040">#3040</a>)\</li>
<li>Datagen support for all new component features</li>
<li>(performance) Less <code>ZeroMap</code> mutation in datagen (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3098">#3098</a>)</li>
</ul>
</li>
<li><code>icu_provider_adapters</code>: No other changes</li>
<li><code>icu_provider_blob</code>: No other changes</li>
<li><code>icu_provider_fs</code>:
<ul>
<li>Remove sha2 dep (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3160">#3160</a>)</li>
</ul>
</li>
<li><code>icu_provider_macros</code>: No other changes</li>
</ul>
</li>
<li>Components:
<ul>
<li>Cross component: No additional cross-component changes</li>
<li><code>icu_calendar</code>
<ul>
<li>Document the bounds of <code>IsoSecond</code>, <code>Minute</code> and <code>Hour</code> (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3156">#3156</a>)</li>
</ul>
</li>
<li><code>icu_collator</code>: No other changes</li>
<li><code>icu_collections</code>:
<ul>
<li>Add <code>to_u32</code> for TrieValue (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3222">#3222</a>)</li>
<li>Add <code>CPT::try_alloc_map_value</code> (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3207">#3207</a>)</li>
<li>Add support for coalescing range iterators (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3198">#3198</a>)</li>
<li>Allow inversion lists to be built from ranges that include <code>char::MAX</code> (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3203">#3203</a>)</li>
</ul>
</li>
<li><code>icu_datetime</code>: No other changes</li>
<li><code>icu_decimal</code>
<ul>
<li>Add <code>From<GroupingStrategy></code> for <code>FixedDecimalFormatterOptions</code> (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3045">#3045</a>)</li>
</ul>
</li>
<li><code>icu_list</code>
<ul>
<li><code>ListJoinerPattern::from_parts_unchecked()</code> is now <code>from_parts()</code> and panics when necessary (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3052">#3052</a>)</li>
</ul>
</li>
<li><code>icu_locid</code>
<ul>
<li>Reduce size of internal <code>ShortVec</code> abstraction (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3200">#3200</a>)</li>
<li>Use <code>Box</code> in place of <code>Vec</code> in <code>ShortVec</code> (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3220">#3220</a>)</li>
</ul>
</li>
<li><code>icu_locid_transform</code>
<ul>
<li>The default set of likely subtags is now only the subset of languages that have a basic or greater CLDR coverage level; the full set is much larger in CLDR 43 and can be accessed via new constructors (<a href="https://redirect.github.com/unicode-org/icu4x/issues/3148">#3148</a>, <a href="https://redirect.github.com/unicode-org/icu4x/issues/3158">#3158</a>, <a href="https://redirect.github.com/unicode-org/icu4x/issues/3197">#3197</a>)</li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/unicode-org/icu4x/commits">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=writeable&package-manager=cargo&previous-version=0.5.1&new-version=0.5.2)](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>
2 years ago
|
|
|
writeable = { version = "0.5.2", optional = true }
|
|
|
|
yoke = { version = "0.7.1", optional = true }
|
|
|
|
zerofrom = { version = "0.1.2", optional = true }
|
|
|
|
sys-locale = { version = "0.3.0", optional = true }
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
criterion = "0.4.0"
|
|
|
|
float-cmp = "0.9.0"
|
|
|
|
indoc = "2.0.1"
|
|
|
|
textwrap = "0.16.0"
|
|
|
|
futures-lite = "1.13.0"
|
|
|
|
|
|
|
|
[target.x86_64-unknown-linux-gnu.dev-dependencies]
|
|
|
|
jemallocator = "0.5.0"
|
|
|
|
|
|
|
|
[lib]
|
|
|
|
crate-type = ["cdylib", "lib"]
|
|
|
|
name = "boa_engine"
|
|
|
|
bench = false
|
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
name = "full"
|
|
|
|
harness = false
|