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

Side by Side Diff: src/wasm/wasm-module.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, 8 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 unified diff | Download patch
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/zone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/macro-assembler.h" 5 #include "src/macro-assembler.h"
6 #include "src/objects.h" 6 #include "src/objects.h"
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/simulator.h" 9 #include "src/simulator.h"
10 10
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // Always make a direct call to whatever is in the table at that location. 582 // Always make a direct call to whatever is in the table at that location.
583 // A wrapper will be generated for FFI calls. 583 // A wrapper will be generated for FFI calls.
584 WasmFunction* function = &module->functions[index]; 584 WasmFunction* function = &module->functions[index];
585 return GetWasmCallDescriptor(zone, function->sig); 585 return GetWasmCallDescriptor(zone, function->sig);
586 } 586 }
587 587
588 588
589 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, 589 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
590 const byte* module_end, bool asm_js) { 590 const byte* module_end, bool asm_js) {
591 HandleScope scope(isolate); 591 HandleScope scope(isolate);
592 Zone zone; 592 Zone zone(isolate->allocator());
593 // Decode the module, but don't verify function bodies, since we'll 593 // Decode the module, but don't verify function bodies, since we'll
594 // be compiling them anyway. 594 // be compiling them anyway.
595 ModuleResult result = DecodeWasmModule(isolate, &zone, module_start, 595 ModuleResult result = DecodeWasmModule(isolate, &zone, module_start,
596 module_end, false, kWasmOrigin); 596 module_end, false, kWasmOrigin);
597 if (result.failed()) { 597 if (result.failed()) {
598 if (result.val) { 598 if (result.val) {
599 delete result.val; 599 delete result.val;
600 } 600 }
601 // Module verification failed. throw. 601 // Module verification failed. throw.
602 std::ostringstream str; 602 std::ostringstream str;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 689 }
690 if (result->IsHeapNumber()) { 690 if (result->IsHeapNumber()) {
691 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); 691 return static_cast<int32_t>(HeapNumber::cast(*result)->value());
692 } 692 }
693 thrower.Error("WASM.compileRun() failed: Return value should be number"); 693 thrower.Error("WASM.compileRun() failed: Return value should be number");
694 return -1; 694 return -1;
695 } 695 }
696 } // namespace wasm 696 } // namespace wasm
697 } // namespace internal 697 } // namespace internal
698 } // namespace v8 698 } // namespace v8
OLDNEW
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/zone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698