summaryrefslogtreecommitdiff
path: root/src/passes/Precompute.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-04-28 14:34:25 -0700
committerGitHub <noreply@github.com>2017-04-28 14:34:25 -0700
commita88d9b83a4629f4bf4c3b210b07d11d2396c594d (patch)
tree0df6fa75b22d4eb5a1590e6ee9fe5e6352ace5e4 /src/passes/Precompute.cpp
parent5d4f9eb82226acc0fdb5e2dea1a04e17c340c371 (diff)
downloadbinaryen-a88d9b83a4629f4bf4c3b210b07d11d2396c594d.tar.gz
binaryen-a88d9b83a4629f4bf4c3b210b07d11d2396c594d.tar.bz2
binaryen-a88d9b83a4629f4bf4c3b210b07d11d2396c594d.zip
ctor evaller (#982)
Add wasm-ctor-eval, which evaluates functions at compile time - typically static constructor functions - and applies their effects into memory, saving work at startup. If we encounter something we can't evaluate at compile time in our interpreter, stop there. This is similar to ctor_evaller.py in emscripten (which was for asm.js).
Diffstat (limited to 'src/passes/Precompute.cpp')
-rw-r--r--src/passes/Precompute.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp
index bcfa4a980..dfb45f686 100644
--- a/src/passes/Precompute.cpp
+++ b/src/passes/Precompute.cpp
@@ -26,7 +26,7 @@
namespace wasm {
-Name NONSTANDALONE_FLOW("Binaryen|nonstandalone");
+static const Name NONSTANDALONE_FLOW("Binaryen|nonstandalone");
// Execute an expression by itself. Errors if we hit anything we need anything not in the expression itself standalone.
class StandaloneExpressionRunner : public ExpressionRunner<StandaloneExpressionRunner> {