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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 2626313003: [wasm] Change the constant kV8MaxWasmMemoryPages to a command line flag. (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/flag-definitions.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/compiler/wasm-compiler.h" 5 #include "src/compiler/wasm-compiler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 10
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 graph()->NewNode(load_op, stack_slot_result, jsgraph()->Int32Constant(0), 1772 graph()->NewNode(load_op, stack_slot_result, jsgraph()->Int32Constant(0),
1773 *effect_, *control_); 1773 *effect_, *control_);
1774 *effect_ = load; 1774 *effect_ = load;
1775 return load; 1775 return load;
1776 } 1776 }
1777 1777
1778 Node* WasmGraphBuilder::GrowMemory(Node* input) { 1778 Node* WasmGraphBuilder::GrowMemory(Node* input) {
1779 Diamond check_input_range( 1779 Diamond check_input_range(
1780 graph(), jsgraph()->common(), 1780 graph(), jsgraph()->common(),
1781 graph()->NewNode(jsgraph()->machine()->Uint32LessThanOrEqual(), input, 1781 graph()->NewNode(jsgraph()->machine()->Uint32LessThanOrEqual(), input,
1782 jsgraph()->Uint32Constant(wasm::kV8MaxWasmMemoryPages)), 1782 jsgraph()->Uint32Constant(FLAG_wasm_max_mem_pages)),
1783 BranchHint::kTrue); 1783 BranchHint::kTrue);
1784 1784
1785 check_input_range.Chain(*control_); 1785 check_input_range.Chain(*control_);
1786 1786
1787 Runtime::FunctionId function_id = Runtime::kWasmGrowMemory; 1787 Runtime::FunctionId function_id = Runtime::kWasmGrowMemory;
1788 const Runtime::Function* function = Runtime::FunctionForId(function_id); 1788 const Runtime::Function* function = Runtime::FunctionForId(function_id);
1789 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor( 1789 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(
1790 jsgraph()->zone(), function_id, function->nargs, Operator::kNoThrow, 1790 jsgraph()->zone(), function_id, function->nargs, Operator::kNoThrow,
1791 CallDescriptor::kNoFlags); 1791 CallDescriptor::kNoFlags);
1792 wasm::ModuleEnv* module = module_; 1792 wasm::ModuleEnv* module = module_;
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
3873 Smi::FromInt(instruction.instr_offset)); 3873 Smi::FromInt(instruction.instr_offset));
3874 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset, 3874 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset,
3875 Smi::FromInt(instruction.landing_offset)); 3875 Smi::FromInt(instruction.landing_offset));
3876 } 3876 }
3877 return fn_protected; 3877 return fn_protected;
3878 } 3878 }
3879 3879
3880 } // namespace compiler 3880 } // namespace compiler
3881 } // namespace internal 3881 } // namespace internal
3882 } // namespace v8 3882 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698