diff options
author | Keith Winstein <keithw@cs.stanford.edu> | 2023-09-11 15:32:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-11 15:32:26 -0700 |
commit | bceb243429e6801a1d839de880853958d247221f (patch) | |
tree | 42b51babcbddd14be236b83b326c2f47ea5043c0 /include | |
parent | 2581e8d55d01f3c431c2d7fcbfd89ce84fe2811f (diff) | |
download | wabt-bceb243429e6801a1d839de880853958d247221f.tar.gz wabt-bceb243429e6801a1d839de880853958d247221f.tar.bz2 wabt-bceb243429e6801a1d839de880853958d247221f.zip |
Flip order of memory indexes on memory.copy (#2294)
Reflects change in the multi-memory proposal:
https://github.com/WebAssembly/multi-memory/pull/29
Diffstat (limited to 'include')
-rw-r--r-- | include/wabt/binary-reader-logging.h | 2 | ||||
-rw-r--r-- | include/wabt/binary-reader-nop.h | 2 | ||||
-rw-r--r-- | include/wabt/binary-reader.h | 2 | ||||
-rw-r--r-- | include/wabt/ir.h | 10 | ||||
-rw-r--r-- | include/wabt/shared-validator.h | 2 | ||||
-rw-r--r-- | include/wabt/type-checker.h | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/include/wabt/binary-reader-logging.h b/include/wabt/binary-reader-logging.h index 65c5ac66..ba205a10 100644 --- a/include/wabt/binary-reader-logging.h +++ b/include/wabt/binary-reader-logging.h @@ -200,7 +200,7 @@ class BinaryReaderLogging : public BinaryReaderDelegate { Result OnLocalSetExpr(Index local_index) override; Result OnLocalTeeExpr(Index local_index) override; Result OnLoopExpr(Type sig_type) override; - Result OnMemoryCopyExpr(Index srcmemidx, Index destmemidx) override; + Result OnMemoryCopyExpr(Index destmemidx, Index srcmemidx) override; Result OnDataDropExpr(Index segment_index) override; Result OnMemoryFillExpr(Index memidx) override; Result OnMemoryGrowExpr(Index memidx) override; diff --git a/include/wabt/binary-reader-nop.h b/include/wabt/binary-reader-nop.h index 9d4a9a39..75e28d4a 100644 --- a/include/wabt/binary-reader-nop.h +++ b/include/wabt/binary-reader-nop.h @@ -273,7 +273,7 @@ class BinaryReaderNop : public BinaryReaderDelegate { Result OnLocalSetExpr(Index local_index) override { return Result::Ok; } Result OnLocalTeeExpr(Index local_index) override { return Result::Ok; } Result OnLoopExpr(Type sig_type) override { return Result::Ok; } - Result OnMemoryCopyExpr(Index srcmemidx, Index destmemidx) override { + Result OnMemoryCopyExpr(Index destmemidx, Index srcmemidx) override { return Result::Ok; } Result OnDataDropExpr(Index segment_index) override { return Result::Ok; } diff --git a/include/wabt/binary-reader.h b/include/wabt/binary-reader.h index ac0be7b4..1099e217 100644 --- a/include/wabt/binary-reader.h +++ b/include/wabt/binary-reader.h @@ -269,7 +269,7 @@ class BinaryReaderDelegate { virtual Result OnLocalSetExpr(Index local_index) = 0; virtual Result OnLocalTeeExpr(Index local_index) = 0; virtual Result OnLoopExpr(Type sig_type) = 0; - virtual Result OnMemoryCopyExpr(Index srcmemidx, Index destmemidx) = 0; + virtual Result OnMemoryCopyExpr(Index destmemidx, Index srcmemidx) = 0; virtual Result OnDataDropExpr(Index segment_index) = 0; virtual Result OnMemoryFillExpr(Index memidx) = 0; virtual Result OnMemoryGrowExpr(Index memidx) = 0; diff --git a/include/wabt/ir.h b/include/wabt/ir.h index 28818c91..78f3f6f9 100644 --- a/include/wabt/ir.h +++ b/include/wabt/ir.h @@ -493,15 +493,15 @@ class MemoryExpr : public ExprMixin<TypeEnum> { template <ExprType TypeEnum> class MemoryBinaryExpr : public ExprMixin<TypeEnum> { public: - MemoryBinaryExpr(Var srcmemidx, - Var destmemidx, + MemoryBinaryExpr(Var destmemidx, + Var srcmemidx, const Location& loc = Location()) : ExprMixin<TypeEnum>(loc), - srcmemidx(srcmemidx), - destmemidx(destmemidx) {} + destmemidx(destmemidx), + srcmemidx(srcmemidx) {} - Var srcmemidx; Var destmemidx; + Var srcmemidx; }; using DropExpr = ExprMixin<ExprType::Drop>; diff --git a/include/wabt/shared-validator.h b/include/wabt/shared-validator.h index f2e2bf91..32add012 100644 --- a/include/wabt/shared-validator.h +++ b/include/wabt/shared-validator.h @@ -169,7 +169,7 @@ class SharedValidator { Result OnLocalSet(const Location&, Var); Result OnLocalTee(const Location&, Var); Result OnLoop(const Location&, Type sig_type); - Result OnMemoryCopy(const Location&, Var srcmemidx, Var destmemidx); + Result OnMemoryCopy(const Location&, Var destmemidx, Var srcmemidx); Result OnMemoryFill(const Location&, Var memidx); Result OnMemoryGrow(const Location&, Var memidx); Result OnMemoryInit(const Location&, Var segment_var, Var memidx); diff --git a/include/wabt/type-checker.h b/include/wabt/type-checker.h index 7807e89e..1e665c34 100644 --- a/include/wabt/type-checker.h +++ b/include/wabt/type-checker.h @@ -99,7 +99,7 @@ class TypeChecker { Result OnLocalSet(Type); Result OnLocalTee(Type); Result OnLoop(const TypeVector& param_types, const TypeVector& result_types); - Result OnMemoryCopy(const Limits& srclimits, const Limits& dstlimits); + Result OnMemoryCopy(const Limits& dstlimits, const Limits& srclimits); Result OnDataDrop(Index); Result OnMemoryFill(const Limits& limits); Result OnMemoryGrow(const Limits& limits); |