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

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

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed obsolete identifiers Created 4 years, 1 month 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
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
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 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 void WasmGraphBuilder::SimdScalarLoweringForTesting() { 3051 void WasmGraphBuilder::SimdScalarLoweringForTesting() {
3052 SimdScalarLowering(jsgraph()->graph(), jsgraph()->machine(), 3052 SimdScalarLowering(jsgraph()->graph(), jsgraph()->machine(),
3053 jsgraph()->common(), jsgraph()->zone(), 3053 jsgraph()->common(), jsgraph()->zone(),
3054 function_signature_) 3054 function_signature_)
3055 .LowerGraph(); 3055 .LowerGraph();
3056 } 3056 }
3057 3057
3058 void WasmGraphBuilder::SetSourcePosition(Node* node, 3058 void WasmGraphBuilder::SetSourcePosition(Node* node,
3059 wasm::WasmCodePosition position) { 3059 wasm::WasmCodePosition position) {
3060 DCHECK_NE(position, wasm::kNoCodePosition); 3060 DCHECK_NE(position, wasm::kNoCodePosition);
3061 compiler::SourcePosition pos(position);
3062 if (source_position_table_) 3061 if (source_position_table_)
3063 source_position_table_->SetSourcePosition(node, pos); 3062 source_position_table_->SetSourcePosition(node, SourcePosition(position));
3064 } 3063 }
3065 3064
3066 Node* WasmGraphBuilder::CreateS128Value(int32_t value) { 3065 Node* WasmGraphBuilder::CreateS128Value(int32_t value) {
3067 // TODO(gdeepti): Introduce Simd128Constant to common-operator.h and use 3066 // TODO(gdeepti): Introduce Simd128Constant to common-operator.h and use
3068 // instead of creating a SIMD Value. 3067 // instead of creating a SIMD Value.
3069 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), 3068 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(),
3070 Int32Constant(value), Int32Constant(value), 3069 Int32Constant(value), Int32Constant(value),
3071 Int32Constant(value), Int32Constant(value)); 3070 Int32Constant(value), Int32Constant(value));
3072 } 3071 }
3073 3072
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
3459 function_->code_start_offset), 3458 function_->code_start_offset),
3460 compile_ms); 3459 compile_ms);
3461 } 3460 }
3462 3461
3463 return code; 3462 return code;
3464 } 3463 }
3465 3464
3466 } // namespace compiler 3465 } // namespace compiler
3467 } // namespace internal 3466 } // namespace internal
3468 } // namespace v8 3467 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698