Revert json ops (#2814)

* Revert "port more ops to JSON (#2809)"

This reverts commit 137f33733d.

* Revert "port ops to JSON: compiler, errors, fetch, files (#2804)"

This reverts commit 79f82cf10e.

* Revert "Port rest of os ops to JSON (#2802)"

This reverts commit 5b2baa5c99.
This commit is contained in:
Ryan Dahl 2019-08-24 13:20:48 -07:00 committed by GitHub
parent bdc0a13261
commit 2235dd795d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 1968 additions and 1045 deletions

View file

@ -22,12 +22,12 @@ export default function denoMain(
preserveDenoNamespace: boolean = true,
name?: string
): void {
const s = os.start(preserveDenoNamespace, name);
const startResMsg = os.start(preserveDenoNamespace, name);
setVersions(s.denoVersion, s.v8Version);
setVersions(startResMsg.denoVersion()!, startResMsg.v8Version()!);
// handle `--version`
if (s.versionFlag) {
if (startResMsg.versionFlag()) {
console.log("deno:", deno.version.deno);
console.log("v8:", deno.version.v8);
console.log("typescript:", deno.version.typescript);
@ -36,22 +36,24 @@ export default function denoMain(
setPrepareStackTrace(Error);
if (s.mainModule) {
assert(s.mainModule.length > 0);
setLocation(s.mainModule);
const mainModule = startResMsg.mainModule();
if (mainModule) {
assert(mainModule.length > 0);
setLocation(mainModule);
}
log("cwd", s.cwd);
const cwd = startResMsg.cwd();
log("cwd", cwd);
for (let i = 1; i < s.argv.length; i++) {
args.push(s.argv[i]);
for (let i = 1; i < startResMsg.argvLength(); i++) {
args.push(startResMsg.argv(i));
}
log("args", args);
Object.freeze(args);
if (window["_xevalWrapper"] !== undefined) {
xevalMain(window["_xevalWrapper"] as XevalFunc, s.xevalDelim);
} else if (!s.mainModule) {
xevalMain(window["_xevalWrapper"] as XevalFunc, startResMsg.xevalDelim());
} else if (!mainModule) {
replLoop();
}
}