Bug 1316635: Order declarations in WasmBinaryFormat.h; r=luke
authorBenjamin Bouvier <benj@benj.me>
Thu, 10 Nov 2016 18:32:40 +0100
changeset 322149 4ad7c2178c63b45d970b85227ef228d1a21c2a28
parent 322148 aed62b2e0a8a14845fcc975ed70874dc6bd46f1c
child 322150 aa7d53db2b20305a17e5563d7205b719816648b3
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersluke
bugs1316635
milestone52.0a1
Bug 1316635: Order declarations in WasmBinaryFormat.h; r=luke MozReview-Commit-ID: EIiKmi9aNDt
js/src/wasm/WasmBinaryFormat.h
--- a/js/src/wasm/WasmBinaryFormat.h
+++ b/js/src/wasm/WasmBinaryFormat.h
@@ -630,68 +630,72 @@ class Decoder
         memcpy(f32x4, &t, sizeof(t));
     }
 };
 
 // Reusable macro encoding/decoding functions reused by both the two
 // encoders (AsmJS/WasmTextToBinary) and all the decoders
 // (WasmCompile/WasmIonCompile/WasmBaselineCompile/WasmBinaryToText).
 
-MOZ_MUST_USE bool
-DecodePreamble(Decoder& d);
+// Misc helpers.
 
 MOZ_MUST_USE bool
 CheckValType(Decoder& d, ValType type);
 
-MOZ_MUST_USE bool
-DecodeTypeSection(Decoder& d, SigWithIdVector* sigs);
-
 UniqueChars
 DecodeName(Decoder& d);
 
 MOZ_MUST_USE bool
 DecodeTableLimits(Decoder& d, TableDescVector* tables);
 
 MOZ_MUST_USE bool
 GlobalIsJSCompatible(Decoder& d, ValType type, bool isMutable);
 
 MOZ_MUST_USE bool
-DecodeImportSection(Decoder& d, const SigWithIdVector& sigs, Uint32Vector* funcSigIndices,
-                    GlobalDescVector* globals, TableDescVector* tables, Maybe<Limits>* memory,
-                    ImportVector* imports);
-
-MOZ_MUST_USE bool
-DecodeFunctionSection(Decoder& d, const SigWithIdVector& sigs, size_t numImportedFunc,
-                      Uint32Vector* funcSigIndexes);
-
-MOZ_MUST_USE bool
 EncodeLocalEntries(Encoder& d, const ValTypeVector& locals);
 
 MOZ_MUST_USE bool
 DecodeLocalEntries(Decoder& d, ValTypeVector* locals);
 
 MOZ_MUST_USE bool
 DecodeGlobalType(Decoder& d, ValType* type, bool* isMutable);
 
 MOZ_MUST_USE bool
 DecodeInitializerExpression(Decoder& d, const GlobalDescVector& globals, ValType expected,
                             InitExpr* init);
 
 MOZ_MUST_USE bool
 DecodeLimits(Decoder& d, Limits* limits);
 
 MOZ_MUST_USE bool
+DecodeMemoryLimits(Decoder& d, bool hasMemory, Limits* memory);
+
+// Section macros.
+
+MOZ_MUST_USE bool
+DecodePreamble(Decoder& d);
+
+MOZ_MUST_USE bool
+DecodeTypeSection(Decoder& d, SigWithIdVector* sigs);
+
+MOZ_MUST_USE bool
+DecodeImportSection(Decoder& d, const SigWithIdVector& sigs, Uint32Vector* funcSigIndices,
+                    GlobalDescVector* globals, TableDescVector* tables, Maybe<Limits>* memory,
+                    ImportVector* imports);
+
+MOZ_MUST_USE bool
+DecodeFunctionSection(Decoder& d, const SigWithIdVector& sigs, size_t numImportedFunc,
+                      Uint32Vector* funcSigIndexes);
+
+MOZ_MUST_USE bool
 DecodeUnknownSections(Decoder& d);
 
 MOZ_MUST_USE bool
 DecodeDataSection(Decoder& d, bool usesMemory, uint32_t minMemoryByteLength,
                   const GlobalDescVector& globals, DataSegmentVector* segments);
 
 MOZ_MUST_USE bool
-DecodeMemoryLimits(Decoder& d, bool hasMemory, Limits* memory);
-
-MOZ_MUST_USE bool
 DecodeMemorySection(Decoder& d, bool hasMemory, Limits* memory, bool* present);
 
 } // namespace wasm
 } // namespace js
 
 #endif // wasm_binary_format_h