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

Side by Side Diff: src/lithium-codegen.cc

Issue 587223002: Emit source positions in deopt comments, too. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/lithium-codegen.h" 7 #include "src/lithium-codegen.h"
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "src/ia32/lithium-ia32.h" // NOLINT 10 #include "src/ia32/lithium-ia32.h" // NOLINT
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Copy the string before recording it in the assembler to avoid 141 // Copy the string before recording it in the assembler to avoid
142 // issues when the stack allocated buffer goes out of scope. 142 // issues when the stack allocated buffer goes out of scope.
143 size_t length = builder.position(); 143 size_t length = builder.position();
144 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); 144 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1);
145 MemCopy(copy.start(), builder.Finalize(), copy.length()); 145 MemCopy(copy.start(), builder.Finalize(), copy.length());
146 masm()->RecordComment(copy.start()); 146 masm()->RecordComment(copy.start());
147 } 147 }
148 148
149 149
150 void LCodeGenBase::DeoptComment(const Deoptimizer::Reason& reason) { 150 void LCodeGenBase::DeoptComment(const Deoptimizer::Reason& reason) {
151 Comment(";;; deoptimize %s: %s", reason.mnemonic, 151 OStringStream os;
152 reason.detail == NULL ? "unknown reason" : reason.detail); 152 os << ";;; deoptimize at " << HSourcePosition(reason.raw_position) << " "
153 << reason.mnemonic;
154 if (reason.detail != NULL) os << ": " << reason.detail;
155 Comment("%s", os.c_str());
153 } 156 }
154 157
155 158
156 int LCodeGenBase::GetNextEmittedBlock() const { 159 int LCodeGenBase::GetNextEmittedBlock() const {
157 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { 160 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) {
158 if (!graph()->blocks()->at(i)->IsReachable()) continue; 161 if (!graph()->blocks()->at(i)->IsReachable()) continue;
159 if (!chunk_->GetLabel(i)->HasReplacement()) return i; 162 if (!chunk_->GetLabel(i)->HasReplacement()) return i;
160 } 163 }
161 return -1; 164 return -1;
162 } 165 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 chunk_->AddDeprecationDependency(map); 236 chunk_->AddDeprecationDependency(map);
234 } 237 }
235 238
236 239
237 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { 240 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) {
238 if (!map->is_stable()) return Abort(kMapBecameUnstable); 241 if (!map->is_stable()) return Abort(kMapBecameUnstable);
239 chunk_->AddStabilityDependency(map); 242 chunk_->AddStabilityDependency(map);
240 } 243 }
241 244
242 } } // namespace v8::internal 245 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698