diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-17 09:47:09 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-17 21:19:49 -0400 |
commit | 05672b7e240f8568c1f58eb074623aede20f13d1 (patch) | |
tree | d639abc21b20ac1ac59ecb65b681a2cdbe5a8784 /main.ts | |
parent | 6f9c919f410c7d97f99515ea99c8dcc434d5d26d (diff) |
runtime.ts - first pass at caching compiler
Diffstat (limited to 'main.ts')
-rw-r--r-- | main.ts | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) => { |