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

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

Issue 1801473003: [ignition, debugger] correctly set position for return with elided bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: src/interpreter/source-position-table.h
diff --git a/src/interpreter/source-position-table.h b/src/interpreter/source-position-table.h
index 9a80ead570eedfc02d9af7a6b56b064f80bb2d4e..6d381856ec6f6d811a62514f3ba27a33632d63c6 100644
--- a/src/interpreter/source-position-table.h
+++ b/src/interpreter/source-position-table.h
@@ -42,21 +42,33 @@ class SourcePositionTableBuilder : public PositionsRecorder {
#ifdef ENABLE_SLOW_DCHECKS
raw_entries_(zone),
#endif
- previous_() {
+ candidate_(kUninitializedCandidateOffset, 0, false) {
}
- void AddStatementPosition(size_t bytecode_offset, int source_position);
+ enum OnDuplicateCodeOffset {
vogelheim 2016/03/14 10:41:15 style nitpick: c++ style wants an enum declaration
Yang 2016/03/14 11:32:34 Done.
+ DISCARD_DUPLICATE,
+ OVERWRITE_DUPLICATE,
+ };
+
+ void AddStatementPosition(
+ size_t bytecode_offset, int source_position,
+ OnDuplicateCodeOffset on_duplicate = DISCARD_DUPLICATE);
void AddExpressionPosition(size_t bytecode_offset, int source_position);
Handle<ByteArray> ToSourcePositionTable();
private:
- void AddEntry(const PositionTableEntry& entry);
+ void AddEntry(const PositionTableEntry& entry,
+ OnDuplicateCodeOffset on_duplicate = DISCARD_DUPLICATE);
+ void CommitEntry();
+
+ static const int kUninitializedCandidateOffset = -1;
vogelheim 2016/03/14 10:41:15 Also style nitpick: consts also go before methods.
Yang 2016/03/14 11:32:34 Done.
Isolate* isolate_;
ZoneVector<byte> bytes_;
#ifdef ENABLE_SLOW_DCHECKS
ZoneVector<PositionTableEntry> raw_entries_;
#endif
+ PositionTableEntry candidate_;
vogelheim 2016/03/14 10:41:15 Maybe add mini-comments on what these do, e.g.: .
Yang 2016/03/14 11:32:34 Done.
PositionTableEntry previous_;
};

Powered by Google App Engine
This is Rietveld 408576698