mirror of
https://github.com/copy/v86
synced 2025-10-14 01:54:07 +08:00
remove "use strict" (is default in es6 modules)
This commit is contained in:
@@ -133,7 +133,8 @@ export default [
|
||||
"no-with": "error",
|
||||
"require-yield": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": "error"
|
||||
"valid-typeof": "error",
|
||||
"strict": "error"
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
|
||||
import fs from "node:fs";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
|
||||
import fs from "node:fs";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
|
||||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
|
||||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
|
||||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import assert from "node:assert/strict";
|
||||
|
||||
function indent(lines, how_much)
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import process from "node:process";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// http://ref.x86asm.net/coder32.html
|
||||
|
||||
const zf = 1 << 6;
|
||||
|
@@ -4,7 +4,6 @@
|
||||
// Implementation of the 9p filesystem device following the
|
||||
// 9P2000.L protocol ( https://code.google.com/p/diod/wiki/protocol )
|
||||
|
||||
"use strict";
|
||||
|
||||
import { LOG_9P } from "./../src/const.js";
|
||||
import { VirtIO, VIRTIO_F_VERSION_1, VIRTIO_F_RING_EVENT_IDX, VIRTIO_F_RING_INDIRECT_DESC } from "../src/virtio.js";
|
||||
|
@@ -3,7 +3,6 @@
|
||||
// -------------------------------------------------
|
||||
// Implementation of a unix filesystem in memory.
|
||||
|
||||
"use strict";
|
||||
|
||||
import { LOG_9P } from "../src/const.js";
|
||||
import { h } from "../src/lib.js";
|
||||
|
@@ -2,7 +2,6 @@
|
||||
// ------------------ Marshall ---------------------
|
||||
// -------------------------------------------------
|
||||
// helper functions for virtio and 9p.
|
||||
"use strict";
|
||||
|
||||
import { dbg_log } from "./../src/log.js";
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf
|
||||
|
||||
import { v86 } from "./main.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// See Intel's System Programming Guide
|
||||
|
||||
import { v86 } from "./main.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_assert } from "../log.js";
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_FETCH } from "../const.js";
|
||||
import { h } from "../lib.js";
|
||||
import { dbg_assert, dbg_log } from "../log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_FETCH } from "../const.js";
|
||||
import { h } from "../lib.js";
|
||||
import { dbg_log } from "../log.js";
|
||||
|
@@ -1,6 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
|
||||
import { dbg_assert } from "../log.js";
|
||||
import { load_file } from "../lib.js";
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// For Types Only
|
||||
import { BusConnector } from "../bus.js";
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// For Types Only
|
||||
import { BusConnector } from "../bus.js";
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { V86 } from "./starter.js";
|
||||
import { LOG_NAMES } from "../const.js";
|
||||
import { print_stats } from "./print_stats.js";
|
||||
|
@@ -1,6 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
|
||||
import { dbg_log } from "../log.js";
|
||||
|
||||
// For Types Only
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// For Types Only
|
||||
import { BusConnector } from "../bus.js";
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { pads } from "../lib.js";
|
||||
|
||||
export const print_stats = {
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_assert } from "../log.js";
|
||||
|
||||
// Draws entire buffer and visualizes the layers that would be drawn
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_assert, dbg_log } from "../log.js";
|
||||
|
||||
// For Types Only
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import {
|
||||
MIXER_CHANNEL_BOTH, MIXER_CHANNEL_LEFT, MIXER_CHANNEL_RIGHT,
|
||||
MIXER_SRC_PCSPEAKER, MIXER_SRC_DAC, MIXER_SRC_MASTER,
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { v86 } from "../main.js";
|
||||
import { LOG_CPU, WASM_TABLE_OFFSET, WASM_TABLE_SIZE } from "../const.js";
|
||||
import { get_rand_int, load_file, read_sized_string_from_mem } from "../lib.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_NET } from "../const.js";
|
||||
import { dbg_log } from "../log.js";
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_assert } from "../log.js";
|
||||
|
||||
/** @constructor */
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { CPU } from "./cpu.js";
|
||||
import { load_file, get_file_size } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_assert } from "./log.js";
|
||||
|
||||
export var Bus = {};
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @define {boolean}
|
||||
* Overridden for production by closure compiler
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
export const
|
||||
/** @const */ LOG_ALL = -1,
|
||||
/** @const */ LOG_NONE = 0,
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import {
|
||||
LOG_CPU, LOG_BIOS,
|
||||
FW_CFG_SIGNATURE, FW_CFG_SIGNATURE_QEMU,
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_DMA } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_log, LOG_LEVEL } from "./log.js";
|
||||
|
||||
// A minimal elf parser for loading 32 bit, x86, little endian, executable elf files
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
var global = {};
|
||||
var process = { hrtime: function() {} };
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// https://www.isdaman.com/alsos/hardware/fdc/floppy.htm
|
||||
// https://wiki.osdev.org/Floppy_Disk_Controller
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_DISK } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_IO, MMAP_BLOCK_BITS, MMAP_BLOCK_SIZE, MMAP_MAX } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// http://download.intel.com/design/chipsets/datashts/29056601.pdf
|
||||
|
||||
import { LOG_APIC, MMAP_BLOCK_SIZE } from "./const.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_assert } from "./log.js";
|
||||
|
||||
// pad string with spaces on the right
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
if(typeof DEBUG === "undefined")
|
||||
{
|
||||
globalThis.DEBUG = true;
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { CPU } from "./cpu.js";
|
||||
import { save_state, restore_state } from "./state.js";
|
||||
export { V86 } from "./browser/starter.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_NET } from "./const.js";
|
||||
import { h, hex_dump } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_PCI } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { v86 } from "./main.js";
|
||||
import { LOG_PIT } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_PS2 } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { v86 } from "./main.js";
|
||||
import { LOG_RTC } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import {
|
||||
LOG_SB16,
|
||||
MIXER_CHANNEL_BOTH, MIXER_CHANNEL_LEFT, MIXER_CHANNEL_RIGHT,
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
import { CPU } from "./cpu.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_SERIAL } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_VGA } from "./const.js";
|
||||
import { h } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { LOG_VIRTIO } from "./const.js";
|
||||
import { h, zeros, int_log2 } from "./lib.js";
|
||||
import { dbg_assert, dbg_log } from "./log.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-2900003
|
||||
|
||||
import { LOG_PCI } from "./const.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { dbg_assert } from "./log.js";
|
||||
import { VirtIO, VIRTIO_F_VERSION_1 } from "./virtio.js";
|
||||
import * as marshall from "../lib/marshall.js";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-2900003
|
||||
|
||||
import { dbg_assert } from "./log.js";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import { setTimeout as pause } from "timers/promises";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
import fs from "node:fs";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
import assert from "node:assert/strict";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import path from "node:path";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import path from "node:path";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import path from "node:path";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import assert from "assert/strict";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import url from "node:url";
|
||||
import fs from "node:fs";
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import assert from "assert/strict";
|
||||
import url from "node:url";
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import assert from "assert/strict";
|
||||
import fs from "node:fs";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env -S node --experimental-websocket
|
||||
"use strict";
|
||||
|
||||
import assert from "assert/strict";
|
||||
import url from "node:url";
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import assert from "node:assert/strict";
|
||||
import cluster from "node:cluster";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import url from "node:url";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import fse from "node:fs/promises";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
// From http://baagoe.com/en/RandomMusings/javascript/
|
||||
// Johannes Baagøe <baagoe@baagoe.com>, 2010
|
||||
function Mash() {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
process.on("unhandledRejection", exn => { throw exn; });
|
||||
|
||||
import { fileURLToPath } from "url";
|
||||
import path from "path";
|
||||
@@ -11,6 +8,8 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD;
|
||||
const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js");
|
||||
|
||||
process.on("unhandledRejection", exn => { throw exn; });
|
||||
|
||||
var test_executable = new Uint8Array(fs.readFileSync(__dirname + "/test-i386"));
|
||||
|
||||
var emulator = new V86({
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import path from "node:path";
|
||||
import fs from "node:fs";
|
||||
|
Reference in New Issue
Block a user