| Index: src/x64/assembler-x64.cc
|
| diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc
|
| index bf5ee5bbb77aeb3b89e506b615d9e014057c131c..caed7c8aa9bca113cab900354aeca1c4b691fb28 100644
|
| --- a/src/x64/assembler-x64.cc
|
| +++ b/src/x64/assembler-x64.cc
|
| @@ -296,7 +296,7 @@ static void InitCoverageLog();
|
| byte* Assembler::spare_buffer_ = NULL;
|
|
|
| Assembler::Assembler(void* buffer, int buffer_size)
|
| - : code_targets_(100) {
|
| + : code_targets_(100), positions_recorder_(this) {
|
| if (buffer == NULL) {
|
| // Do our own buffer management.
|
| if (buffer_size <= kMinimalBufferSize) {
|
| @@ -337,10 +337,7 @@ Assembler::Assembler(void* buffer, int buffer_size)
|
| reloc_info_writer.Reposition(buffer_ + buffer_size, pc_);
|
|
|
| last_pc_ = NULL;
|
| - current_statement_position_ = RelocInfo::kNoPosition;
|
| - current_position_ = RelocInfo::kNoPosition;
|
| - written_statement_position_ = current_statement_position_;
|
| - written_position_ = current_position_;
|
| +
|
| #ifdef GENERATED_CODE_COVERAGE
|
| InitCoverageLog();
|
| #endif
|
| @@ -845,7 +842,7 @@ void Assembler::call(Label* L) {
|
|
|
|
|
| void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) {
|
| - WriteRecordedPositions();
|
| + positions_recorder()->WriteRecordedPositions();
|
| EnsureSpace ensure_space(this);
|
| last_pc_ = pc_;
|
| // 1110 1000 #32-bit disp.
|
| @@ -2935,14 +2932,14 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
|
| }
|
|
|
| void Assembler::RecordJSReturn() {
|
| - WriteRecordedPositions();
|
| + positions_recorder()->WriteRecordedPositions();
|
| EnsureSpace ensure_space(this);
|
| RecordRelocInfo(RelocInfo::JS_RETURN);
|
| }
|
|
|
|
|
| void Assembler::RecordDebugBreakSlot() {
|
| - WriteRecordedPositions();
|
| + positions_recorder()->WriteRecordedPositions();
|
| EnsureSpace ensure_space(this);
|
| RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
|
| }
|
| @@ -2956,47 +2953,6 @@ void Assembler::RecordComment(const char* msg) {
|
| }
|
|
|
|
|
| -void Assembler::RecordPosition(int pos) {
|
| - ASSERT(pos != RelocInfo::kNoPosition);
|
| - ASSERT(pos >= 0);
|
| - current_position_ = pos;
|
| -}
|
| -
|
| -
|
| -void Assembler::RecordStatementPosition(int pos) {
|
| - ASSERT(pos != RelocInfo::kNoPosition);
|
| - ASSERT(pos >= 0);
|
| - current_statement_position_ = pos;
|
| -}
|
| -
|
| -
|
| -bool Assembler::WriteRecordedPositions() {
|
| - bool written = false;
|
| -
|
| - // Write the statement position if it is different from what was written last
|
| - // time.
|
| - if (current_statement_position_ != written_statement_position_) {
|
| - EnsureSpace ensure_space(this);
|
| - RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_);
|
| - written_statement_position_ = current_statement_position_;
|
| - written = true;
|
| - }
|
| -
|
| - // Write the position if it is different from what was written last time and
|
| - // also different from the written statement position.
|
| - if (current_position_ != written_position_ &&
|
| - current_position_ != written_statement_position_) {
|
| - EnsureSpace ensure_space(this);
|
| - RecordRelocInfo(RelocInfo::POSITION, current_position_);
|
| - written_position_ = current_position_;
|
| - written = true;
|
| - }
|
| -
|
| - // Return whether something was written.
|
| - return written;
|
| -}
|
| -
|
| -
|
| const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
|
| 1 << RelocInfo::INTERNAL_REFERENCE;
|
|
|
|
|