@@ -274,8 +274,15 @@ template<typename Ctx>
274274Result<>
275275makeArrayGet (Ctx&, Index, const std::vector<Annotation>&, bool signed_ = false );
276276template <typename Ctx>
277+ Result<> makeAtomicArrayGet (Ctx&,
278+ Index,
279+ const std::vector<Annotation>&,
280+ bool signed_ = false );
281+ template <typename Ctx>
277282Result<> makeArraySet (Ctx&, Index, const std::vector<Annotation>&);
278283template <typename Ctx>
284+ Result<> makeAtomicArraySet (Ctx&, Index, const std::vector<Annotation>&);
285+ template <typename Ctx>
279286Result<> makeArrayLen (Ctx&, Index, const std::vector<Annotation>&);
280287template <typename Ctx>
281288Result<> makeArrayCopy (Ctx&, Index, const std::vector<Annotation>&);
@@ -2411,15 +2418,39 @@ Result<> makeArrayGet(Ctx& ctx,
24112418 bool signed_) {
24122419 auto type = typeidx (ctx);
24132420 CHECK_ERR (type);
2414- return ctx.makeArrayGet (pos, annotations, *type, signed_);
2421+ return ctx.makeArrayGet (
2422+ pos, annotations, *type, signed_, MemoryOrder::Unordered);
2423+ }
2424+
2425+ template <typename Ctx>
2426+ Result<> makeAtomicArrayGet (Ctx& ctx,
2427+ Index pos,
2428+ const std::vector<Annotation>& annotations,
2429+ bool signed_) {
2430+ auto order = memorder (ctx);
2431+ CHECK_ERR (order);
2432+ auto type = typeidx (ctx);
2433+ CHECK_ERR (type);
2434+ return ctx.makeArrayGet (pos, annotations, *type, signed_, *order);
24152435}
24162436
24172437template <typename Ctx>
24182438Result<>
24192439makeArraySet (Ctx& ctx, Index pos, const std::vector<Annotation>& annotations) {
24202440 auto type = typeidx (ctx);
24212441 CHECK_ERR (type);
2422- return ctx.makeArraySet (pos, annotations, *type);
2442+ return ctx.makeArraySet (pos, annotations, *type, MemoryOrder::Unordered);
2443+ }
2444+
2445+ template <typename Ctx>
2446+ Result<> makeAtomicArraySet (Ctx& ctx,
2447+ Index pos,
2448+ const std::vector<Annotation>& annotations) {
2449+ auto order = memorder (ctx);
2450+ CHECK_ERR (order);
2451+ auto type = typeidx (ctx);
2452+ CHECK_ERR (type);
2453+ return ctx.makeArraySet (pos, annotations, *type, *order);
24232454}
24242455
24252456template <typename Ctx>
0 commit comments