@@ -44,18 +44,6 @@ if (typeof WebAssembly != 'object') {
4444}
4545#endif
4646
47- #if SAFE_HEAP
48- #include "runtime_safe_heap.js"
49- #endif
50-
51- #if SHARED_MEMORY && ALLOW_MEMORY_GROWTH
52- #include "growableHeap.js"
53- #endif
54-
55- #if USE_ASAN
56- #include "runtime_asan.js"
57- #endif
58-
5947#if SUPPORT_BASE64_EMBEDDING || FORCE_FILESYSTEM
6048#include "base64Utils.js"
6149#endif
@@ -150,12 +138,16 @@ var HEAP,
150138var HEAP_DATA_VIEW ;
151139#endif
152140
153- #include "runtime_shared.js"
141+ var runtimeInitialized = false ;
154142
155- #if PTHREADS
156- #include "runtime_pthread.js"
143+ #if EXIT_RUNTIME
144+ var runtimeExited = false ;
157145#endif
158146
147+ #include "URIUtils.js"
148+
149+ #include "runtime_shared.js"
150+
159151#if ASSERTIONS
160152assert ( ! Module [ 'STACK_SIZE' ] , 'STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time' )
161153#endif
@@ -174,8 +166,6 @@ assert(!Module['wasmMemory'], 'Use of `wasmMemory` detected. Use -sIMPORTED_MEM
174166assert ( ! Module [ 'INITIAL_MEMORY' ] , 'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically' ) ;
175167#endif // !IMPORTED_MEMORY && ASSERTIONS
176168
177- #include "runtime_stack_check.js"
178-
179169var __ATPRERUN__ = [ ] ; // functions called before the runtime is initialized
180170var __ATINIT__ = [ ] ; // functions called during startup
181171#if HAS_MAIN
@@ -188,12 +178,6 @@ var __ATPOSTRUN__ = []; // functions called after the main() is called
188178var __RELOC_FUNCS__ = [ ] ;
189179#endif
190180
191- var runtimeInitialized = false ;
192-
193- #if EXIT_RUNTIME
194- var runtimeExited = false ;
195- #endif
196-
197181function preRun ( ) {
198182#if ASSERTIONS && PTHREADS
199183 assert ( ! ENVIRONMENT_IS_PTHREAD ) ; // PThreads reuse the runtime from the main thread.
@@ -483,8 +467,6 @@ function abort(what) {
483467 throw e ;
484468}
485469
486- #include "memoryprofiler.js"
487-
488470#if ASSERTIONS && ! ( '$FS' in addedLibraryItems )
489471// show errors on likely calls to FS when it was not included
490472var FS = {
@@ -506,8 +488,6 @@ Module['FS_createDataFile'] = FS.createDataFile;
506488Module [ 'FS_createPreloadedFile' ] = FS . createPreloadedFile ;
507489#endif
508490
509- #include "URIUtils.js"
510-
511491#if ASSERTIONS
512492function createExportWrapper ( name , nargs ) {
513493 return ( ...args ) => {
@@ -524,8 +504,6 @@ function createExportWrapper(name, nargs) {
524504}
525505#endif
526506
527- #include "runtime_exceptions.js"
528-
529507#if ABORT_ON_WASM_EXCEPTIONS
530508// `abortWrapperDepth` counts the recursion level of the wrapper function so
531509// that we only handle exceptions at the top level letting the exception
@@ -675,16 +653,6 @@ async function getWasmBinary(binaryFile) {
675653 return getBinarySync ( binaryFile ) ;
676654}
677655
678- #if LOAD_SOURCE_MAP
679- var wasmSourceMap ;
680- #include "source_map_support.js"
681- #endif
682-
683- #if USE_OFFSET_CONVERTER
684- var wasmOffsetConverter ;
685- #include "wasm_offset_converter.js"
686- #endif
687-
688656#if SPLIT_MODULE
689657{ { { makeModuleReceiveWithVar ( 'loadSplitModule' , undefined , 'instantiateSync' , true ) } } }
690658var splitModuleProxyHandler = {
@@ -1127,8 +1095,6 @@ var tempDouble;
11271095var tempI64 ;
11281096#endif
11291097
1130- #include "runtime_debug.js"
1131-
11321098#if RETAIN_COMPILER_SETTINGS
11331099var compilerSettings = { { { JSON . stringify ( makeRetainedCompilerSettings( ) ) } } } ;
11341100
0 commit comments