Skip to content

Commit 6e58639

Browse files
committed
dfe comment
1 parent 331dd4a commit 6e58639

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/settings.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,12 @@ var PTHREADS_PROFILING = 0; // True when building with --threadprofiler
681681

682682
var MAX_GLOBAL_ALIGN = -1; // received from the backend
683683

684-
// Duplicate function elimination
684+
// Duplicate function elimination. This coalesces function bodies that are
685+
// identical, which can happen e.g. if two methods have different C/C++
686+
// or LLVM types, but end up identical at the asm.js level (all pointers
687+
// are the same as int32_t in asm.js, for example).
688+
// This option is quite slow to run, as it processes and hashes all methods
689+
// in the codebase in multiple passes.
685690
var ELIMINATE_DUPLICATE_FUNCTIONS = 0; // disabled by default
686691
var ELIMINATE_DUPLICATE_FUNCTIONS_PASSES = 5;
687692
var ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS = 0;

tests/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6229,7 +6229,7 @@ def process(filename):
62296229
test()
62306230

62316231
# Make sure that DFE ends up eliminating more than 200 functions
6232-
assert(num_original_funcs - self.count_funcs('src.cpp.o.js')) > 200
6232+
assert (num_original_funcs - self.count_funcs('src.cpp.o.js')) > 200
62336233
break
62346234

62356235
def test_openjpeg(self):

0 commit comments

Comments
 (0)