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

Unified Diff: src/assembler-ia32.cc

Issue 2957: Defer the writing of the source position data to the relocation information... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 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-ia32.h ('k') | src/codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler-ia32.cc
===================================================================
--- src/assembler-ia32.cc (revision 330)
+++ src/assembler-ia32.cc (working copy)
@@ -317,7 +317,7 @@
last_pc_ = NULL;
last_bound_pos_ = 0;
last_position_ = kNoPosition;
- last_position_is_statement_ = false;
+ last_statement_position_ = kNoPosition;
}
@@ -1306,6 +1306,7 @@
void Assembler::call(Handle<Code> code, RelocMode rmode) {
+ WriteRecordedPositions();
EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(is_code_target(rmode));
@@ -1844,6 +1845,7 @@
void Assembler::RecordJSReturn() {
+ WriteRecordedPositions();
EnsureSpace ensure_space(this);
RecordRelocInfo(js_return);
}
@@ -1859,26 +1861,33 @@
void Assembler::RecordPosition(int pos) {
if (pos == kNoPosition) return;
- ASSERT(position >= 0);
- if (pos == last_position_) return;
- EnsureSpace ensure_space(this);
- RecordRelocInfo(position, pos);
+ ASSERT(pos >= 0);
last_position_ = pos;
- last_position_is_statement_ = false;
}
void Assembler::RecordStatementPosition(int pos) {
if (pos == kNoPosition) return;
- ASSERT(position >= 0);
- if (pos == last_position_) return;
- EnsureSpace ensure_space(this);
- RecordRelocInfo(statement_position, pos);
- last_position_ = pos;
- last_position_is_statement_ = true;
+ ASSERT(pos >= 0);
+ last_statement_position_ = pos;
}
+void Assembler::WriteRecordedPositions() {
+ if (last_statement_position_ != kNoPosition) {
+ EnsureSpace ensure_space(this);
+ RecordRelocInfo(statement_position, last_statement_position_);
+ }
+ if ((last_position_ != kNoPosition) &&
+ (last_position_ != last_statement_position_)) {
+ EnsureSpace ensure_space(this);
+ RecordRelocInfo(position, last_position_);
+ }
+ last_statement_position_ = kNoPosition;
+ last_position_ = kNoPosition;
+}
+
+
void Assembler::GrowBuffer() {
ASSERT(overflow()); // should not call this otherwise
if (!own_buffer_) FATAL("external code buffer is too small");
« no previous file with comments | « src/assembler-ia32.h ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698