aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/settings.js b/src/settings.js
index ef8b3999..ed4fcd05 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -3,15 +3,10 @@ QUANTUM_SIZE = 4; // This is the size of an individual field in a structure. 1 w
// lead to e.g. doubles and chars both taking 1 memory address. This
// is a form of 'compressed' memory, with shrinking and stretching
// according to the type, when compared to C/C++. On the other hand
- // 8 means all fields take 8 memory addresses, so a double takes
- // the same as a char. Note that we only actually store something in
- // the top address - the others are just empty, an 'alignment cost'
- // of sorts.
+ // 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, but dangerous.
- //
- // TODO: Cleverly analyze malloc, memset, memcpy etc. operations in
- // llvm, and replace with the proper values for us
+ // 1 is somewhat faster than 4, but dangerous.
CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values.
// Decreases performance with additional runtime checks. Might not be
@@ -70,14 +65,14 @@ SAFE_HEAP_LOG = 0; // Log out all SAFE_HEAP operations
LABEL_DEBUG = 0; // Print out labels and functions as we enter them
EXCEPTION_DEBUG = 1; // Print out exceptions in emscriptened code
LIBRARY_DEBUG = 0; // Print out when we enter a library call (library*.js)
-DISABLE_EXCEPTIONS = 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),
- // then this can make it much faster. If an exception actually happens,
- // it will not be caught and the program will halt (so this will not
- // introduce silent failures, which is good).
- // TODO: Make this also remove cxa_begin_catch etc., optimize relooper
- // for it, etc. (perhaps do all of this as preprocessing on .ll?)
+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),
+ // then this can make it much faster. If an exception actually happens,
+ // it will not be caught and the program will halt (so this will not
+ // introduce silent failures, which is good).
+ // TODO: Make this also remove cxa_begin_catch etc., optimize relooper
+ // for it, etc. (perhaps do all of this as preprocessing on .ll?)
EXECUTION_TIMEOUT = -1; // Throw an exception after X seconds - useful to debug infinite loops
CHECK_OVERFLOWS = 0; // Add code that checks for overflows in integer math operations.
// There is currently not much to do to handle overflows if they occur.