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/binaryen-c.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/binaryen-c.cpp') diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index fd00c25c0..598156782 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -1732,10 +1732,10 @@ BinaryenExpressionRef BinaryenRethrow(BinaryenModuleRef module, Builder(*(Module*)module).makeRethrow(target)); } -BinaryenExpressionRef BinaryenI31New(BinaryenModuleRef module, +BinaryenExpressionRef BinaryenRefI31(BinaryenModuleRef module, BinaryenExpressionRef value) { return static_cast( - Builder(*(Module*)module).makeI31New((Expression*)value)); + Builder(*(Module*)module).makeRefI31((Expression*)value)); } BinaryenExpressionRef BinaryenI31Get(BinaryenModuleRef module, @@ -3952,18 +3952,18 @@ void BinaryenTupleExtractSetIndex(BinaryenExpressionRef expr, assert(expression->is()); static_cast(expression)->index = index; } -// I31New -BinaryenExpressionRef BinaryenI31NewGetValue(BinaryenExpressionRef expr) { +// RefI31 +BinaryenExpressionRef BinaryenRefI31GetValue(BinaryenExpressionRef expr) { auto* expression = (Expression*)expr; - assert(expression->is()); - return static_cast(expression)->value; + assert(expression->is()); + return static_cast(expression)->value; } -void BinaryenI31NewSetValue(BinaryenExpressionRef expr, +void BinaryenRefI31SetValue(BinaryenExpressionRef expr, BinaryenExpressionRef valueExpr) { auto* expression = (Expression*)expr; - assert(expression->is()); + assert(expression->is()); assert(valueExpr); - static_cast(expression)->value = (Expression*)valueExpr; + static_cast(expression)->value = (Expression*)valueExpr; } // I31Get BinaryenExpressionRef BinaryenI31GetGetI31(BinaryenExpressionRef expr) { -- cgit v1.2.3