| 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 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3079 void WasmGraphBuilder::SimdScalarLoweringForTesting() { | 3079 void WasmGraphBuilder::SimdScalarLoweringForTesting() { |
| 3080 SimdScalarLowering(jsgraph()->graph(), jsgraph()->machine(), | 3080 SimdScalarLowering(jsgraph()->graph(), jsgraph()->machine(), |
| 3081 jsgraph()->common(), jsgraph()->zone(), | 3081 jsgraph()->common(), jsgraph()->zone(), |
| 3082 function_signature_) | 3082 function_signature_) |
| 3083 .LowerGraph(); | 3083 .LowerGraph(); |
| 3084 } | 3084 } |
| 3085 | 3085 |
| 3086 void WasmGraphBuilder::SetSourcePosition(Node* node, | 3086 void WasmGraphBuilder::SetSourcePosition(Node* node, |
| 3087 wasm::WasmCodePosition position) { | 3087 wasm::WasmCodePosition position) { |
| 3088 DCHECK_NE(position, wasm::kNoCodePosition); | 3088 DCHECK_NE(position, wasm::kNoCodePosition); |
| 3089 compiler::SourcePosition pos(position); | |
| 3090 if (source_position_table_) | 3089 if (source_position_table_) |
| 3091 source_position_table_->SetSourcePosition(node, pos); | 3090 source_position_table_->SetSourcePosition(node, SourcePosition(position)); |
| 3092 } | 3091 } |
| 3093 | 3092 |
| 3094 Node* WasmGraphBuilder::CreateS128Value(int32_t value) { | 3093 Node* WasmGraphBuilder::CreateS128Value(int32_t value) { |
| 3095 // TODO(gdeepti): Introduce Simd128Constant to common-operator.h and use | 3094 // TODO(gdeepti): Introduce Simd128Constant to common-operator.h and use |
| 3096 // instead of creating a SIMD Value. | 3095 // instead of creating a SIMD Value. |
| 3097 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), | 3096 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), |
| 3098 Int32Constant(value), Int32Constant(value), | 3097 Int32Constant(value), Int32Constant(value), |
| 3099 Int32Constant(value), Int32Constant(value)); | 3098 Int32Constant(value), Int32Constant(value)); |
| 3100 } | 3099 } |
| 3101 | 3100 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3487 function_->code_start_offset), | 3486 function_->code_start_offset), |
| 3488 compile_ms); | 3487 compile_ms); |
| 3489 } | 3488 } |
| 3490 | 3489 |
| 3491 return code; | 3490 return code; |
| 3492 } | 3491 } |
| 3493 | 3492 |
| 3494 } // namespace compiler | 3493 } // namespace compiler |
| 3495 } // namespace internal | 3494 } // namespace internal |
| 3496 } // namespace v8 | 3495 } // namespace v8 |
| OLD | NEW |