summaryrefslogtreecommitdiff
path: root/runtime/js/90_deno_ns.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/90_deno_ns.js')
-rw-r--r--runtime/js/90_deno_ns.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index 4c0806f8e..e196fd104 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -1,7 +1,11 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { core } from "ext:core/mod.js";
-const ops = core.ops;
+const {
+ op_net_listen_udp,
+ op_net_listen_unixpacket,
+ op_runtime_memory_usage,
+} = core.ensureFastOps();
import * as timers from "ext:deno_web/02_timers.js";
import * as httpClient from "ext:deno_fetch/22_http_client.js";
@@ -50,7 +54,7 @@ const denoNs = {
makeTempDir: fs.makeTempDir,
makeTempFileSync: fs.makeTempFileSync,
makeTempFile: fs.makeTempFile,
- memoryUsage: () => ops.op_runtime_memory_usage(),
+ memoryUsage: () => op_runtime_memory_usage(),
mkdirSync: fs.mkdirSync,
mkdir: fs.mkdir,
chdir: fs.chdir,
@@ -210,8 +214,8 @@ denoNsUnstableById[unstableIds.kv] = {
denoNsUnstableById[unstableIds.net] = {
listenDatagram: net.createListenDatagram(
- ops.op_net_listen_udp,
- ops.op_net_listen_unixpacket,
+ op_net_listen_udp,
+ op_net_listen_unixpacket,
),
};
@@ -224,8 +228,8 @@ denoNsUnstableById[unstableIds.net] = {
// when editing this list, also update unstableDenoProps in cli/tsc/99_main_compiler.js
const denoNsUnstable = {
listenDatagram: net.createListenDatagram(
- ops.op_net_listen_udp,
- ops.op_net_listen_unixpacket,
+ op_net_listen_udp,
+ op_net_listen_unixpacket,
),
umask: fs.umask,
HttpClient: httpClient.HttpClient,