From bb1f5e4262940a966e6314f57a4267514911d262 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sun, 30 Apr 2023 10:50:24 +0200 Subject: perf(core): async op pseudo-codegen and performance work (#18887) Performance: ``` async_ops.js: 760k -> 1030k (!) async_ops_deferred.js: 730k -> 770k Deno.serve bench: 118k -> 124k WS test w/ third_party/prebuilt/mac/load_test 100 localhost 8000 0 0: unchanged Startup time: approx 0.5ms slower (13.7 -> 14.2ms) ``` --- core/runtime.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'core/runtime.rs') diff --git a/core/runtime.rs b/core/runtime.rs index d88ddccac..e6c365e42 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -3737,21 +3737,6 @@ assertEquals(1, notify_return_value); }) } - #[test] - fn test_core_js_stack_frame() { - let mut runtime = JsRuntime::new(RuntimeOptions::default()); - // Call non-existent op so we get error from `core.js` - let error = runtime - .execute_script_static( - "core_js_stack_frame.js", - "Deno.core.opAsync('non_existent');", - ) - .unwrap_err(); - let error_string = error.to_string(); - // Test that the script specifier is a URL: `ext:`. - assert!(error_string.contains("ext:core/01_core.js")); - } - #[test] fn test_v8_platform() { let options = RuntimeOptions { @@ -4721,21 +4706,6 @@ Deno.core.opAsync("op_async_serialize_object_with_numbers_as_keys", { .is_ok()); } - #[test] - fn test_non_existent_async_op_error() { - // Verify that "resizable ArrayBuffer" is disabled - let mut runtime = JsRuntime::new(Default::default()); - let err = runtime - .execute_script_static( - "test_rab.js", - r#"Deno.core.opAsync("this_op_doesnt_exist");"#, - ) - .unwrap_err(); - assert!(err - .to_string() - .contains("this_op_doesnt_exist is not a registered op")); - } - #[tokio::test] async fn cant_load_internal_module_when_snapshot_is_loaded_and_not_snapshotting( ) { -- cgit v1.2.3