File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -645,9 +645,15 @@ constexpr HeapType noexn = HeapType::noexn;
645645HeapType getMutI8Array ();
646646HeapType getMutI16Array ();
647647
648+ } // namespace HeapTypes
649+
650+ namespace Types {
651+
652+ // Certain Types are used by standard operations. Provide central accessors
653+ // for them to avoid having to build them everywhere they are used.
648654Type getI64Pair ();
649655
650- } // namespace HeapTypes
656+ } // namespace Types
651657
652658// A recursion group consisting of one or more HeapTypes. HeapTypes with single
653659// members are encoded without using any additional memory, which is why
Original file line number Diff line number Diff line change @@ -2834,9 +2834,7 @@ std::unordered_set<HeapType> getIgnorablePublicTypes() {
28342834 return set;
28352835}
28362836
2837- } // namespace wasm
2838-
2839- namespace wasm ::HeapTypes {
2837+ namespace HeapTypes {
28402838
28412839HeapType getMutI8Array () {
28422840 static HeapType i8Array = Array (Field (Field::i8 , Mutable));
@@ -2848,12 +2846,18 @@ HeapType getMutI16Array() {
28482846 return i16Array;
28492847}
28502848
2849+ } // namespace HeapTypes
2850+
2851+ namespace Types {
2852+
28512853Type getI64Pair () {
28522854 static Type i64Pair ({Type::i64 , Type::i64 });
28532855 return i64Pair;
28542856}
28552857
2856- } // namespace wasm::HeapTypes
2858+ } // namespace Types
2859+
2860+ } // namespace wasm
28572861
28582862namespace std {
28592863
Original file line number Diff line number Diff line change @@ -810,7 +810,7 @@ void WideIntAddSub::finalize() {
810810 rightHigh->type == Type::unreachable) {
811811 type = Type::unreachable;
812812 } else {
813- static Type i64Pair = HeapTypes ::getI64Pair ();
813+ static Type i64Pair = Types ::getI64Pair ();
814814 type = i64Pair;
815815 }
816816}
You can’t perform that action at this time.
0 commit comments