From 56f58a047e3c1cc27ff55988f25173cc18ef6aeb Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sun, 4 Feb 2024 17:03:14 -0700 Subject: chore: bump deno core (#22243) Migrations: - Error registration no longer required for Interrupted or BadResource (these are core exception) - `include_js_files!`/`ExtensionFileSource` changes --- bench_util/benches/utf8.rs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'bench_util') diff --git a/bench_util/benches/utf8.rs b/bench_util/benches/utf8.rs index 783983dcb..48af4dba7 100644 --- a/bench_util/benches/utf8.rs +++ b/bench_util/benches/utf8.rs @@ -6,27 +6,23 @@ use deno_bench_util::bencher::benchmark_group; use deno_bench_util::bencher::Bencher; use deno_bench_util::BenchOptions; use deno_core::Extension; -use deno_core::ExtensionFileSource; -use deno_core::ExtensionFileSourceCode; fn setup() -> Vec { - vec![Extension { - name: "bench_setup", - js_files: std::borrow::Cow::Borrowed(&[ExtensionFileSource { - specifier: "ext:bench_setup/setup.js", - code: ExtensionFileSourceCode::IncludedInBinary( - r#" + deno_core::extension!( + bench_setup, + js = ["ext:bench_setup/setup.js" = { + source = r#" const hello = "hello world\n"; const hello1k = hello.repeat(1e3); const hello1m = hello.repeat(1e6); const helloEncoded = Deno.core.encode(hello); const hello1kEncoded = Deno.core.encode(hello1k); const hello1mEncoded = Deno.core.encode(hello1m); - "#, - ), - }]), - ..Default::default() - }] + "# + }] + ); + + vec![bench_setup::init_ops_and_esm()] } fn bench_utf8_encode_12_b(b: &mut Bencher) { -- cgit v1.2.3