aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/settings.js b/src/settings.js
index 1bfcf92a..36f53c3c 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -15,7 +15,7 @@ var QUANTUM_SIZE = 4; // This is the size of an individual field in a structure.
// the normal value of 4 means all fields take 4 memory addresses,
// as per the norm on a 32-bit machine.
//
- // 1 is somewhat faster than 4, but dangerous.
+ // Changing this from the default of 4 is deprecated.
var CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values.
// Decreases performance with additional runtime checks. Might not be
@@ -63,7 +63,7 @@ var RELOOPER = 'relooper.js'; // Loads the relooper from this path relative to c
var USE_TYPED_ARRAYS = 2; // Use typed arrays for the heap. See https://github.com/kripken/emscripten/wiki/Code-Generation-Modes/
// 0 means no typed arrays are used.
// 1 has two heaps, IHEAP (int32) and FHEAP (double),
- // and addresses there are a match for normal addresses.
+ // and addresses there are a match for normal addresses. This is deprecated.
// 2 is a single heap, accessible through views as int8, int32, etc. This is
// the recommended mode both for performance and for compatibility.
var USE_FHEAP = 1; // Relevant in USE_TYPED_ARRAYS == 1. If this is disabled, only IHEAP will be used, and FHEAP
@@ -171,6 +171,8 @@ var GL_UNSAFE_OPTS = 1; // Enables some potentially-unsafe optimizations in GL e
var FULL_ES2 = 0; // Forces support for all GLES2 features, not just the WebGL-friendly subset.
var FORCE_GL_EMULATION = 0; // Forces inclusion of full GL emulation code.
+var UTF_STRING_SUPPORT = 1; // Perform utf-8 conversion between C and JS strings (adds overhead in such conversions)
+
var DISABLE_EXCEPTION_CATCHING = 0; // Disables generating code to actually catch exceptions. If the code you
// are compiling does not actually rely on catching exceptions (but the
// compiler generates code for it, maybe because of stdlibc++ stuff),
@@ -230,13 +232,14 @@ var EXPORTED_FUNCTIONS = ['_main']; // Functions that are explicitly exported. T
// the generated code even after running closure compiler (on "Module").
// Note the necessary prefix of "_".
-var DEFAULT_LIBRARY_FUNCS_TO_INCLUDE = ['memcpy', 'memset', 'malloc', 'free', '$Browser']; // JS library functions (C functions implemented in JS)
- // that we include by default. If you want to make sure
- // something is included by the JS compiler, add it here.
- // For example, if you do not use some emscripten_*
- // C API call from C, but you want to call it from JS,
- // add it here (and in EXPORTED FUNCTIONS with prefix
- // "_", for closure).
+// JS library functions (C functions implemented in JS)
+// that we include by default. If you want to make sure
+// something is included by the JS compiler, add it here.
+// For example, if you do not use some emscripten_*
+// C API call from C, but you want to call it from JS,
+// add it here (and in EXPORTED FUNCTIONS with prefix
+// "_", for closure).
+var DEFAULT_LIBRARY_FUNCS_TO_INCLUDE = ['memcpy', 'memset', 'malloc', 'free', 'strlen', '$Browser'];
var LIBRARY_DEPS_TO_AUTOEXPORT = ['memcpy']; // This list is also used to determine
// auto-exporting of library dependencies (i.e., functions that
@@ -332,6 +335,14 @@ var ASM_JS = 0; // If 1, generate code in asm.js format. XXX This is highly expe
// and will not work on most codebases yet. It is NOT recommended that you
// try this yet.
+var PGO = 0; // Enables profile-guided optimization in the form of runtime checks for
+ // which functions are actually called. Emits a list during shutdown that you
+ // can pass to DEAD_FUNCTIONS (you can also emit the list manually by
+ // calling PGOMonitor.dump());
+var DEAD_FUNCTIONS = []; // A list of functions that no code will be emitted for, and
+ // a runtime abort will happen if they are called
+ // TODO: options to lazily load such functions
+
var EXPLICIT_ZEXT = 0; // If 1, generate an explicit conversion of zext i1 to i32, using ?:
var NECESSARY_BLOCKADDRS = []; // List of (function, block) for all block addresses that are taken.