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

Unified Diff: src/wasm/ast-decoder.cc

Issue 1847543002: Expose a lower bound of malloc'd memory via heap statistics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 9 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/ast-decoder.h ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index 9e943b0fa534b8b643aff485d6f6e04f8279288d..524a4c82c1bf06db3376a14d39fdfbbd2e85e52a 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -1626,23 +1626,25 @@ class SR_WasmDecoder : public WasmDecoder {
}
};
-std::vector<LocalType>* DecodeLocalDeclsForTesting(const byte* start,
- const byte* end) {
- Zone zone;
+std::vector<LocalType>* DecodeLocalDeclsForTesting(
+ base::AccountingAllocator* allocator, const byte* start, const byte* end) {
+ Zone zone(allocator);
FunctionBody body = {nullptr, nullptr, nullptr, start, end};
SR_WasmDecoder decoder(&zone, nullptr, body);
return decoder.DecodeLocalDeclsForTesting();
}
-TreeResult VerifyWasmCode(FunctionBody& body) {
- Zone zone;
+TreeResult VerifyWasmCode(base::AccountingAllocator* allocator,
+ FunctionBody& body) {
+ Zone zone(allocator);
SR_WasmDecoder decoder(&zone, nullptr, body);
TreeResult result = decoder.Decode();
return result;
}
-TreeResult BuildTFGraph(TFBuilder* builder, FunctionBody& body) {
- Zone zone;
+TreeResult BuildTFGraph(base::AccountingAllocator* allocator,
+ TFBuilder* builder, FunctionBody& body) {
+ Zone zone(allocator);
SR_WasmDecoder decoder(&zone, builder, body);
TreeResult result = decoder.Decode();
return result;
@@ -1686,8 +1688,8 @@ int OpcodeArity(ModuleEnv* module, FunctionSig* sig, const byte* pc,
return decoder.OpcodeArity(pc);
}
-void PrintAst(FunctionBody& body) {
- Zone zone;
+void PrintAst(base::AccountingAllocator* allocator, FunctionBody& body) {
+ Zone zone(allocator);
SR_WasmDecoder decoder(&zone, nullptr, body);
OFStream os(stdout);
« no previous file with comments | « src/wasm/ast-decoder.h ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698