diff options
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/11_timers.js | 10 | ||||
-rw-r--r-- | runtime/js/11_workers.js | 12 | ||||
-rw-r--r-- | runtime/js/12_io.js | 8 | ||||
-rw-r--r-- | runtime/js/30_fs.js | 94 | ||||
-rw-r--r-- | runtime/js/30_metrics.js | 2 | ||||
-rw-r--r-- | runtime/js/30_net.js | 14 | ||||
-rw-r--r-- | runtime/js/30_os.js | 22 | ||||
-rw-r--r-- | runtime/js/40_compiler_api.js | 2 | ||||
-rw-r--r-- | runtime/js/40_error_stack.js | 4 | ||||
-rw-r--r-- | runtime/js/40_files.js | 8 | ||||
-rw-r--r-- | runtime/js/40_fs_events.js | 4 | ||||
-rw-r--r-- | runtime/js/40_http.js | 12 | ||||
-rw-r--r-- | runtime/js/40_permissions.js | 6 | ||||
-rw-r--r-- | runtime/js/40_plugins.js | 2 | ||||
-rw-r--r-- | runtime/js/40_process.js | 6 | ||||
-rw-r--r-- | runtime/js/40_signals.js | 6 | ||||
-rw-r--r-- | runtime/js/40_tls.js | 8 | ||||
-rw-r--r-- | runtime/js/40_tty.js | 6 | ||||
-rw-r--r-- | runtime/js/99_main.js | 6 |
19 files changed, 116 insertions, 116 deletions
diff --git a/runtime/js/11_timers.js b/runtime/js/11_timers.js index eef1d39b2..cfd9ad72d 100644 --- a/runtime/js/11_timers.js +++ b/runtime/js/11_timers.js @@ -6,23 +6,23 @@ const core = window.Deno.core; function opStopGlobalTimer() { - core.jsonOpSync("op_global_timer_stop"); + core.opSync("op_global_timer_stop"); } function opStartGlobalTimer(timeout) { - return core.jsonOpSync("op_global_timer_start", timeout); + return core.opSync("op_global_timer_start", timeout); } async function opWaitGlobalTimer() { - await core.jsonOpAsync("op_global_timer"); + await core.opAsync("op_global_timer"); } function opNow() { - return core.jsonOpSync("op_now"); + return core.opSync("op_now"); } function sleepSync(millis = 0) { - return core.jsonOpSync("op_sleep_sync", millis); + return core.opSync("op_sleep_sync", millis); } // Derived from https://github.com/vadimg/js_bintrees. MIT Licensed. diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index b11195713..2c602ab60 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -17,7 +17,7 @@ permissions, name, ) { - return core.jsonOpSync("op_create_worker", { + return core.opSync("op_create_worker", { hasSourceCode, name, permissions, @@ -28,15 +28,15 @@ } function hostTerminateWorker(id) { - core.jsonOpSync("op_host_terminate_worker", id); + core.opSync("op_host_terminate_worker", id); } function hostPostMessage(id, data) { - core.jsonOpSync("op_host_post_message", id, data); + core.opSync("op_host_post_message", id, data); } function hostGetMessage(id) { - return core.jsonOpAsync("op_host_get_message", id); + return core.opAsync("op_host_get_message", id); } const encoder = new TextEncoder(); @@ -268,7 +268,7 @@ if (globalThis instanceof Window) { throw new Error("Unhandled error event reached main worker."); } else { - core.jsonOpSync( + core.opSync( "op_host_unhandled_error", event.error.message, ); @@ -287,7 +287,7 @@ if (globalThis instanceof Window) { throw new Error("Unhandled error event reached main worker."); } else { - core.jsonOpSync( + core.opSync( "op_host_unhandled_error", event.error.message, ); diff --git a/runtime/js/12_io.js b/runtime/js/12_io.js index a6b6aeebd..8df3de92f 100644 --- a/runtime/js/12_io.js +++ b/runtime/js/12_io.js @@ -81,7 +81,7 @@ return 0; } - const nread = core.binOpSync("op_read_sync", rid, buffer); + const nread = core.opSync("op_read_sync", rid, buffer); return nread === 0 ? null : nread; } @@ -94,17 +94,17 @@ return 0; } - const nread = await core.binOpAsync("op_read_async", rid, buffer); + const nread = await core.opAsync("op_read_async", rid, buffer); return nread === 0 ? null : nread; } function writeSync(rid, data) { - return core.binOpSync("op_write_sync", rid, data); + return core.opSync("op_write_sync", rid, data); } async function write(rid, data) { - return await core.binOpAsync("op_write_async", rid, data); + return await core.opAsync("op_write_async", rid, data); } const READ_PER_ITER = 32 * 1024; diff --git a/runtime/js/30_fs.js b/runtime/js/30_fs.js index af2aebd3e..72126e6bb 100644 --- a/runtime/js/30_fs.js +++ b/runtime/js/30_fs.js @@ -7,11 +7,11 @@ const build = window.__bootstrap.build.build; function chmodSync(path, mode) { - core.jsonOpSync("op_chmod_sync", { path: pathFromURL(path), mode }); + core.opSync("op_chmod_sync", { path: pathFromURL(path), mode }); } async function chmod(path, mode) { - await core.jsonOpAsync("op_chmod_async", { path: pathFromURL(path), mode }); + await core.opAsync("op_chmod_async", { path: pathFromURL(path), mode }); } function chownSync( @@ -19,7 +19,7 @@ uid, gid, ) { - core.jsonOpSync("op_chown_sync", { path: pathFromURL(path), uid, gid }); + core.opSync("op_chown_sync", { path: pathFromURL(path), uid, gid }); } async function chown( @@ -27,7 +27,7 @@ uid, gid, ) { - await core.jsonOpAsync( + await core.opAsync( "op_chown_async", { path: pathFromURL(path), uid, gid }, ); @@ -37,7 +37,7 @@ fromPath, toPath, ) { - core.jsonOpSync("op_copy_file_sync", { + core.opSync("op_copy_file_sync", { from: pathFromURL(fromPath), to: pathFromURL(toPath), }); @@ -47,34 +47,34 @@ fromPath, toPath, ) { - await core.jsonOpAsync("op_copy_file_async", { + await core.opAsync("op_copy_file_async", { from: pathFromURL(fromPath), to: pathFromURL(toPath), }); } function cwd() { - return core.jsonOpSync("op_cwd"); + return core.opSync("op_cwd"); } function chdir(directory) { - core.jsonOpSync("op_chdir", directory); + core.opSync("op_chdir", directory); } function makeTempDirSync(options = {}) { - return core.jsonOpSync("op_make_temp_dir_sync", options); + return core.opSync("op_make_temp_dir_sync", options); } function makeTempDir(options = {}) { - return core.jsonOpAsync("op_make_temp_dir_async", options); + return core.opAsync("op_make_temp_dir_async", options); } function makeTempFileSync(options = {}) { - return core.jsonOpSync("op_make_temp_file_sync", options); + return core.opSync("op_make_temp_file_sync", options); } function makeTempFile(options = {}) { - return core.jsonOpAsync("op_make_temp_file_async", options); + return core.opAsync("op_make_temp_file_async", options); } function mkdirArgs(path, options) { @@ -91,24 +91,24 @@ } function mkdirSync(path, options) { - core.jsonOpSync("op_mkdir_sync", mkdirArgs(path, options)); + core.opSync("op_mkdir_sync", mkdirArgs(path, options)); } async function mkdir( path, options, ) { - await core.jsonOpAsync("op_mkdir_async", mkdirArgs(path, options)); + await core.opAsync("op_mkdir_async", mkdirArgs(path, options)); } function readDirSync(path) { - return core.jsonOpSync("op_read_dir_sync", pathFromURL(path))[ + return core.opSync("op_read_dir_sync", pathFromURL(path))[ Symbol.iterator ](); } function readDir(path) { - const array = core.jsonOpAsync( + const array = core.opAsync( "op_read_dir_async", pathFromURL(path), ); @@ -120,26 +120,26 @@ } function readLinkSync(path) { - return core.jsonOpSync("op_read_link_sync", pathFromURL(path)); + return core.opSync("op_read_link_sync", pathFromURL(path)); } function readLink(path) { - return core.jsonOpAsync("op_read_link_async", pathFromURL(path)); + return core.opAsync("op_read_link_async", pathFromURL(path)); } function realPathSync(path) { - return core.jsonOpSync("op_realpath_sync", path); + return core.opSync("op_realpath_sync", path); } function realPath(path) { - return core.jsonOpAsync("op_realpath_async", path); + return core.opAsync("op_realpath_async", path); } function removeSync( path, options = {}, ) { - core.jsonOpSync("op_remove_sync", { + core.opSync("op_remove_sync", { path: pathFromURL(path), recursive: !!options.recursive, }); @@ -149,18 +149,18 @@ path, options = {}, ) { - await core.jsonOpAsync("op_remove_async", { + await core.opAsync("op_remove_async", { path: pathFromURL(path), recursive: !!options.recursive, }); } function renameSync(oldpath, newpath) { - core.jsonOpSync("op_rename_sync", { oldpath, newpath }); + core.opSync("op_rename_sync", { oldpath, newpath }); } async function rename(oldpath, newpath) { - await core.jsonOpAsync("op_rename_async", { oldpath, newpath }); + await core.opAsync("op_rename_async", { oldpath, newpath }); } function parseFileInfo(response) { @@ -189,15 +189,15 @@ } function fstatSync(rid) { - return parseFileInfo(core.jsonOpSync("op_fstat_sync", rid)); + return parseFileInfo(core.opSync("op_fstat_sync", rid)); } async function fstat(rid) { - return parseFileInfo(await core.jsonOpAsync("op_fstat_async", rid)); + return parseFileInfo(await core.opAsync("op_fstat_async", rid)); } async function lstat(path) { - const res = await core.jsonOpAsync("op_stat_async", { + const res = await core.opAsync("op_stat_async", { path: pathFromURL(path), lstat: true, }); @@ -205,7 +205,7 @@ } function lstatSync(path) { - const res = core.jsonOpSync("op_stat_sync", { + const res = core.opSync("op_stat_sync", { path: pathFromURL(path), lstat: true, }); @@ -213,7 +213,7 @@ } async function stat(path) { - const res = await core.jsonOpAsync("op_stat_async", { + const res = await core.opAsync("op_stat_async", { path: pathFromURL(path), lstat: false, }); @@ -221,7 +221,7 @@ } function statSync(path) { - const res = core.jsonOpSync("op_stat_sync", { + const res = core.opSync("op_stat_sync", { path: pathFromURL(path), lstat: false, }); @@ -237,31 +237,31 @@ } function ftruncateSync(rid, len) { - core.jsonOpSync("op_ftruncate_sync", { rid, len: coerceLen(len) }); + core.opSync("op_ftruncate_sync", { rid, len: coerceLen(len) }); } async function ftruncate(rid, len) { - await core.jsonOpAsync("op_ftruncate_async", { rid, len: coerceLen(len) }); + await core.opAsync("op_ftruncate_async", { rid, len: coerceLen(len) }); } function truncateSync(path, len) { - core.jsonOpSync("op_truncate_sync", { path, len: coerceLen(len) }); + core.opSync("op_truncate_sync", { path, len: coerceLen(len) }); } async function truncate(path, len) { - await core.jsonOpAsync("op_truncate_async", { path, len: coerceLen(len) }); + await core.opAsync("op_truncate_async", { path, len: coerceLen(len) }); } function umask(mask) { - return core.jsonOpSync("op_umask", mask); + return core.opSync("op_umask", mask); } function linkSync(oldpath, newpath) { - core.jsonOpSync("op_link_sync", { oldpath, newpath }); + core.opSync("op_link_sync", { oldpath, newpath }); } async function link(oldpath, newpath) { - await core.jsonOpAsync("op_link_async", { oldpath, newpath }); + await core.opAsync("op_link_async", { oldpath, newpath }); } function toUnixTimeFromEpoch(value) { @@ -290,7 +290,7 @@ atime, mtime, ) { - core.jsonOpSync("op_futime_sync", { + core.opSync("op_futime_sync", { rid, atime: toUnixTimeFromEpoch(atime), mtime: toUnixTimeFromEpoch(mtime), @@ -302,7 +302,7 @@ atime, mtime, ) { - await core.jsonOpAsync("op_futime_async", { + await core.opAsync("op_futime_async", { rid, atime: toUnixTimeFromEpoch(atime), mtime: toUnixTimeFromEpoch(mtime), @@ -314,7 +314,7 @@ atime, mtime, ) { - core.jsonOpSync("op_utime_sync", { + core.opSync("op_utime_sync", { path, atime: toUnixTimeFromEpoch(atime), mtime: toUnixTimeFromEpoch(mtime), @@ -326,7 +326,7 @@ atime, mtime, ) { - await core.jsonOpAsync("op_utime_async", { + await core.opAsync("op_utime_async", { path, atime: toUnixTimeFromEpoch(atime), mtime: toUnixTimeFromEpoch(mtime), @@ -338,7 +338,7 @@ newpath, options, ) { - core.jsonOpSync("op_symlink_sync", { oldpath, newpath, options }); + core.opSync("op_symlink_sync", { oldpath, newpath, options }); } async function symlink( @@ -346,23 +346,23 @@ newpath, options, ) { - await core.jsonOpAsync("op_symlink_async", { oldpath, newpath, options }); + await core.opAsync("op_symlink_async", { oldpath, newpath, options }); } function fdatasyncSync(rid) { - core.jsonOpSync("op_fdatasync_sync", rid); + core.opSync("op_fdatasync_sync", rid); } async function fdatasync(rid) { - await core.jsonOpAsync("op_fdatasync_async", rid); + await core.opAsync("op_fdatasync_async", rid); } function fsyncSync(rid) { - core.jsonOpSync("op_fsync_sync", rid); + core.opSync("op_fsync_sync", rid); } async function fsync(rid) { - await core.jsonOpAsync("op_fsync_async", rid); + await core.opAsync("op_fsync_async", rid); } window.__bootstrap.fs = { diff --git a/runtime/js/30_metrics.js b/runtime/js/30_metrics.js index ed062fce3..ecc1cfc64 100644 --- a/runtime/js/30_metrics.js +++ b/runtime/js/30_metrics.js @@ -5,7 +5,7 @@ const core = window.Deno.core; function metrics() { - const { combined, ops } = core.jsonOpSync("op_metrics"); + const { combined, ops } = core.opSync("op_metrics"); if (ops) { combined.ops = ops; } diff --git a/runtime/js/30_net.js b/runtime/js/30_net.js index 56fb94f26..2d4b1e48e 100644 --- a/runtime/js/30_net.js +++ b/runtime/js/30_net.js @@ -7,23 +7,23 @@ const { read, write } = window.__bootstrap.io; function shutdown(rid) { - return core.jsonOpAsync("op_shutdown", rid); + return core.opAsync("op_shutdown", rid); } function opAccept(rid, transport) { - return core.jsonOpAsync("op_accept", { rid, transport }); + return core.opAsync("op_accept", { rid, transport }); } function opListen(args) { - return core.jsonOpSync("op_listen", args); + return core.opSync("op_listen", args); } function opConnect(args) { - return core.jsonOpAsync("op_connect", args); + return core.opAsync("op_connect", args); } function opReceive(rid, transport, zeroCopy) { - return core.jsonOpAsync( + return core.opAsync( "op_datagram_receive", { rid, transport }, zeroCopy, @@ -31,11 +31,11 @@ } function opSend(args, zeroCopy) { - return core.jsonOpAsync("op_datagram_send", args, zeroCopy); + return core.opAsync("op_datagram_send", args, zeroCopy); } function resolveDns(query, recordType, options) { - return core.jsonOpAsync("op_dns_resolve", { query, recordType, options }); + return core.opAsync("op_dns_resolve", { query, recordType, options }); } class Conn { diff --git a/runtime/js/30_os.js b/runtime/js/30_os.js index 0ce831775..2d11d6fde 100644 --- a/runtime/js/30_os.js +++ b/runtime/js/30_os.js @@ -5,23 +5,23 @@ const core = window.Deno.core; function loadavg() { - return core.jsonOpSync("op_loadavg"); + return core.opSync("op_loadavg"); } function hostname() { - return core.jsonOpSync("op_hostname"); + return core.opSync("op_hostname"); } function osRelease() { - return core.jsonOpSync("op_os_release"); + return core.opSync("op_os_release"); } function systemMemoryInfo() { - return core.jsonOpSync("op_system_memory_info"); + return core.opSync("op_system_memory_info"); } function systemCpuInfo() { - const { cores, speed } = core.jsonOpSync("op_system_cpu_info"); + const { cores, speed } = core.opSync("op_system_cpu_info"); // Map nulls to undefined for compatibility return { cores: cores ?? undefined, @@ -49,33 +49,33 @@ return; } - core.jsonOpSync("op_exit", code); + core.opSync("op_exit", code); throw new Error("Code not reachable"); } function setEnv(key, value) { - core.jsonOpSync("op_set_env", { key, value }); + core.opSync("op_set_env", { key, value }); } function getEnv(key) { - return core.jsonOpSync("op_get_env", key) ?? undefined; + return core.opSync("op_get_env", key) ?? undefined; } function deleteEnv(key) { - core.jsonOpSync("op_delete_env", key); + core.opSync("op_delete_env", key); } const env = { get: getEnv, toObject() { - return core.jsonOpSync("op_env"); + return core.opSync("op_env"); }, set: setEnv, delete: deleteEnv, }; function execPath() { - return core.jsonOpSync("op_exec_path"); + return core.opSync("op_exec_path"); } window.__bootstrap.os = { diff --git a/runtime/js/40_compiler_api.js b/runtime/js/40_compiler_api.js index cce12f2f8..b30ffc5d5 100644 --- a/runtime/js/40_compiler_api.js +++ b/runtime/js/40_compiler_api.js @@ -39,7 +39,7 @@ * @returns {Promise<OpEmitResponse>} */ function opEmit(request) { - return core.jsonOpAsync("op_emit", request); + return core.opAsync("op_emit", request); } /** diff --git a/runtime/js/40_error_stack.js b/runtime/js/40_error_stack.js index 9bc6567a0..e73975044 100644 --- a/runtime/js/40_error_stack.js +++ b/runtime/js/40_error_stack.js @@ -5,11 +5,11 @@ const core = window.Deno.core; function opFormatDiagnostics(diagnostics) { - return core.jsonOpSync("op_format_diagnostic", diagnostics); + return core.opSync("op_format_diagnostic", diagnostics); } function opApplySourceMap(location) { - const res = core.jsonOpSync("op_apply_source_map", location); + const res = core.opSync("op_apply_source_map", location); return { fileName: res.fileName, lineNumber: res.lineNumber, diff --git a/runtime/js/40_files.js b/runtime/js/40_files.js index d552b4ba5..82cf19ffc 100644 --- a/runtime/js/40_files.js +++ b/runtime/js/40_files.js @@ -12,7 +12,7 @@ offset, whence, ) { - return core.jsonOpSync("op_seek_sync", { rid, offset, whence }); + return core.opSync("op_seek_sync", { rid, offset, whence }); } function seek( @@ -20,7 +20,7 @@ offset, whence, ) { - return core.jsonOpAsync("op_seek_async", { rid, offset, whence }); + return core.opAsync("op_seek_async", { rid, offset, whence }); } function openSync( @@ -29,7 +29,7 @@ ) { checkOpenOptions(options); const mode = options?.mode; - const rid = core.jsonOpSync( + const rid = core.opSync( "op_open_sync", { path: pathFromURL(path), options, mode }, ); @@ -43,7 +43,7 @@ ) { checkOpenOptions(options); const mode = options?.mode; - const rid = await core.jsonOpAsync( + const rid = await core.opAsync( "op_open_async", { path: pathFromURL(path), options, mode }, ); diff --git a/runtime/js/40_fs_events.js b/runtime/js/40_fs_events.js index 06ad3a29c..a1a9877b4 100644 --- a/runtime/js/40_fs_events.js +++ b/runtime/js/40_fs_events.js @@ -10,7 +10,7 @@ constructor(paths, options) { const { recursive } = options; - this.#rid = core.jsonOpSync("op_fs_events_open", { recursive, paths }); + this.#rid = core.opSync("op_fs_events_open", { recursive, paths }); } get rid() { @@ -19,7 +19,7 @@ async next() { try { - const value = await core.jsonOpAsync("op_fs_events_poll", this.rid); + const value = await core.opAsync("op_fs_events_poll", this.rid); return value ? { value, done: false } : { value: undefined, done: true }; diff --git a/runtime/js/40_http.js b/runtime/js/40_http.js index d9dff7b52..4a2dcdf4a 100644 --- a/runtime/js/40_http.js +++ b/runtime/js/40_http.js @@ -10,7 +10,7 @@ const { ReadableStream } = window.__bootstrap.streams; function serveHttp(conn) { - const rid = Deno.core.jsonOpSync("op_http_start", conn.rid); + const rid = Deno.core.opSync("op_http_start", conn.rid); return new HttpConn(rid); } @@ -30,7 +30,7 @@ async nextRequest() { let nextRequest; try { - nextRequest = await Deno.core.jsonOpAsync( + nextRequest = await Deno.core.opAsync( "op_http_request_next", this.#rid, ); @@ -88,7 +88,7 @@ } function readRequest(requestRid, zeroCopyBuf) { - return Deno.core.jsonOpAsync( + return Deno.core.opAsync( "op_http_request_read", requestRid, zeroCopyBuf, @@ -129,7 +129,7 @@ zeroCopyBuf = null; } - const responseBodyRid = Deno.core.jsonOpSync("op_http_response", [ + const responseBodyRid = Deno.core.opSync("op_http_response", [ responseSenderRid, resp.status ?? 200, flattenHeaders(resp.headers), @@ -149,7 +149,7 @@ chunk.byteOffset, chunk.byteLength, ); - await Deno.core.jsonOpAsync( + await Deno.core.opAsync( "op_http_response_write", responseBodyRid, data, @@ -158,7 +158,7 @@ // Once all chunks are sent, and the request body is closed, we can close // the response body. - await Deno.core.jsonOpAsync("op_http_response_close", responseBodyRid); + await Deno.core.opAsync("op_http_response_close", responseBodyRid); } }; } diff --git a/runtime/js/40_permissions.js b/runtime/js/40_permissions.js index 7a81ca425..dd4ce5533 100644 --- a/runtime/js/40_permissions.js +++ b/runtime/js/40_permissions.js @@ -31,7 +31,7 @@ * @returns {Deno.PermissionState} */ function opQuery(desc) { - return core.jsonOpSync("op_query_permission", desc); + return core.opSync("op_query_permission", desc); } /** @@ -39,7 +39,7 @@ * @returns {Deno.PermissionState} */ function opRevoke(desc) { - return core.jsonOpSync("op_revoke_permission", desc); + return core.opSync("op_revoke_permission", desc); } /** @@ -47,7 +47,7 @@ * @returns {Deno.PermissionState} */ function opRequest(desc) { - return core.jsonOpSync("op_request_permission", desc); + return core.opSync("op_request_permission", desc); } class PermissionStatus extends EventTarget { diff --git a/runtime/js/40_plugins.js b/runtime/js/40_plugins.js index 5ebcfddad..e9a3142b4 100644 --- a/runtime/js/40_plugins.js +++ b/runtime/js/40_plugins.js @@ -5,7 +5,7 @@ const core = window.Deno.core; function openPlugin(filename) { - return core.jsonOpSync("op_open_plugin", filename); + return core.opSync("op_open_plugin", filename); } window.__bootstrap.plugins = { diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index a93818b95..91e37701a 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -8,16 +8,16 @@ const { assert, pathFromURL } = window.__bootstrap.util; function opKill(pid, signo) { - core.jsonOpSync("op_kill", { pid, signo }); + core.opSync("op_kill", { pid, signo }); } function opRunStatus(rid) { - return core.jsonOpAsync("op_run_status", rid); + return core.opAsync("op_run_status", rid); } function opRun(request) { assert(request.cmd.length > 0); - return core.jsonOpSync("op_run", request); + return core.opSync("op_run", request); } async function runStatus(rid) { diff --git a/runtime/js/40_signals.js b/runtime/js/40_signals.js index e222a9199..dfc604759 100644 --- a/runtime/js/40_signals.js +++ b/runtime/js/40_signals.js @@ -7,15 +7,15 @@ const { errors } = window.__bootstrap.errors; function bindSignal(signo) { - return core.jsonOpSync("op_signal_bind", signo); + return core.opSync("op_signal_bind", signo); } function pollSignal(rid) { - return core.jsonOpAsync("op_signal_poll", rid); + return core.opAsync("op_signal_poll", rid); } function unbindSignal(rid) { - core.jsonOpSync("op_signal_unbind", rid); + core.opSync("op_signal_unbind", rid); } // From `kill -l` diff --git a/runtime/js/40_tls.js b/runtime/js/40_tls.js index e11754b0d..4fafe9079 100644 --- a/runtime/js/40_tls.js +++ b/runtime/js/40_tls.js @@ -8,19 +8,19 @@ function opConnectTls( args, ) { - return core.jsonOpAsync("op_connect_tls", args); + return core.opAsync("op_connect_tls", args); } function opAcceptTLS(rid) { - return core.jsonOpAsync("op_accept_tls", rid); + return core.opAsync("op_accept_tls", rid); } function opListenTls(args) { - return core.jsonOpSync("op_listen_tls", args); + return core.opSync("op_listen_tls", args); } function opStartTls(args) { - return core.jsonOpAsync("op_start_tls", args); + return core.opAsync("op_start_tls", args); } async function connectTls({ diff --git a/runtime/js/40_tty.js b/runtime/js/40_tty.js index 9b23b1ec1..e76d7d90e 100644 --- a/runtime/js/40_tty.js +++ b/runtime/js/40_tty.js @@ -5,11 +5,11 @@ const core = window.Deno.core; function consoleSize(rid) { - return core.jsonOpSync("op_console_size", rid); + return core.opSync("op_console_size", rid); } function isatty(rid) { - return core.jsonOpSync("op_isatty", rid); + return core.opSync("op_isatty", rid); } const DEFAULT_SET_RAW_OPTIONS = { @@ -18,7 +18,7 @@ function setRaw(rid, mode, options = {}) { const rOptions = { ...DEFAULT_SET_RAW_OPTIONS, ...options }; - core.jsonOpSync("op_set_raw", { rid, mode, options: rOptions }); + core.opSync("op_set_raw", { rid, mode, options: rOptions }); } window.__bootstrap.tty = { diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 7f24e10cd..977755007 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -129,15 +129,15 @@ delete Object.prototype.__proto__; } function opPostMessage(data) { - core.jsonOpSync("op_worker_post_message", null, data); + core.opSync("op_worker_post_message", null, data); } function opCloseWorker() { - core.jsonOpSync("op_worker_close"); + core.opSync("op_worker_close"); } function opMainModule() { - return core.jsonOpSync("op_main_module"); + return core.opSync("op_main_module"); } function runtimeStart(runtimeOptions, source) { |