Skip to content

Commit d3aa12e

Browse files
authored
Merge branch 'main' into feat/res2
2 parents 92b7fa0 + baaadfe commit d3aa12e

File tree

14 files changed

+264
-427
lines changed

14 files changed

+264
-427
lines changed

.github/workflows/rust.yml

Lines changed: 211 additions & 111 deletions
Large diffs are not rendered by default.

Cargo.lock

Lines changed: 9 additions & 295 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ phf = { version = "0.13.1", default-features = false }
7575
pollster = "0.4.0"
7676
regex = "1.12.3"
7777
regress = { version = "0.11.0", features = ["utf16"] }
78-
reqwest = { version = "0.13.2" }
78+
reqwest = { version = "0.13.2", default-features = false, features = ["rustls-no-provider"] }
79+
rustls = { version = "0.23.37", default-features = false, features = ["ring"] }
7980
rustc-hash = { version = "2.1.1", default-features = false }
8081
serde_json = "1.0.149"
8182
serde = "1.0.219"
@@ -144,6 +145,7 @@ aligned-vec = "0.6.4"
144145
temp-env = "0.3.6"
145146
strum = { version = "0.28", features = ["derive"] }
146147
husky-rs = "0.3.2"
148+
async-channel = "2.5.0"
147149

148150
# ICU4X
149151

cli/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ color-eyre.workspace = true
2727
cow-utils.workspace = true
2828
futures-concurrency.workspace = true
2929
futures-lite.workspace = true
30-
async-channel = "2.5.0"
30+
async-channel.workspace = true
31+
rustls.workspace = true
3132

3233
[features]
3334
default = [

cli/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,10 @@ fn main() -> Result<()> {
530530
.display_env_section(false)
531531
.install()?;
532532

533+
rustls::crypto::ring::default_provider()
534+
.install_default()
535+
.map_err(|_| eyre!("could not install ring as the default crypto provider"))?;
536+
533537
#[cfg(feature = "dhat")]
534538
let _profiler = dhat::Profiler::new_heap();
535539

core/engine/src/vm/call_frame/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ impl JsValue {
256256
0 => return GeneratorResumeKind::Normal,
257257
1 => return GeneratorResumeKind::Throw,
258258
2 => return GeneratorResumeKind::Return,
259-
_ => unreachable!("generator kind must be a integer between 1..=2, got {value}"),
259+
_ => unreachable!("generator kind must be an integer between 1..=2, got {value}"),
260260
}
261261
}
262262

263-
unreachable!("generator kind must be a integer type")
263+
unreachable!("generator kind must be an integer type")
264264
}
265265
}

core/engine/src/vm/runtime_limits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl Default for RuntimeLimits {
2929
impl RuntimeLimits {
3030
/// Return the loop iteration limit.
3131
///
32-
/// If the limit is exceeded in a loop it will throw and error.
32+
/// If the limit is exceeded in a loop it will throw an error.
3333
///
3434
/// The limit value [`u64::MAX`] means that there is no limit.
3535
#[inline]
@@ -40,7 +40,7 @@ impl RuntimeLimits {
4040

4141
/// Set the loop iteration limit.
4242
///
43-
/// If the limit is exceeded in a loop it will throw and error.
43+
/// If the limit is exceeded in a loop it will throw an error.
4444
///
4545
/// Setting the limit to [`u64::MAX`] means that there is no limit.
4646
#[inline]

core/gc/src/test/mod.rs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,42 @@ struct Harness;
1212
impl Harness {
1313
#[track_caller]
1414
fn assert_collections(o: usize) {
15-
BOA_GC.with(|current| {
15+
let collections = BOA_GC.with(|current| {
1616
let gc = current.borrow();
17-
assert_eq!(gc.runtime.collections, o);
17+
gc.runtime.collections
1818
});
19+
20+
assert_eq!(collections, o);
1921
}
2022

2123
#[track_caller]
2224
fn assert_empty_gc() {
23-
BOA_GC.with(|current| {
25+
let (is_empty, bytes_allocated) = BOA_GC.with(|current| {
2426
let gc = current.borrow();
25-
26-
assert!(gc.strongs.is_empty());
27-
assert!(gc.runtime.bytes_allocated == 0);
27+
(gc.strongs.is_empty(), gc.runtime.bytes_allocated)
2828
});
29+
30+
assert!(is_empty);
31+
assert_eq!(bytes_allocated, 0);
2932
}
3033

3134
#[track_caller]
3235
fn assert_bytes_allocated() {
33-
BOA_GC.with(|current| {
36+
let bytes_allocated = BOA_GC.with(|current| {
3437
let gc = current.borrow();
35-
assert!(gc.runtime.bytes_allocated > 0);
38+
gc.runtime.bytes_allocated
3639
});
40+
41+
assert!(bytes_allocated > 0);
3742
}
3843

3944
#[track_caller]
4045
fn assert_exact_bytes_allocated(bytes: usize) {
41-
BOA_GC.with(|current| {
46+
let bytes_allocated = BOA_GC.with(|current| {
4247
let gc = current.borrow();
43-
assert_eq!(gc.runtime.bytes_allocated, bytes);
48+
gc.runtime.bytes_allocated
4449
});
50+
assert_eq!(bytes_allocated, bytes);
4551
}
4652
}
4753

core/gc/src/test/weak.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,13 @@ mod miri {
161161
Harness::assert_exact_bytes_allocated(root_size);
162162

163163
{
164+
let eph_size = size_of::<EphemeronBox<InnerCell, TestCell>>();
164165
// Generate a self-referential ephemeron
165166
let eph = Ephemeron::new(&root.inner, root.clone());
166167
*root.inner.inner.borrow_mut() = Some(eph.clone());
167168

168169
assert!(eph.value().is_some());
169-
Harness::assert_exact_bytes_allocated(56);
170+
Harness::assert_exact_bytes_allocated(root_size + eph_size);
170171
}
171172

172173
*root.inner.inner.borrow_mut() = None;
@@ -190,8 +191,10 @@ mod miri {
190191
Harness::assert_exact_bytes_allocated(root_size);
191192

192193
let watched = Gc::new(0);
194+
let watched_size = size_of::<GcBox<u8>>();
193195

194196
{
197+
let eph_size = size_of::<EphemeronBox<u8, TestCell>>();
195198
// Generate a self-referential loop of weak and non-weak pointers
196199
let chain1 = TestCell {
197200
inner: Gc::new(GcRefCell::new(None)),
@@ -212,7 +215,7 @@ mod miri {
212215

213216
assert!(eph_start.value().is_some());
214217
assert!(eph_chain2.value().is_some());
215-
Harness::assert_exact_bytes_allocated(168);
218+
Harness::assert_exact_bytes_allocated(watched_size + 3 * root_size + 2 * eph_size);
216219
}
217220

218221
*root.borrow_mut() = None;

core/parser/src/parser/statement/declaration/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! - [ECMAScript specification][spec]
66
//!
77
//! [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements#Declarations
8-
//! [spec]:https://tc39.es/ecma262/#sec-declarations-and-the-variable-statement
8+
//! [spec]: https://tc39.es/ecma262/#sec-declarations-and-the-variable-statement
99
1010
mod export;
1111
mod hoistable;

0 commit comments

Comments
 (0)