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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed PodArray::copy_out 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/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/bytecode-branch-analysis.h" 10 #include "src/compiler/bytecode-branch-analysis.h"
11 #include "src/compiler/compiler-source-position-table.h"
11 #include "src/compiler/linkage.h" 12 #include "src/compiler/linkage.h"
12 #include "src/compiler/operator-properties.h" 13 #include "src/compiler/operator-properties.h"
13 #include "src/interpreter/bytecodes.h" 14 #include "src/interpreter/bytecodes.h"
14 #include "src/objects-inl.h" 15 #include "src/objects-inl.h"
15 16
16 namespace v8 { 17 namespace v8 {
17 namespace internal { 18 namespace internal {
18 namespace compiler { 19 namespace compiler {
19 20
20 // The abstract execution environment simulates the content of the interpreter 21 // The abstract execution environment simulates the content of the interpreter
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 } 2189 }
2189 2190
2190 void BytecodeGraphBuilder::UpdateCurrentSourcePosition( 2191 void BytecodeGraphBuilder::UpdateCurrentSourcePosition(
2191 SourcePositionTableIterator* it, int offset) { 2192 SourcePositionTableIterator* it, int offset) {
2192 // TODO(neis): Remove this once inlining supports source positions. 2193 // TODO(neis): Remove this once inlining supports source positions.
2193 if (source_positions_ == nullptr) return; 2194 if (source_positions_ == nullptr) return;
2194 2195
2195 if (it->done()) return; 2196 if (it->done()) return;
2196 2197
2197 if (it->code_offset() == offset) { 2198 if (it->code_offset() == offset) {
2198 source_positions_->set_current_position(it->source_position()); 2199 source_positions_->SetCurrentPosition(it->source_position());
2199 it->Advance(); 2200 it->Advance();
2200 } else { 2201 } else {
2201 DCHECK_GT(it->code_offset(), offset); 2202 DCHECK_GT(it->code_offset(), offset);
2202 } 2203 }
2203 } 2204 }
2204 2205
2205 } // namespace compiler 2206 } // namespace compiler
2206 } // namespace internal 2207 } // namespace internal
2207 } // namespace v8 2208 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698