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

Unified Diff: test/cctest/wasm/wasm-run-utils.h

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 | « test/cctest/wasm/test-run-wasm-module.cc ('k') | test/fuzzer/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/wasm-run-utils.h
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
index 53b7cb4ec8ce956e7442268e9bf671c1935d9485..1e85f46887cb7783e6c30cef057a092295edb93d 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -221,7 +221,8 @@ inline void TestBuildingGraph(Zone* zone, JSGraph* jsgraph, ModuleEnv* module,
FunctionSig* sig, const byte* start,
const byte* end) {
compiler::WasmGraphBuilder builder(zone, jsgraph, sig);
- TreeResult result = BuildTFGraph(&builder, module, sig, start, end);
+ TreeResult result =
+ BuildTFGraph(zone->allocator(), &builder, module, sig, start, end);
if (result.failed()) {
ptrdiff_t pc = result.error_pc - result.start;
ptrdiff_t pt = result.error_pt - result.start;
@@ -485,8 +486,8 @@ class WasmRunner {
MachineType p1 = MachineType::None(),
MachineType p2 = MachineType::None(),
MachineType p3 = MachineType::None())
- : compiled_(false),
-
+ : zone(&allocator_),
+ compiled_(false),
signature_(MachineTypeForC<ReturnType>() == MachineType::None() ? 0 : 1,
GetParameterCount(p0, p1, p2, p3), storage_),
compiler_(&signature_, nullptr) {
@@ -497,7 +498,8 @@ class WasmRunner {
MachineType p1 = MachineType::None(),
MachineType p2 = MachineType::None(),
MachineType p3 = MachineType::None())
- : compiled_(false),
+ : zone(&allocator_),
+ compiled_(false),
signature_(MachineTypeForC<ReturnType>() == MachineType::None() ? 0 : 1,
GetParameterCount(p0, p1, p2, p3), storage_),
compiler_(&signature_, module) {
@@ -577,6 +579,7 @@ class WasmRunner {
byte AllocateLocal(LocalType type) { return compiler_.AllocateLocal(type); }
protected:
+ v8::base::AccountingAllocator allocator_;
Zone zone;
bool compiled_;
LocalType storage_[WASM_RUNNER_MAX_NUM_PARAMETERS];
« no previous file with comments | « test/cctest/wasm/test-run-wasm-module.cc ('k') | test/fuzzer/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698