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

Unified Diff: src/interpreter/source-position-table.h

Issue 1947403002: [interpreter] Introduce bytecode generation pipeline. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/interpreter/source-position-table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/source-position-table.h
diff --git a/src/interpreter/source-position-table.h b/src/interpreter/source-position-table.h
index 3ac58d621787939383f8d442f241138e06df05a5..220ef39f308aec11604ee7cf949b574295226050 100644
--- a/src/interpreter/source-position-table.h
+++ b/src/interpreter/source-position-table.h
@@ -34,7 +34,7 @@ struct PositionTableEntry {
bool is_statement;
};
-class SourcePositionTableBuilder : public PositionsRecorder {
+class SourcePositionTableBuilder final : public PositionsRecorder {
public:
SourcePositionTableBuilder(Isolate* isolate, Zone* zone)
: isolate_(isolate),
@@ -42,16 +42,14 @@ class SourcePositionTableBuilder : public PositionsRecorder {
#ifdef ENABLE_SLOW_DCHECKS
raw_entries_(zone),
#endif
- candidate_(kUninitializedCandidateOffset, 0, false) {
+ previous_() {
}
- void AddStatementPosition(size_t bytecode_offset, int source_position);
- void AddExpressionPosition(size_t bytecode_offset, int source_position);
+ void AddPosition(size_t bytecode_offset, int source_position,
+ bool is_statement);
Handle<ByteArray> ToSourcePositionTable();
private:
- static const int kUninitializedCandidateOffset = -1;
-
void AddEntry(const PositionTableEntry& entry);
void CommitEntry();
@@ -60,7 +58,6 @@ class SourcePositionTableBuilder : public PositionsRecorder {
#ifdef ENABLE_SLOW_DCHECKS
ZoneVector<PositionTableEntry> raw_entries_;
#endif
- PositionTableEntry candidate_; // Next entry to be written, if initialized.
PositionTableEntry previous_; // Previously written entry, to compute delta.
};
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/interpreter/source-position-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698