Skip to content

Commit 7d93b8c

Browse files
committed
Remove some WASM_BACKEND usage in src/. See #11860
1 parent c6212ef commit 7d93b8c

6 files changed

+7
-722
lines changed

src/jsifier.js

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function JSify(data, functionsOnly) {
174174
if (dependent) msg += ' (referenced by ' + dependent + ')';
175175
if (ERROR_ON_UNDEFINED_SYMBOLS) {
176176
error(msg);
177-
if (WASM_BACKEND && !LLD_REPORT_UNDEFINED) {
177+
if (!LLD_REPORT_UNDEFINED) {
178178
warnOnce('Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols');
179179
}
180180
warnOnce('To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`')
@@ -467,33 +467,6 @@ function JSify(data, functionsOnly) {
467467
print('/* no memory initializer */'); // test purposes
468468
}
469469

470-
if (!SIDE_MODULE && !WASM_BACKEND) {
471-
if (USE_PTHREADS) {
472-
print('// Pthreads fill their tempDoublePtr memory area into the pthread stack when the thread is run.')
473-
// Main thread still statically allocate tempDoublePtr - although it could theorerically also use its stack
474-
// (that might allow removing the whole tempDoublePtr variable altogether from the codebase? but would need
475-
// more refactoring)
476-
print('var tempDoublePtr = ENVIRONMENT_IS_PTHREAD ? 0 : ' + makeStaticAlloc(8) + ';');
477-
} else {
478-
print('var tempDoublePtr = ' + makeStaticAlloc(8) + ';');
479-
}
480-
print('\nfunction copyTempFloat(ptr) { // functions, because inlining this code increases code size too much');
481-
print(' HEAP8[tempDoublePtr] = HEAP8[ptr];');
482-
print(' HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];');
483-
print(' HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];');
484-
print(' HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];');
485-
print('}\n');
486-
print('function copyTempDouble(ptr) {');
487-
print(' HEAP8[tempDoublePtr] = HEAP8[ptr];');
488-
print(' HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];');
489-
print(' HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];');
490-
print(' HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];');
491-
print(' HEAP8[tempDoublePtr+4] = HEAP8[ptr+4];');
492-
print(' HEAP8[tempDoublePtr+5] = HEAP8[ptr+5];');
493-
print(' HEAP8[tempDoublePtr+6] = HEAP8[ptr+6];');
494-
print(' HEAP8[tempDoublePtr+7] = HEAP8[ptr+7];');
495-
print('}\n');
496-
}
497470
print('// {{PRE_LIBRARY}}\n'); // safe to put stuff here that statically allocates
498471

499472
return;

0 commit comments

Comments
 (0)