summaryrefslogtreecommitdiff
path: root/src/passes/RemoveUnusedBrs.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-01-07 13:24:58 -0800
committerGitHub <noreply@github.com>2019-01-07 13:24:58 -0800
commit7d94900ded8e2e5ce8ef8ee2687528531d8f2a97 (patch)
treed8bba13d306b0c5ecba384384e602e6cccc83015 /src/passes/RemoveUnusedBrs.cpp
parent6f91af190effd7b8a5969314dd4fb3d2ec540524 (diff)
downloadbinaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.gz
binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.bz2
binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.zip
Massive renaming (#1855)
Automated renaming according to https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
Diffstat (limited to 'src/passes/RemoveUnusedBrs.cpp')
-rw-r--r--src/passes/RemoveUnusedBrs.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp
index 58694b25c..614503581 100644
--- a/src/passes/RemoveUnusedBrs.cpp
+++ b/src/passes/RemoveUnusedBrs.cpp
@@ -292,7 +292,7 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs>> {
}
}
// TODO: if-else can be turned into a br_if as well, if one of the sides is a dead end
- // we handle the case of a returned value to a set_local later down, see
+ // we handle the case of a returned value to a local.set later down, see
// visitSetLocal.
}
@@ -847,7 +847,7 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs>> {
}
// If one arm is a br, we prefer a br_if and the set later:
- // (set_local $x
+ // (local.set $x
// (if (result i32)
// (..condition..)
// (br $somewhere)
@@ -858,7 +858,7 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs>> {
// (br_if $somewhere
// (..condition..)
// )
- // (set_local $x
+ // (local.set $x
// (..result)
// )
// TODO: handle a condition in the br? need to watch for side effects
@@ -900,38 +900,38 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs>> {
// we can remove. If this is not a tee, then we remove the get
// as well as the if-else opcode in the binary format, which is
// great:
- // (set_local $x
+ // (local.set $x
// (if (result i32)
// (..condition..)
// (..result)
- // (get_local $x)
+ // (local.get $x)
// )
// )
// =>
// (if
// (..condition..)
- // (set_local $x
+ // (local.set $x
// (..result)
// )
// )
// If this is a tee, then we can do the same operation but
// inside a block, and keep the get:
- // (tee_local $x
+ // (local.tee $x
// (if (result i32)
// (..condition..)
// (..result)
- // (get_local $x)
+ // (local.get $x)
// )
// )
// =>
// (block (result i32)
// (if
// (..condition..)
- // (set_local $x
+ // (local.set $x
// (..result)
// )
// )
- // (get_local $x)
+ // (local.get $x)
// )
// We save the if-else opcode, and add the block's opcodes.
// This may be detrimental, however, often the block can be