Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: src/wasm/function-body-decoder.h

Issue 2610813009: [wasm] factor lower level utilties out of WasmFullDecoder (Closed)
Patch Set: harden decl decoding Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/decoder.h ('k') | src/wasm/function-body-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/function-body-decoder.h
diff --git a/src/wasm/function-body-decoder.h b/src/wasm/function-body-decoder.h
index b58b8e3bf6ba05ea358973af0922e7009a11b86b..836dda4b44a9c4408f85aab006237cc6d30e2e3a 100644
--- a/src/wasm/function-body-decoder.h
+++ b/src/wasm/function-body-decoder.h
@@ -359,20 +359,15 @@ inline DecodeResult BuildTFGraph(AccountingAllocator* allocator,
struct BodyLocalDecls {
// The size of the encoded declarations.
- uint32_t decls_encoded_size; // size of encoded declarations
+ uint32_t encoded_size; // size of encoded declarations
- // Total number of locals.
- uint32_t total_local_count;
-
- // List of {local type, count} pairs.
- ZoneVector<std::pair<ValueType, uint32_t>> local_types;
+ ZoneVector<ValueType> type_list;
// Constructor initializes the vector.
- explicit BodyLocalDecls(Zone* zone)
- : decls_encoded_size(0), total_local_count(0), local_types(zone) {}
+ explicit BodyLocalDecls(Zone* zone) : encoded_size(0), type_list(zone) {}
};
-V8_EXPORT_PRIVATE bool DecodeLocalDecls(BodyLocalDecls& decls,
+V8_EXPORT_PRIVATE bool DecodeLocalDecls(BodyLocalDecls* decls,
const byte* start, const byte* end);
V8_EXPORT_PRIVATE BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone,
size_t num_locals,
« no previous file with comments | « src/wasm/decoder.h ('k') | src/wasm/function-body-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698