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

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

Issue 2551463002: [wasm] Move all V8-specific limitations to wasm-limits.h (Closed)
Patch Set: Created 4 years 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 | « BUILD.gn ('k') | src/v8.gyp » ('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 16 matching lines...) Expand all
27 #include "src/compiler/pipeline.h" 27 #include "src/compiler/pipeline.h"
28 #include "src/compiler/simd-scalar-lowering.h" 28 #include "src/compiler/simd-scalar-lowering.h"
29 #include "src/compiler/zone-stats.h" 29 #include "src/compiler/zone-stats.h"
30 30
31 #include "src/code-factory.h" 31 #include "src/code-factory.h"
32 #include "src/code-stubs.h" 32 #include "src/code-stubs.h"
33 #include "src/factory.h" 33 #include "src/factory.h"
34 #include "src/log-inl.h" 34 #include "src/log-inl.h"
35 35
36 #include "src/wasm/ast-decoder.h" 36 #include "src/wasm/ast-decoder.h"
37 #include "src/wasm/wasm-limits.h"
37 #include "src/wasm/wasm-module.h" 38 #include "src/wasm/wasm-module.h"
38 #include "src/wasm/wasm-opcodes.h" 39 #include "src/wasm/wasm-opcodes.h"
39 #include "src/wasm/wasm-text.h" 40 #include "src/wasm/wasm-text.h"
40 41
41 // TODO(titzer): pull WASM_64 up to a common header. 42 // TODO(titzer): pull WASM_64 up to a common header.
42 #if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64 43 #if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64
43 #define WASM_64 1 44 #define WASM_64 1
44 #else 45 #else
45 #define WASM_64 0 46 #define WASM_64 0
46 #endif 47 #endif
(...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 Node* load = 1717 Node* load =
1717 graph()->NewNode(load_op, stack_slot_result, jsgraph()->Int32Constant(0), 1718 graph()->NewNode(load_op, stack_slot_result, jsgraph()->Int32Constant(0),
1718 *effect_, *control_); 1719 *effect_, *control_);
1719 *effect_ = load; 1720 *effect_ = load;
1720 return load; 1721 return load;
1721 } 1722 }
1722 1723
1723 Node* WasmGraphBuilder::GrowMemory(Node* input) { 1724 Node* WasmGraphBuilder::GrowMemory(Node* input) {
1724 Diamond check_input_range( 1725 Diamond check_input_range(
1725 graph(), jsgraph()->common(), 1726 graph(), jsgraph()->common(),
1726 graph()->NewNode( 1727 graph()->NewNode(jsgraph()->machine()->Uint32LessThanOrEqual(), input,
1727 jsgraph()->machine()->Uint32LessThanOrEqual(), input, 1728 jsgraph()->Uint32Constant(wasm::kV8MaxWasmMemoryPages)),
1728 jsgraph()->Uint32Constant(wasm::WasmModule::kV8MaxPages)),
1729 BranchHint::kTrue); 1729 BranchHint::kTrue);
1730 1730
1731 check_input_range.Chain(*control_); 1731 check_input_range.Chain(*control_);
1732 1732
1733 Runtime::FunctionId function_id = Runtime::kWasmGrowMemory; 1733 Runtime::FunctionId function_id = Runtime::kWasmGrowMemory;
1734 const Runtime::Function* function = Runtime::FunctionForId(function_id); 1734 const Runtime::Function* function = Runtime::FunctionForId(function_id);
1735 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor( 1735 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(
1736 jsgraph()->zone(), function_id, function->nargs, Operator::kNoThrow, 1736 jsgraph()->zone(), function_id, function->nargs, Operator::kNoThrow,
1737 CallDescriptor::kNoFlags); 1737 CallDescriptor::kNoFlags);
1738 wasm::ModuleEnv* module = module_; 1738 wasm::ModuleEnv* module = module_;
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
3540 Smi::FromInt(instruction.instr_offset)); 3540 Smi::FromInt(instruction.instr_offset));
3541 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset, 3541 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset,
3542 Smi::FromInt(instruction.landing_offset)); 3542 Smi::FromInt(instruction.landing_offset));
3543 } 3543 }
3544 return fn_protected; 3544 return fn_protected;
3545 } 3545 }
3546 3546
3547 } // namespace compiler 3547 } // namespace compiler
3548 } // namespace internal 3548 } // namespace internal
3549 } // namespace v8 3549 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698