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

Unified Diff: src/assembler.h

Issue 2072963003: Simplify AssemblerPositionsRecorder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index ab4493bce75d2a746806184300c3338cfb8526f3..c2bd2771c6837485691b1a3eb2e8972f945e4220 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -1160,26 +1160,29 @@ struct PositionState {
class AssemblerPositionsRecorder : public PositionsRecorder {
public:
explicit AssemblerPositionsRecorder(Assembler* assembler)
- : assembler_(assembler) {}
+ : assembler_(assembler),
+ current_position_(RelocInfo::kNoPosition),
+ written_position_(RelocInfo::kNoPosition),
+ current_statement_position_(RelocInfo::kNoPosition),
+ written_statement_position_(RelocInfo::kNoPosition) {}
// Set current position to pos.
- void RecordPosition(int pos);
+ bool RecordPosition(int pos);
// Set current statement position to pos.
- void RecordStatementPosition(int pos);
+ bool RecordStatementPosition(int pos);
+ private:
// Write recorded positions to relocation information.
bool WriteRecordedPositions();
- int current_position() const { return state_.current_position; }
+ Assembler* assembler_;
- int current_statement_position() const {
- return state_.current_statement_position;
- }
+ int current_position_;
+ int written_position_;
- private:
- Assembler* assembler_;
- PositionState state_;
+ int current_statement_position_;
+ int written_statement_position_;
DISALLOW_COPY_AND_ASSIGN(AssemblerPositionsRecorder);
};
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/assembler.cc » ('j') | src/assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698