| Index: src/wasm/ast-decoder.h
|
| diff --git a/src/wasm/ast-decoder.h b/src/wasm/ast-decoder.h
|
| index 4a02ea5abfec73bc487141a6622a7190ba4aa55f..5376e7bfdd9db7ab6e0521726b77c77e9f9013bc 100644
|
| --- a/src/wasm/ast-decoder.h
|
| +++ b/src/wasm/ast-decoder.h
|
| @@ -220,8 +220,22 @@ enum ReadUnsignedLEB128ErrorCode { kNoError, kInvalidLEB128, kMissingLEB128 };
|
| ReadUnsignedLEB128ErrorCode ReadUnsignedLEB128Operand(const byte*, const byte*,
|
| int*, uint32_t*);
|
|
|
| -std::vector<LocalType>* DecodeLocalDeclsForTesting(
|
| - base::AccountingAllocator* allocator, const byte* start, const byte* end);
|
| +struct AstLocalDecls {
|
| + // The size of the encoded declarations.
|
| + uint32_t decls_encoded_size; // size of encoded declarations
|
| +
|
| + // Total number of locals.
|
| + uint32_t total_local_count;
|
| +
|
| + // List of {local type, count} pairs.
|
| + ZoneVector<std::pair<LocalType, uint32_t>> local_types;
|
| +
|
| + // Constructor initializes the vector.
|
| + explicit AstLocalDecls(Zone* zone)
|
| + : decls_encoded_size(0), total_local_count(0), local_types(zone) {}
|
| +};
|
| +
|
| +bool DecodeLocalDecls(AstLocalDecls& decls, const byte* start, const byte* end);
|
| BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals,
|
| const byte* start, const byte* end);
|
|
|
|
|