From 3ca8c21b89c207ce5d872e9cb2d410a869522d38 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 13 Sep 2023 10:13:33 -0500 Subject: Replace I31New with RefI31 everywhere (#5930) Globally replace the source string "I31New" with "RefI31" in preparation for renaming the instruction from "i31.new" to "ref.i31", as implemented in the spec in https://github.com/WebAssembly/gc/pull/422. This would be NFC, except that it also changes the string in the external-facing C APIs. A follow-up PR will make the corresponding behavioral change. --- src/wasm/wat-parser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/wasm/wat-parser.cpp') diff --git a/src/wasm/wat-parser.cpp b/src/wasm/wat-parser.cpp index bdd1af0d8..6a18b2f87 100644 --- a/src/wasm/wat-parser.cpp +++ b/src/wasm/wat-parser.cpp @@ -760,7 +760,7 @@ struct NullInstrParserCtx { InstrT makeRefEq(Index) { return Ok{}; } - InstrT makeI31New(Index) { return Ok{}; } + InstrT makeRefI31(Index) { return Ok{}; } InstrT makeI31Get(Index, bool) { return Ok{}; } template InstrT makeStructNew(Index, HeapTypeT) { @@ -1762,8 +1762,8 @@ struct ParseDefsCtx : TypeParserCtx { Result<> makeRefEq(Index pos) { return withLoc(pos, irBuilder.makeRefEq()); } - Result<> makeI31New(Index pos) { - return withLoc(pos, irBuilder.makeI31New()); + Result<> makeRefI31(Index pos) { + return withLoc(pos, irBuilder.makeRefI31()); } Result<> makeI31Get(Index pos, bool signed_) { @@ -1947,7 +1947,7 @@ template Result makeTupleExtract(Ctx&, Index); template Result makeCallRef(Ctx&, Index, bool isReturn); -template Result makeI31New(Ctx&, Index); +template Result makeRefI31(Ctx&, Index); template Result makeI31Get(Ctx&, Index, bool signed_); template Result makeRefTest(Ctx&, Index); @@ -3042,8 +3042,8 @@ Result makeCallRef(Ctx& ctx, Index pos, bool isReturn) { } template -Result makeI31New(Ctx& ctx, Index pos) { - return ctx.makeI31New(pos); +Result makeRefI31(Ctx& ctx, Index pos) { + return ctx.makeRefI31(pos); } template -- cgit v1.2.3