OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |