summaryrefslogtreecommitdiff
path: root/js/dispatch.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-08-24 13:20:48 -0700
committerGitHub <noreply@github.com>2019-08-24 13:20:48 -0700
commit2235dd795d3cc6c24ff1bdd1bbdcd110b4b0bdfc (patch)
treea5811adc062cbb1c66f05c863c9be245cf4fd2d2 /js/dispatch.ts
parentbdc0a13261deaa3748f51d9948b4e7b92864c324 (diff)
Revert json ops (#2814)
* Revert "port more ops to JSON (#2809)" This reverts commit 137f33733d365026903d40e7cde6e34ac6c36dcf. * Revert "port ops to JSON: compiler, errors, fetch, files (#2804)" This reverts commit 79f82cf10ed1dbf91346994250d7311a4d74377a. * Revert "Port rest of os ops to JSON (#2802)" This reverts commit 5b2baa5c990fbeae747e952c5dcd7a5369e950b1.
Diffstat (limited to 'js/dispatch.ts')
-rw-r--r--js/dispatch.ts52
1 files changed, 1 insertions, 51 deletions
diff --git a/js/dispatch.ts b/js/dispatch.ts
index 6c7551441..0c5c59553 100644
--- a/js/dispatch.ts
+++ b/js/dispatch.ts
@@ -12,40 +12,6 @@ export const OP_IS_TTY = 4;
export const OP_ENV = 5;
export const OP_EXEC_PATH = 6;
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 const OP_METRICS = 19;
-export const OP_REPL_START = 20;
-export const OP_REPL_READLINE = 21;
-export const OP_ACCEPT = 22;
-export const OP_DIAL = 23;
-export const OP_SHUTDOWN = 24;
-export const OP_LISTEN = 25;
-export const OP_RESOURCES = 26;
-export const OP_GET_RANDOM_VALUES = 27;
-export const OP_GLOBAL_TIMER_STOP = 28;
-export const OP_GLOBAL_TIMER = 29;
-export const OP_NOW = 30;
-export const OP_PERMISSIONS = 31;
-export const OP_REVOKE_PERMISSION = 32;
-export const OP_CREATE_WORKER = 33;
-export const OP_HOST_GET_WORKER_CLOSED = 34;
-export const OP_HOST_POST_MESSAGE = 35;
-export const OP_HOST_GET_MESSAGE = 36;
-export const OP_WORKER_POST_MESSAGE = 37;
-export const OP_WORKER_GET_MESSAGE = 38;
-export const OP_RUN = 39;
-export const OP_RUN_STATUS = 40;
-export const OP_KILL = 41;
export function asyncMsgFromRust(opId: number, ui8: Uint8Array): void {
switch (opId) {
@@ -56,26 +22,10 @@ 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:
- case OP_REPL_START:
- case OP_REPL_READLINE:
- case OP_ACCEPT:
- case OP_DIAL:
- case OP_GLOBAL_TIMER:
- case OP_HOST_GET_WORKER_CLOSED:
- case OP_HOST_GET_MESSAGE:
- case OP_WORKER_GET_MESSAGE:
- case OP_RUN_STATUS:
json.asyncMsgFromRust(opId, ui8);
break;
default:
- throw Error("bad async opId");
+ throw Error("bad opId");
}
}