From 05672b7e240f8568c1f58eb074623aede20f13d1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 17 May 2018 09:47:09 -0400 Subject: runtime.ts - first pass at caching compiler --- main.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.ts') 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) => { -- cgit v1.2.3