From 019b0ef15e966ecafa6cdfa357b00de09c332633 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Mon, 26 Oct 2020 10:31:05 -0700 Subject: [NFC] `using namespace Abstract` to make matchers more compact (#3284) This change makes matchers in OptimizeInstructions more compact and readable by removing the explicit `Abstract::` namespace from individual operations. In some cases, this makes multi-line matcher expressions fit on a single line. This change is only possible because it also adds an explicit "RMW" prefix to each element of the `AtomicRMWOp` enumeration. Without that, their names conflicted with the names of Abstract ops. --- src/wasm/wasm-stack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm/wasm-stack.cpp') diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 4bc479d15..13ce700a5 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -351,7 +351,7 @@ void BinaryInstWriter::visitAtomicRMW(AtomicRMW* curr) { o << int8_t(BinaryConsts::AtomicPrefix); #define CASE_FOR_OP(Op) \ - case Op: \ + case RMW##Op: \ switch (curr->type.getBasic()) { \ case Type::i32: \ switch (curr->bytes) { \ -- cgit v1.2.3