diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-30 14:47:06 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-30 14:47:06 -0700 |
commit | f8d5b381ffac3c7fb3ef72d332c5d1880be4101f (patch) | |
tree | 62d16dd86b6e259fabe52994c0d7718a9471d180 | |
parent | e3d12277cdbb3c47ddeacf1fa005f2964debefbb (diff) | |
parent | 7708b0812d6150aa56c27f1bf45224e1916cb6be (diff) |
Merge pull request #1008 from michaeljbishop/update-dead-functions-comment
Updated comment for DEAD_FUNCTIONS.
-rw-r--r-- | src/settings.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/settings.js b/src/settings.js index 9ed87bd6..b8cddf7d 100644 --- a/src/settings.js +++ b/src/settings.js @@ -335,10 +335,14 @@ var PGO = 0; // Enables profile-guided optimization in the form of runtime check // 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. If - // such a function is an unresolved reference, that is not - // considered an error. +var DEAD_FUNCTIONS = []; // ASM.js requires all declared functions to have a + // corresponding implementation (even if the function is never + // called) and will emit an error during linking if no + // implementation can be found + // If you know a function will never be called, you can stub it + // out with a call to abort() by adding it to this list. This + // will subsequently pass ASM.js validation, but allows for a + // runtime error should anything else call that function. // TODO: options to lazily load such functions var UNRESOLVED_AS_DEAD = 0; // Handle all unresolved functions as if they were in the // list of dead functions. This is a quick way to turn |