|
|
|
[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 = [
|
|
|
|
"dep:boa_icu_provider",
|
|
|
|
"dep:icu_locid_transform",
|
|
|
|
"dep:icu_locid",
|
|
|
|
"dep:icu_datetime",
|
|
|
|
"dep:icu_plurals",
|
|
|
|
"dep:icu_provider",
|
|
|
|
"dep:icu_calendar",
|
|
|
|
"dep:icu_collator",
|
|
|
|
"dep:icu_list",
|
|
|
|
"dep:writeable",
|
|
|
|
"dep:sys-locale",
|
|
|
|
]
|
|
|
|
|
|
|
|
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 WHATWG console object implementation.
|
|
|
|
console = []
|
|
|
|
|
|
|
|
# Enable Boa's additional ECMAScript features for web browsers.
|
|
|
|
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
|
|
|
|
serde = { version = "1.0.159", features = ["derive", "rc"] }
|
|
|
|
serde_json = "1.0.95"
|
|
|
|
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.5.0"
|
|
|
|
rustc-hash = "1.1.0"
|
|
|
|
num-bigint = { version = "0.4.3", features = ["serde"] }
|
|
|
|
num-integer = "0.1.45"
|
|
|
|
bitflags = "2.0.2"
|
|
|
|
indexmap = "1.9.3"
|
|
|
|
ryu-js = "0.2.2"
|
Bump chrono from 0.4.23 to 0.4.24 (#2653)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.23 to 0.4.24.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/chronotope/chrono/releases">chrono's releases</a>.</em></p>
<blockquote>
<h2>0.4.24</h2>
<p>This is a small maintenance release with accumulated fixes and improvements.</p>
<ul>
<li>Fix doc on <code>Days::new()</code> to refer to days, not months (<a href="https://redirect.github.com/chronotope/chrono/issues/874">#874</a>, thanks to <a href="https://github.com/brotskydotcom"><code>@brotskydotcom</code></a>)</li>
<li>Clarify out of range value for <code>from_timestamp_opt()</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/879">#879</a>, thanks to <a href="https://github.com/xmo-odoo"><code>@xmo-odoo</code></a>)</li>
<li>Add <code>format_localized()</code> for <code>NaiveDate</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/881">#881</a>, thanks to <a href="https://github.com/mseele"><code>@mseele</code></a>)</li>
<li>Fix bug in <code>Add</code>/<code>Sub</code> <code>Days</code>, add tests with DST timezone (<a href="https://redirect.github.com/chronotope/chrono/issues/878">#878</a>)</li>
<li>Make <code>NaiveTime::MIN</code> public (<a href="https://redirect.github.com/chronotope/chrono/issues/890">#890</a>)</li>
<li>Fix <code>from_timestamp_millis()</code> implementation and add more tests (<a href="https://redirect.github.com/chronotope/chrono/issues/885">#885</a>)</li>
<li>Fix typo in docstrings (<a href="https://redirect.github.com/chronotope/chrono/issues/897">#897</a>, thanks to <a href="https://github.com/dandxy89"><code>@dandxy89</code></a>)</li>
<li>Add test proving that <a href="https://redirect.github.com/chronotope/chrono/issues/903">#903</a> is fixed in 0.4.x head (<a href="https://redirect.github.com/chronotope/chrono/issues/905">#905</a>, thanks to <a href="https://github.com/umanwizard"><code>@umanwizard</code></a>)</li>
<li>Add <code>from_timestamp_micros()</code> function (<a href="https://redirect.github.com/chronotope/chrono/issues/906">#906</a>, thanks to <a href="https://github.com/umanwizard"><code>@umanwizard</code></a>)</li>
<li>Check cargo-deny in CI (<a href="https://redirect.github.com/chronotope/chrono/issues/909">#909</a>)</li>
<li>Derive <code>Hash</code> for most pub types that also derive <code>PartialEq</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/938">#938</a>, thanks to <a href="https://github.com/bruceg"><code>@bruceg</code></a>)</li>
<li>Update deprecated methods in <code>from_utc()</code> example (<a href="https://redirect.github.com/chronotope/chrono/issues/939">#939</a>, thanks to <a href="https://github.com/greg-el"><code>@greg-el</code></a>)</li>
<li>Fix panic in <code>DateTime::checked_add_days()</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/942">#942</a>, thanks to <a href="https://github.com/Ekleog"><code>@Ekleog</code></a>)</li>
<li>More documentation for dates before 1 BCE or after 9999 CE (<a href="https://redirect.github.com/chronotope/chrono/issues/950">#950</a>, thanks to <a href="https://github.com/cgit"><code>@cgit</code></a>)</li>
<li>Improve <code>FixedOffset</code> docs (<a href="https://redirect.github.com/chronotope/chrono/issues/953">#953</a>, thanks to <a href="https://github.com/klnusbaum"><code>@klnusbaum</code></a>)</li>
<li>Add chrono-fuzz to CI and update its libfuzzer-sys dependency (<a href="https://redirect.github.com/chronotope/chrono/issues/968">#968</a>, thanks to <a href="https://github.com/LingMan"><code>@LingMan</code></a>)</li>
<li>Fixes to parsing and calculation of week numbers (<a href="https://redirect.github.com/chronotope/chrono/issues/966">#966</a>, thanks to <a href="https://github.com/raphaelroosz"><code>@raphaelroosz</code></a>)</li>
<li>Make iana-time-zone a target specific dependency (<a href="https://redirect.github.com/chronotope/chrono/issues/980">#980</a>, thanks to <a href="https://github.com/krtab"><code>@krtab</code></a>)</li>
<li>Make eligible functions <code>const</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/984">#984</a>, thanks to <a href="https://github.com/tormeh"><code>@tormeh</code></a>)</li>
</ul>
<p>Thanks to all contributors from the chrono team, <a href="https://github.com/esheppa"><code>@esheppa</code></a> and <a href="https://github.com/djc"><code>@djc</code></a>.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/chronotope/chrono/commit/daa86a77d36d74f474913fd3b560a40f1424bd77"><code>daa86a7</code></a> Check benchmarks in CI</li>
<li><a href="https://github.com/chronotope/chrono/commit/b1e0963efc9544dee9e5b708e3abfea3e7eaa3d9"><code>b1e0963</code></a> Bump rust-cache action to v2</li>
<li><a href="https://github.com/chronotope/chrono/commit/64c5d7793a1a3e6ccbb2acc606b85f95830b7f83"><code>64c5d77</code></a> Bump version to 0.4.24</li>
<li><a href="https://github.com/chronotope/chrono/commit/f5c5ac452dc7095c6acec12a7e5278194132bc06"><code>f5c5ac4</code></a> Make eligible functions const.</li>
<li><a href="https://github.com/chronotope/chrono/commit/fb2f2596f56b690ddd5fc5e473fc8380418802a8"><code>fb2f259</code></a> Make iana-time-zone a target specific dependency</li>
<li><a href="https://github.com/chronotope/chrono/commit/cf2a2f95f7030860b0eda2b78eff968f1d7b4228"><code>cf2a2f9</code></a> factor calculations to weeks_from function and add tests</li>
<li><a href="https://github.com/chronotope/chrono/commit/8197700ccdbb77a355e47ef8f4d9720ef41ff564"><code>8197700</code></a> apply same fix to parsing and add failing test cases as per issue <a href="https://redirect.github.com/chronotope/chrono/issues/961">#961</a></li>
<li><a href="https://github.com/chronotope/chrono/commit/a9b1ec412a6224020a2e9664a45974dcf71fdace"><code>a9b1ec4</code></a> fix ordinal week calculation</li>
<li><a href="https://github.com/chronotope/chrono/commit/f9f3c7857d31c1c2341a1ddee0e9447f81a61465"><code>f9f3c78</code></a> Fix panic in DateTime::checked_add_days</li>
<li><a href="https://github.com/chronotope/chrono/commit/cd0e3b008c1ea5c6835709ff72a1b76209f3831b"><code>cd0e3b0</code></a> chrono-fuzz: Update libfuzzer-sys dependency from 0.3 to 0.4</li>
<li>Additional commits viewable in <a href="https://github.com/chronotope/chrono/compare/v0.4.23...v0.4.24">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=chrono&package-manager=cargo&previous-version=0.4.23&new-version=0.4.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>
2 years ago
|
|
|
chrono = { version = "0.4.24", default-features = false, features = ["clock", "std", "wasmbind"] }
|
|
|
|
fast-float = "0.2.0"
|
|
|
|
unicode-normalization = "0.1.22"
|
|
|
|
once_cell = "1.17.1"
|
|
|
|
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.0"
|
|
|
|
pollster = "0.3.0"
|
|
|
|
thin-vec = "0.2.12"
|
|
|
|
|
|
|
|
# intl deps
|
|
|
|
boa_icu_provider = { workspace = true, optional = true }
|
|
|
|
icu_locid_transform = { version = "1.1.0", features = ["serde"], optional = true }
|
|
|
|
icu_locid = { version = "1.1.0", features = ["serde"], optional = true }
|
|
|
|
icu_datetime = { version = "1.1.0", features = ["serde", "experimental"], optional = true }
|
|
|
|
icu_calendar = { version = "1.1.0", optional = true }
|
|
|
|
icu_collator = { version = "1.1.0", features = ["serde"], optional = true }
|
|
|
|
icu_plurals = { version = "1.1.0", features = ["serde"], optional = true }
|
|
|
|
icu_provider = { version = "1.1.0", optional = true }
|
|
|
|
icu_list = { version = "1.1.0", features = ["serde"], optional = true }
|
|
|
|
writeable = { version = "0.5.1", 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"
|
|
|
|
|
|
|
|
[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
|