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

Unified Diff: src/codegen.cc

Issue 15077: Merge bleeding-edge change 985, RecordStatementPosition reform, into... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 12 years 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.cc ('k') | src/codegen-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
===================================================================
--- src/codegen.cc (revision 1011)
+++ src/codegen.cc (working copy)
@@ -42,9 +42,11 @@
generator_(generator),
enter_(generator),
exit_(generator),
- statement_position_(masm_->last_statement_position()),
- position_(masm_->last_position()) {
+ statement_position_(masm_->current_statement_position()),
+ position_(masm_->current_position()) {
generator->AddDeferred(this);
+ ASSERT(statement_position_ != RelocInfo::kNoPosition);
+ ASSERT(position_ != RelocInfo::kNoPosition);
#ifdef DEBUG
comment_ = "";
#endif
@@ -56,9 +58,7 @@
DeferredCode* code = deferred_.RemoveLast();
MacroAssembler* masm = code->masm();
// Record position of deferred code stub.
- if (code->statement_position() != RelocInfo::kNoPosition) {
- masm->RecordStatementPosition(code->statement_position());
- }
+ masm->RecordStatementPosition(code->statement_position());
if (code->position() != RelocInfo::kNoPosition) {
masm->RecordPosition(code->position());
}
@@ -478,6 +478,26 @@
}
+void CodeGenerator::CodeForStatement(Node* node) {
+ if (FLAG_debug_info) {
+ int pos = node->statement_pos();
+ if (pos != RelocInfo::kNoPosition) {
+ masm()->RecordStatementPosition(pos);
+ CodeForSourcePosition(pos);
+ }
+ }
+}
+
+
+void CodeGenerator::CodeForSourcePosition(int pos) {
+ if (FLAG_debug_info) {
+ if (pos != RelocInfo::kNoPosition) {
+ masm()->RecordPosition(pos);
+ }
+ }
+}
+
+
const char* RuntimeStub::GetName() {
return Runtime::FunctionForId(id_)->stub_name;
}
« no previous file with comments | « src/assembler-ia32.cc ('k') | src/codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698