From 75e61204b67e921464af14fd13ff768d88755e8c Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 13 Nov 2020 15:54:08 -0800 Subject: Rename atomic.notify and *.atomic.wait (#3353) - atomic.notify -> memory.atomic.notify - i32.atomic.wait -> memory.atomic.wait32 - i64.atomic.wait -> memory.atomic.wait64 See WebAssembly/threads#149. This renames instruction name printing but not the internal data structure names, such as `AtomicNotify`, which are not always the same as printed instruction names anyway. This also does not modify C API. But this fixes interface functions in binaryen.js because it seems binaryen.js's interface functions all follow the corresponding instruction names. --- src/wasm/wasm-s-parser.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/wasm/wasm-s-parser.cpp') diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 6c552781b..34e1eb8a6 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1463,11 +1463,12 @@ Expression* SExpressionWasmBuilder::makeAtomicWait(Element& s, Type type) { } else if (type == Type::i64) { expectedAlign = 8; } else { - WASM_UNREACHABLE("Invalid prefix for atomic.wait"); + WASM_UNREACHABLE("Invalid prefix for memory.atomic.wait"); } size_t i = parseMemAttributes(s, ret->offset, align, expectedAlign); if (align != expectedAlign) { - throw ParseException("Align of atomic.wait must match size", s.line, s.col); + throw ParseException( + "Align of memory.atomic.wait must match size", s.line, s.col); } ret->ptr = parseExpression(s[i]); ret->expected = parseExpression(s[i + 1]); @@ -1482,7 +1483,8 @@ Expression* SExpressionWasmBuilder::makeAtomicNotify(Element& s) { Address align; size_t i = parseMemAttributes(s, ret->offset, align, 4); if (align != 4) { - throw ParseException("Align of atomic.notify must be 4", s.line, s.col); + throw ParseException( + "Align of memory.atomic.notify must be 4", s.line, s.col); } ret->ptr = parseExpression(s[i]); ret->notifyCount = parseExpression(s[i + 1]); -- cgit v1.2.3