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

Side by Side Diff: src/interpreter/source-position-table.h

Issue 1737043002: [Interpreter] Log source positions for bytecode arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_cpu_profiler
Patch Set: TickLinesBaseline now works with more source positions Created 4 years, 9 months 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 | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/source-position-table.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_INTERPRETER_SOURCE_POSITION_TABLE_H_ 5 #ifndef V8_INTERPRETER_SOURCE_POSITION_TABLE_H_
6 #define V8_INTERPRETER_SOURCE_POSITION_TABLE_H_ 6 #define V8_INTERPRETER_SOURCE_POSITION_TABLE_H_
7 7
8 #include "src/assert-scope.h" 8 #include "src/assert-scope.h"
9 #include "src/checks.h" 9 #include "src/checks.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
11 #include "src/log.h"
11 #include "src/zone-containers.h" 12 #include "src/zone-containers.h"
12 13
13 namespace v8 { 14 namespace v8 {
14 namespace internal { 15 namespace internal {
15 16
16 class BytecodeArray; 17 class BytecodeArray;
17 class ByteArray; 18 class ByteArray;
18 class Isolate; 19 class Isolate;
19 class Zone; 20 class Zone;
20 21
21 namespace interpreter { 22 namespace interpreter {
22 23
23 struct PositionTableEntry { 24 struct PositionTableEntry {
24 PositionTableEntry() 25 PositionTableEntry()
25 : bytecode_offset(0), source_position(0), is_statement(false) {} 26 : bytecode_offset(0), source_position(0), is_statement(false) {}
26 PositionTableEntry(int bytecode, int source, bool statement) 27 PositionTableEntry(int bytecode, int source, bool statement)
27 : bytecode_offset(bytecode), 28 : bytecode_offset(bytecode),
28 source_position(source), 29 source_position(source),
29 is_statement(statement) {} 30 is_statement(statement) {}
30 31
31 int bytecode_offset; 32 int bytecode_offset;
32 int source_position; 33 int source_position;
33 bool is_statement; 34 bool is_statement;
34 }; 35 };
35 36
36 class SourcePositionTableBuilder { 37 class SourcePositionTableBuilder : public PositionsRecorder {
37 public: 38 public:
38 explicit SourcePositionTableBuilder(Isolate* isolate, Zone* zone) 39 explicit SourcePositionTableBuilder(Isolate* isolate, Zone* zone)
39 : isolate_(isolate), 40 : isolate_(isolate),
40 bytes_(zone), 41 bytes_(zone),
41 #ifdef ENABLE_SLOW_DCHECKS 42 #ifdef ENABLE_SLOW_DCHECKS
42 raw_entries_(zone), 43 raw_entries_(zone),
43 #endif 44 #endif
44 previous_() { 45 previous_() {
45 } 46 }
46 47
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 int index_; 87 int index_;
87 PositionTableEntry current_; 88 PositionTableEntry current_;
88 DisallowHeapAllocation no_gc; 89 DisallowHeapAllocation no_gc;
89 }; 90 };
90 91
91 } // namespace interpreter 92 } // namespace interpreter
92 } // namespace internal 93 } // namespace internal
93 } // namespace v8 94 } // namespace v8
94 95
95 #endif // V8_INTERPRETER_SOURCE_POSITION_TABLE_H_ 96 #endif // V8_INTERPRETER_SOURCE_POSITION_TABLE_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/source-position-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698