diff options
author | Alon Zakai <azakai@google.com> | 2020-09-03 08:06:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 08:06:34 -0700 |
commit | 132c72bb5e93591de34a9bfc267e4a2007908626 (patch) | |
tree | f049f98d371fdbd2ea4b3fb37db2aedc8ff6f98d /src | |
parent | 560baeea1810e7e4a0da6155be6e3dc9716a6758 (diff) | |
download | binaryen-132c72bb5e93591de34a9bfc267e4a2007908626.tar.gz binaryen-132c72bb5e93591de34a9bfc267e4a2007908626.tar.bz2 binaryen-132c72bb5e93591de34a9bfc267e4a2007908626.zip |
Remove old stack function from StackCheck (#3100)
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/StackCheck.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/passes/StackCheck.cpp b/src/passes/StackCheck.cpp index 183420fba..4388705e6 100644 --- a/src/passes/StackCheck.cpp +++ b/src/passes/StackCheck.cpp @@ -36,10 +36,7 @@ namespace wasm { static Name STACK_BASE("__stack_base"); // The limit is the farthest it can grow to, which is the lowest valid address. static Name STACK_LIMIT("__stack_limit"); -// Old version, which sets the limit. -// TODO: remove this -static Name SET_STACK_LIMIT("__set_stack_limit"); -// New version, which sets the base and the limit. +// Exported function to set the base and the limit. static Name SET_STACK_LIMITS("__set_stack_limits"); static void importStackOverflowHandler(Module& module, Name name) { @@ -65,14 +62,6 @@ static void addExportedFunction(Module& module, Function* function) { static void generateSetStackLimitFunctions(Module& module) { Builder builder(module); - // One-parameter version - Function* limitFunc = - builder.makeFunction(SET_STACK_LIMIT, Signature(Type::i32, Type::none), {}); - LocalGet* getArg = builder.makeLocalGet(0, Type::i32); - Expression* store = builder.makeGlobalSet(STACK_LIMIT, getArg); - limitFunc->body = store; - addExportedFunction(module, limitFunc); - // Two-parameter version Function* limitsFunc = builder.makeFunction( SET_STACK_LIMITS, Signature({Type::i32, Type::i32}, Type::none), {}); LocalGet* getBase = builder.makeLocalGet(0, Type::i32); |