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 |
11 #include "src/base/platform/elapsed-timer.h" | 11 #include "src/base/platform/elapsed-timer.h" |
12 #include "src/base/platform/platform.h" | 12 #include "src/base/platform/platform.h" |
13 | 13 |
14 #include "src/compiler/access-builder.h" | 14 #include "src/compiler/access-builder.h" |
15 #include "src/compiler/common-operator.h" | 15 #include "src/compiler/common-operator.h" |
| 16 #include "src/compiler/compiler-source-position-table.h" |
16 #include "src/compiler/diamond.h" | 17 #include "src/compiler/diamond.h" |
17 #include "src/compiler/graph-visualizer.h" | 18 #include "src/compiler/graph-visualizer.h" |
18 #include "src/compiler/graph.h" | 19 #include "src/compiler/graph.h" |
19 #include "src/compiler/instruction-selector.h" | 20 #include "src/compiler/instruction-selector.h" |
20 #include "src/compiler/int64-lowering.h" | 21 #include "src/compiler/int64-lowering.h" |
21 #include "src/compiler/js-graph.h" | 22 #include "src/compiler/js-graph.h" |
22 #include "src/compiler/js-operator.h" | 23 #include "src/compiler/js-operator.h" |
23 #include "src/compiler/linkage.h" | 24 #include "src/compiler/linkage.h" |
24 #include "src/compiler/machine-operator.h" | 25 #include "src/compiler/machine-operator.h" |
25 #include "src/compiler/node-matchers.h" | 26 #include "src/compiler/node-matchers.h" |
26 #include "src/compiler/pipeline.h" | 27 #include "src/compiler/pipeline.h" |
27 #include "src/compiler/simd-scalar-lowering.h" | 28 #include "src/compiler/simd-scalar-lowering.h" |
28 #include "src/compiler/source-position.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-module.h" | 37 #include "src/wasm/wasm-module.h" |
38 #include "src/wasm/wasm-opcodes.h" | 38 #include "src/wasm/wasm-opcodes.h" |
(...skipping 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3077 void WasmGraphBuilder::SimdScalarLoweringForTesting() { | 3077 void WasmGraphBuilder::SimdScalarLoweringForTesting() { |
3078 SimdScalarLowering(jsgraph()->graph(), jsgraph()->machine(), | 3078 SimdScalarLowering(jsgraph()->graph(), jsgraph()->machine(), |
3079 jsgraph()->common(), jsgraph()->zone(), | 3079 jsgraph()->common(), jsgraph()->zone(), |
3080 function_signature_) | 3080 function_signature_) |
3081 .LowerGraph(); | 3081 .LowerGraph(); |
3082 } | 3082 } |
3083 | 3083 |
3084 void WasmGraphBuilder::SetSourcePosition(Node* node, | 3084 void WasmGraphBuilder::SetSourcePosition(Node* node, |
3085 wasm::WasmCodePosition position) { | 3085 wasm::WasmCodePosition position) { |
3086 DCHECK_NE(position, wasm::kNoCodePosition); | 3086 DCHECK_NE(position, wasm::kNoCodePosition); |
3087 compiler::SourcePosition pos(position); | |
3088 if (source_position_table_) | 3087 if (source_position_table_) |
3089 source_position_table_->SetSourcePosition(node, pos); | 3088 source_position_table_->SetSourcePosition(node, SourcePosition(position)); |
3090 } | 3089 } |
3091 | 3090 |
3092 Node* WasmGraphBuilder::CreateS128Value(int32_t value) { | 3091 Node* WasmGraphBuilder::CreateS128Value(int32_t value) { |
3093 // TODO(gdeepti): Introduce Simd128Constant to common-operator.h and use | 3092 // TODO(gdeepti): Introduce Simd128Constant to common-operator.h and use |
3094 // instead of creating a SIMD Value. | 3093 // instead of creating a SIMD Value. |
3095 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), | 3094 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), |
3096 Int32Constant(value), Int32Constant(value), | 3095 Int32Constant(value), Int32Constant(value), |
3097 Int32Constant(value), Int32Constant(value)); | 3096 Int32Constant(value), Int32Constant(value)); |
3098 } | 3097 } |
3099 | 3098 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3485 function_->code_start_offset), | 3484 function_->code_start_offset), |
3486 compile_ms); | 3485 compile_ms); |
3487 } | 3486 } |
3488 | 3487 |
3489 return code; | 3488 return code; |
3490 } | 3489 } |
3491 | 3490 |
3492 } // namespace compiler | 3491 } // namespace compiler |
3493 } // namespace internal | 3492 } // namespace internal |
3494 } // namespace v8 | 3493 } // namespace v8 |
OLD | NEW |