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

Unified Diff: src/source-position.h

Issue 2503393002: [cpu-profiler] use new source position information for deoptimization in cpu profiler (Closed)
Patch Set: addressed comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/profiler/profiler-listener.cc ('k') | src/source-position.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/source-position.h
diff --git a/src/source-position.h b/src/source-position.h
index 8410bcd3ba6f725e4e64fbc95884623c914d23b2..aa7d31bae2ff93ab0bc249fdf1503ef534cc4ac9 100644
--- a/src/source-position.h
+++ b/src/source-position.h
@@ -67,17 +67,13 @@ class SourcePosition final {
int64_t raw() const { return static_cast<int64_t>(value_); }
static SourcePosition FromRaw(int64_t raw) {
- SourcePosition position;
+ SourcePosition position = Unknown();
DCHECK_GE(raw, 0);
position.value_ = static_cast<uint64_t>(raw);
return position;
}
private:
- // SourcePosition is used in a union in CodeEventsContainer, which requires a
- // trivial constructor.
- SourcePosition() = default;
-
void Print(std::ostream& out, SharedFunctionInfo* function) const;
SourcePositionInfo Info(Handle<SharedFunctionInfo> script) const;
@@ -106,10 +102,11 @@ struct InliningPosition {
};
struct SourcePositionInfo {
- explicit SourcePositionInfo(SourcePosition pos) : position(pos) {}
+ explicit SourcePositionInfo(SourcePosition pos, Handle<SharedFunctionInfo> f)
+ : position(pos), function(f) {}
SourcePosition position;
- MaybeHandle<SharedFunctionInfo> function;
+ Handle<SharedFunctionInfo> function;
int line = -1;
int column = -1;
};
« no previous file with comments | « src/profiler/profiler-listener.cc ('k') | src/source-position.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698