summaryrefslogtreecommitdiff
path: root/main.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-17 09:47:09 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-17 21:19:49 -0400
commit05672b7e240f8568c1f58eb074623aede20f13d1 (patch)
treed639abc21b20ac1ac59ecb65b681a2cdbe5a8784 /main.ts
parent6f9c919f410c7d97f99515ea99c8dcc434d5d26d (diff)
runtime.ts - first pass at caching compiler
Diffstat (limited to 'main.ts')
-rw-r--r--main.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.ts b/main.ts
index ecef8aea7..4b64650f9 100644
--- a/main.ts
+++ b/main.ts
@@ -1,11 +1,14 @@
import { main as pb } from "./msg.pb";
import "./util";
-import { compile } from "./compiler";
+import * as runtime from "./runtime";
+import * as path from "path";
function start(cwd: string, argv: string[]): void {
// TODO parse arguments.
const inputFn = argv[1];
- compile(cwd, inputFn);
+ const fn = path.resolve(cwd, inputFn);
+ const m = runtime.FileModule.load(fn);
+ m.compileAndRun();
}
V8Worker2.recv((ab: ArrayBuffer) => {