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

Unified Diff: src/assembler.h

Issue 908443002: Remove redundant source position information in RelocInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nits 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/arm64/assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 2f2c73a9ce1ec419c9a2eaf652c94516d0645170..885fc7a9e909cad88befcccfbbc279af1980ed1f 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -644,14 +644,24 @@ class RelocInfo {
// lower addresses.
class RelocInfoWriter BASE_EMBEDDED {
public:
- RelocInfoWriter() : pos_(NULL),
- last_pc_(NULL),
- last_id_(0),
- last_position_(0) {}
- RelocInfoWriter(byte* pos, byte* pc) : pos_(pos),
- last_pc_(pc),
- last_id_(0),
- last_position_(0) {}
+ RelocInfoWriter()
+ : pos_(NULL),
+ last_pc_(NULL),
+ last_id_(0),
+ last_position_(0),
+ last_mode_(RelocInfo::NUMBER_OF_MODES),
+ next_position_candidate_pos_delta_(0),
+ next_position_candidate_pc_delta_(0),
+ next_position_candidate_flushed_(true) {}
+ RelocInfoWriter(byte* pos, byte* pc)
+ : pos_(pos),
+ last_pc_(pc),
+ last_id_(0),
+ last_position_(0),
+ last_mode_(RelocInfo::NUMBER_OF_MODES),
+ next_position_candidate_pos_delta_(0),
+ next_position_candidate_pc_delta_(0),
+ next_position_candidate_flushed_(true) {}
byte* pos() const { return pos_; }
byte* last_pc() const { return last_pc_; }
@@ -665,6 +675,8 @@ class RelocInfoWriter BASE_EMBEDDED {
last_pc_ = pc;
}
+ void Finish() { FlushPosition(); }
+
// Max size (bytes) of a written RelocInfo. Longest encoding is
// ExtraTag, VariableLengthPCJump, ExtraTag, pc_delta, ExtraTag, data_delta.
// On ia32 and arm this is 1 + 4 + 1 + 1 + 1 + 4 = 12.
@@ -681,11 +693,19 @@ class RelocInfoWriter BASE_EMBEDDED {
inline void WriteExtraTaggedData(intptr_t data_delta, int top_tag);
inline void WriteTaggedData(intptr_t data_delta, int tag);
inline void WriteExtraTag(int extra_tag, int top_tag);
+ inline void WritePosition(int pc_delta, int pos_delta, RelocInfo::Mode rmode);
+
+ void FlushPosition();
byte* pos_;
byte* last_pc_;
int last_id_;
int last_position_;
+ RelocInfo::Mode last_mode_;
+ int next_position_candidate_pos_delta_;
+ uint32_t next_position_candidate_pc_delta_;
+ bool next_position_candidate_flushed_;
+
DISALLOW_COPY_AND_ASSIGN(RelocInfoWriter);
};
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698