| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |