-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
Copy pathpreamble_minimal.js
57 lines (48 loc) · 993 Bytes
/
preamble_minimal.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* @license
* Copyright 2019 The Emscripten Authors
* SPDX-License-Identifier: MIT
*/
#if ASSERTIONS
/** @type {function(*, string=)} */
function assert(condition, text) {
if (!condition) throw text;
}
#endif
/** @param {string|number=} what */
function abort(what) {
throw {{{ ASSERTIONS ? 'new Error(what)' : 'what' }}};
}
#if !WASM_BIGINT
// Globals used by JS i64 conversions (see makeSetValue)
var tempDouble;
var tempI64;
#endif
#if WASM != 2 && MAYBE_WASM2JS
#if !WASM2JS
if (Module['doWasm2JS']) {
#endif
#include "wasm2js.js"
#if !WASM2JS
}
#endif
#endif
var HEAP8, HEAP16, HEAP32, HEAPU8, HEAPU16, HEAPU32, HEAPF32, HEAPF64,
#if WASM_BIGINT
HEAP64, HEAPU64,
#endif
#if SUPPORT_BIG_ENDIAN
HEAP_DATA_VIEW,
#endif
wasmMemory;
#if ASSERTIONS || SAFE_HEAP || USE_ASAN
var runtimeInitialized = false;
#endif
#if EXIT_RUNTIME
var runtimeExited = false;
#endif
#include "runtime_shared.js"
#if IMPORTED_MEMORY
#include "runtime_init_memory.js"
initMemory();
#endif