summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-10-21 19:35:23 +0530
committerGitHub <noreply@github.com>2022-10-21 19:35:23 +0530
commit0f27b84a5caa10d9056b7a4f9eace3771f8ea114 (patch)
tree60c51b69e36f520d653185d5ce9769e5311ad111 /ext
parent659a918f39c516fe90cab25facb02325e5e72371 (diff)
chore(core): remove `core.opSync` (#16379)
This patch removes the last uses of `core.opSync` from Deno. The new and JIT-friendly way to call sync ops is `core.ops.op_name()`.
Diffstat (limited to 'ext')
-rw-r--r--ext/flash/01_http.js2
-rw-r--r--ext/node/02_require.js8
2 files changed, 4 insertions, 6 deletions
diff --git a/ext/flash/01_http.js b/ext/flash/01_http.js
index c7dce421d..547b6d42e 100644
--- a/ext/flash/01_http.js
+++ b/ext/flash/01_http.js
@@ -186,7 +186,7 @@
}
function prepareFastCalls() {
- return core.opSync("op_flash_make_request");
+ return core.ops.op_flash_make_request();
}
function hostnameForDisplay(hostname) {
diff --git a/ext/node/02_require.js b/ext/node/02_require.js
index 489c08779..c970d3994 100644
--- a/ext/node/02_require.js
+++ b/ext/node/02_require.js
@@ -351,8 +351,7 @@
}
}
- const isDenoDirPackage = Deno.core.opSync(
- "op_require_is_deno_dir_package",
+ const isDenoDirPackage = Deno.core.ops.op_require_is_deno_dir_package(
curPath,
);
const isRelative = ops.op_require_is_request_relative(
@@ -403,8 +402,7 @@
Module._resolveLookupPaths = function (request, parent) {
const paths = [];
if (parent?.filename && parent.filename.length > 0) {
- const denoDirPath = core.opSync(
- "op_require_resolve_deno_dir",
+ const denoDirPath = core.ops.op_require_resolve_deno_dir(
request,
parent.filename,
);
@@ -813,7 +811,7 @@
function createRequire(filenameOrUrl) {
// FIXME: handle URLs and validation
- const filename = core.opSync("op_require_as_file_path", filenameOrUrl);
+ const filename = core.ops.op_require_as_file_path(filenameOrUrl);
return createRequireFromPath(filename);
}