v86 0.5.253 → 0.5.262
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/libv86-debug.js +49 -40
- package/build/libv86-debug.mjs +274 -273
- package/build/libv86.js +4 -3
- package/build/libv86.mjs +141 -141
- package/build/v86-debug.wasm +0 -0
- package/build/v86-fallback.wasm +0 -0
- package/build/v86.wasm +0 -0
- package/package.json +1 -1
package/build/libv86-debug.js
CHANGED
|
@@ -6140,36 +6140,45 @@ if ("undefined" !== typeof process) {
|
|
|
6140
6140
|
}, $v86$$module$src$main$$.prototype.unregister_yield = function() {
|
|
6141
6141
|
};
|
|
6142
6142
|
} else {
|
|
6143
|
-
if ("
|
|
6144
|
-
function $
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
const $t$jscomp$8$$ = $e$jscomp$47$$.data.t;
|
|
6148
|
-
$timeout$jscomp$4$$ = $timeout$jscomp$4$$ && clearTimeout($timeout$jscomp$4$$);
|
|
6149
|
-
1 > $t$jscomp$8$$ ? postMessage($e$jscomp$47$$.data.tick) : $timeout$jscomp$4$$ = setTimeout(() => postMessage($e$jscomp$47$$.data.tick), $t$jscomp$8$$);
|
|
6150
|
-
};
|
|
6151
|
-
}
|
|
6152
|
-
$v86$$module$src$main$$.prototype.register_yield = function() {
|
|
6153
|
-
const $url$jscomp$27$$ = URL.createObjectURL(new Blob(["(" + $the_worker$jscomp$1$$.toString() + ")()"], {type:"text/javascript"}));
|
|
6154
|
-
this.worker = new Worker($url$jscomp$27$$);
|
|
6155
|
-
this.worker.onmessage = $e$jscomp$48$$ => this.yield_callback($e$jscomp$48$$.data);
|
|
6156
|
-
URL.revokeObjectURL($url$jscomp$27$$);
|
|
6157
|
-
};
|
|
6158
|
-
$v86$$module$src$main$$.prototype.yield = function($t$jscomp$9$$, $tick$jscomp$5$$) {
|
|
6159
|
-
this.worker.postMessage({t:$t$jscomp$9$$, tick:$tick$jscomp$5$$});
|
|
6160
|
-
};
|
|
6161
|
-
$v86$$module$src$main$$.prototype.unregister_yield = function() {
|
|
6162
|
-
this.worker && this.worker.terminate();
|
|
6163
|
-
this.worker = null;
|
|
6164
|
-
};
|
|
6165
|
-
} else {
|
|
6166
|
-
$v86$$module$src$main$$.prototype.yield = function($t$jscomp$10$$) {
|
|
6167
|
-
setTimeout(() => {
|
|
6168
|
-
this.do_tick();
|
|
6169
|
-
}, $t$jscomp$10$$);
|
|
6143
|
+
if (window.scheduler && "function" === typeof window.scheduler.postTask && !location.href.includes("dont-use-scheduling-api")) {
|
|
6144
|
+
$v86$$module$src$main$$.prototype.yield = function($t$jscomp$8$$, $tick$jscomp$5$$) {
|
|
6145
|
+
$t$jscomp$8$$ = Math.max(0, $t$jscomp$8$$);
|
|
6146
|
+
window.scheduler.postTask(() => this.yield_callback($tick$jscomp$5$$), {delay:$t$jscomp$8$$});
|
|
6170
6147
|
}, $v86$$module$src$main$$.prototype.register_yield = function() {
|
|
6171
6148
|
}, $v86$$module$src$main$$.prototype.unregister_yield = function() {
|
|
6172
6149
|
};
|
|
6150
|
+
} else {
|
|
6151
|
+
if ("undefined" !== typeof Worker) {
|
|
6152
|
+
function $the_worker$jscomp$1$$() {
|
|
6153
|
+
let $timeout$jscomp$4$$;
|
|
6154
|
+
globalThis.onmessage = function($e$jscomp$47$$) {
|
|
6155
|
+
const $t$jscomp$9$$ = $e$jscomp$47$$.data.t;
|
|
6156
|
+
$timeout$jscomp$4$$ = $timeout$jscomp$4$$ && clearTimeout($timeout$jscomp$4$$);
|
|
6157
|
+
1 > $t$jscomp$9$$ ? postMessage($e$jscomp$47$$.data.tick) : $timeout$jscomp$4$$ = setTimeout(() => postMessage($e$jscomp$47$$.data.tick), $t$jscomp$9$$);
|
|
6158
|
+
};
|
|
6159
|
+
}
|
|
6160
|
+
$v86$$module$src$main$$.prototype.register_yield = function() {
|
|
6161
|
+
const $url$jscomp$27$$ = URL.createObjectURL(new Blob(["(" + $the_worker$jscomp$1$$.toString() + ")()"], {type:"text/javascript"}));
|
|
6162
|
+
this.worker = new Worker($url$jscomp$27$$);
|
|
6163
|
+
this.worker.onmessage = $e$jscomp$48$$ => this.yield_callback($e$jscomp$48$$.data);
|
|
6164
|
+
URL.revokeObjectURL($url$jscomp$27$$);
|
|
6165
|
+
};
|
|
6166
|
+
$v86$$module$src$main$$.prototype.yield = function($t$jscomp$10$$, $tick$jscomp$6$$) {
|
|
6167
|
+
this.worker.postMessage({t:$t$jscomp$10$$, tick:$tick$jscomp$6$$});
|
|
6168
|
+
};
|
|
6169
|
+
$v86$$module$src$main$$.prototype.unregister_yield = function() {
|
|
6170
|
+
this.worker && this.worker.terminate();
|
|
6171
|
+
this.worker = null;
|
|
6172
|
+
};
|
|
6173
|
+
} else {
|
|
6174
|
+
$v86$$module$src$main$$.prototype.yield = function($t$jscomp$11$$) {
|
|
6175
|
+
setTimeout(() => {
|
|
6176
|
+
this.do_tick();
|
|
6177
|
+
}, $t$jscomp$11$$);
|
|
6178
|
+
}, $v86$$module$src$main$$.prototype.register_yield = function() {
|
|
6179
|
+
}, $v86$$module$src$main$$.prototype.unregister_yield = function() {
|
|
6180
|
+
};
|
|
6181
|
+
}
|
|
6173
6182
|
}
|
|
6174
6183
|
}
|
|
6175
6184
|
$v86$$module$src$main$$.prototype.save_state = function() {
|
|
@@ -6210,8 +6219,8 @@ if ("object" === typeof performance && performance.now) {
|
|
|
6210
6219
|
$v86$$module$src$main$$.microtick = $performance$jscomp$1$$.now.bind($performance$jscomp$1$$);
|
|
6211
6220
|
} else {
|
|
6212
6221
|
$v86$$module$src$main$$.microtick = "object" === typeof process && process.hrtime ? function() {
|
|
6213
|
-
var $t$jscomp$
|
|
6214
|
-
return 1000 * $t$jscomp$
|
|
6222
|
+
var $t$jscomp$12$$ = process.hrtime();
|
|
6223
|
+
return 1000 * $t$jscomp$12$$[0] + $t$jscomp$12$$[1] / 1e6;
|
|
6215
6224
|
} : Date.now;
|
|
6216
6225
|
}
|
|
6217
6226
|
}
|
|
@@ -6294,9 +6303,9 @@ $ACPI$$module$src$acpi$$.prototype.timer = function($now$jscomp$11_timer$$) {
|
|
|
6294
6303
|
this.last_timer = $now$jscomp$11_timer$$;
|
|
6295
6304
|
return 100;
|
|
6296
6305
|
};
|
|
6297
|
-
$ACPI$$module$src$acpi$$.prototype.get_timer = function($now$jscomp$12_t$jscomp$
|
|
6298
|
-
$now$jscomp$12_t$jscomp$
|
|
6299
|
-
$now$jscomp$12_t$jscomp$
|
|
6306
|
+
$ACPI$$module$src$acpi$$.prototype.get_timer = function($now$jscomp$12_t$jscomp$13$$) {
|
|
6307
|
+
$now$jscomp$12_t$jscomp$13$$ = Math.round(3579.545 * $now$jscomp$12_t$jscomp$13$$);
|
|
6308
|
+
$now$jscomp$12_t$jscomp$13$$ === this.timer_last_value ? 3579.545 > this.timer_imprecision_offset && this.timer_imprecision_offset++ : ($dbg_assert$$module$src$log$$($now$jscomp$12_t$jscomp$13$$ > this.timer_last_value), this.timer_last_value + this.timer_imprecision_offset <= $now$jscomp$12_t$jscomp$13$$ ? (this.timer_imprecision_offset = 0, this.timer_last_value = $now$jscomp$12_t$jscomp$13$$) : $dbg_log$$module$src$log$$("Warning: Overshot pmtimer, waiting; current=" + $now$jscomp$12_t$jscomp$13$$ +
|
|
6300
6309
|
" last=" + this.timer_last_value + " offset=" + this.timer_imprecision_offset, 262144));
|
|
6301
6310
|
return this.timer_last_value + this.timer_imprecision_offset;
|
|
6302
6311
|
};
|
|
@@ -10969,14 +10978,14 @@ $CPU$$module$src$cpu$$.prototype.set_state_apic = function($state$jscomp$60$$) {
|
|
|
10969
10978
|
$apic_apic$jscomp$1$$[2] = $state$jscomp$60$$[2];
|
|
10970
10979
|
$apic_apic$jscomp$1$$[3] = $state$jscomp$60$$[3];
|
|
10971
10980
|
$apic_apic$jscomp$1$$[4] = $state$jscomp$60$$[4];
|
|
10972
|
-
$apic_apic$jscomp$1$$[
|
|
10973
|
-
$apic_apic$jscomp$1$$[
|
|
10974
|
-
$apic_apic$jscomp$1$$[
|
|
10975
|
-
$apic_apic$jscomp$1$$[
|
|
10976
|
-
$apic_apic$jscomp$1$$[
|
|
10977
|
-
$apic_apic$jscomp$1$$[
|
|
10978
|
-
$apic_apic$jscomp$1$$[
|
|
10979
|
-
$apic_apic$jscomp$1$$[
|
|
10981
|
+
$apic_apic$jscomp$1$$[8] = $state$jscomp$60$$[6];
|
|
10982
|
+
$apic_apic$jscomp$1$$[9] = $state$jscomp$60$$[7];
|
|
10983
|
+
$apic_apic$jscomp$1$$[10] = $state$jscomp$60$$[8];
|
|
10984
|
+
$apic_apic$jscomp$1$$[11] = $state$jscomp$60$$[9];
|
|
10985
|
+
$apic_apic$jscomp$1$$[12] = $state$jscomp$60$$[10];
|
|
10986
|
+
$apic_apic$jscomp$1$$[13] = $state$jscomp$60$$[11];
|
|
10987
|
+
$apic_apic$jscomp$1$$[14] = $state$jscomp$60$$[12];
|
|
10988
|
+
$apic_apic$jscomp$1$$[15] = $state$jscomp$60$$[13];
|
|
10980
10989
|
$apic_apic$jscomp$1$$.set($state$jscomp$60$$[15], 16);
|
|
10981
10990
|
$apic_apic$jscomp$1$$.set($state$jscomp$60$$[15], 24);
|
|
10982
10991
|
$apic_apic$jscomp$1$$.set($state$jscomp$60$$[16], 32);
|