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

Unified Diff: src/compiler.h

Issue 959203002: CpuProfiler: replace raw position with SourcePosition for DeoptReason (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for win32 Created 5 years, 10 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/assembler.cc ('k') | src/cpu-profiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 8ef2e0a95b3ca19813347b7de738f1a1ae6a1cfe..59325835711c93bf3f2898c5f60c19d368b35eab 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -39,9 +39,9 @@ struct OffsetRange {
// script start.
class SourcePosition {
public:
- SourcePosition(const SourcePosition& other) : value_(other.value_) {}
-
- static SourcePosition Unknown() { return SourcePosition(kNoPosition); }
+ static SourcePosition Unknown() {
+ return SourcePosition::FromRaw(kNoPosition);
+ }
bool IsUnknown() const { return value_ == kNoPosition; }
@@ -72,10 +72,14 @@ class SourcePosition {
// Offset from the start of the inlined function.
typedef BitField<uint32_t, 9, 23> PositionField;
- explicit SourcePosition(uint32_t value) : value_(value) {}
-
friend class HPositionInfo;
- friend class LCodeGenBase;
+ friend class Deoptimizer;
+
+ static SourcePosition FromRaw(uint32_t raw_position) {
+ SourcePosition position;
+ position.value_ = raw_position;
+ return position;
+ }
// If FLAG_hydrogen_track_positions is set contains bitfields InliningIdField
// and PositionField.
« no previous file with comments | « src/assembler.cc ('k') | src/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698