diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-08-24 15:02:42 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-08-24 06:02:42 -0700 |
commit | 79f82cf10ed1dbf91346994250d7311a4d74377a (patch) | |
tree | b00755d666198b9c66264a3c240f849096951e2f /js/dispatch.ts | |
parent | 5b2baa5c990fbeae747e952c5dcd7a5369e950b1 (diff) |
port ops to JSON: compiler, errors, fetch, files (#2804)
Diffstat (limited to 'js/dispatch.ts')
-rw-r--r-- | js/dispatch.ts | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/js/dispatch.ts b/js/dispatch.ts index d1da45b06..b59274f91 100644 --- a/js/dispatch.ts +++ b/js/dispatch.ts @@ -15,6 +15,14 @@ export const OP_UTIME = 7; export const OP_SET_ENV = 8; export const OP_HOME_DIR = 9; export const OP_START = 10; +export const OP_APPLY_SOURCE_MAP = 11; +export const OP_FORMAT_ERROR = 12; +export const OP_CACHE = 13; +export const OP_FETCH_SOURCE_FILE = 14; +export const OP_OPEN = 15; +export const OP_CLOSE = 16; +export const OP_SEEK = 17; +export const OP_FETCH = 18; export function asyncMsgFromRust(opId: number, ui8: Uint8Array): void { switch (opId) { @@ -25,10 +33,17 @@ export function asyncMsgFromRust(opId: number, ui8: Uint8Array): void { case OP_READ: minimal.asyncMsgFromRust(opId, ui8); break; + case OP_EXIT: + case OP_IS_TTY: + case OP_ENV: + case OP_EXEC_PATH: case OP_UTIME: + case OP_OPEN: + case OP_SEEK: + case OP_FETCH: json.asyncMsgFromRust(opId, ui8); break; default: - throw Error("bad opId"); + throw Error("bad async opId"); } } |