| 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/crankshaft/lithium-codegen.h" | 5 #include "src/crankshaft/lithium-codegen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
| 10 | 10 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 size_t length = builder.position(); | 161 size_t length = builder.position(); |
| 162 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); | 162 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); |
| 163 MemCopy(copy.start(), builder.Finalize(), copy.length()); | 163 MemCopy(copy.start(), builder.Finalize(), copy.length()); |
| 164 masm()->RecordComment(copy.start()); | 164 masm()->RecordComment(copy.start()); |
| 165 } | 165 } |
| 166 | 166 |
| 167 | 167 |
| 168 void LCodeGenBase::DeoptComment(const Deoptimizer::DeoptInfo& deopt_info) { | 168 void LCodeGenBase::DeoptComment(const Deoptimizer::DeoptInfo& deopt_info) { |
| 169 SourcePosition position = deopt_info.position; | 169 SourcePosition position = deopt_info.position; |
| 170 int deopt_id = deopt_info.deopt_id; | 170 int deopt_id = deopt_info.deopt_id; |
| 171 masm()->RecordDeoptReason(deopt_info.deopt_reason, position, deopt_id); | 171 if (masm()->isolate()->NeedsSourcePositionsForProfiling()) { |
| 172 masm()->RecordDeoptReason(deopt_info.deopt_reason, position, deopt_id); |
| 173 } |
| 172 } | 174 } |
| 173 | 175 |
| 174 | 176 |
| 175 int LCodeGenBase::GetNextEmittedBlock() const { | 177 int LCodeGenBase::GetNextEmittedBlock() const { |
| 176 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { | 178 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { |
| 177 if (!graph()->blocks()->at(i)->IsReachable()) continue; | 179 if (!graph()->blocks()->at(i)->IsReachable()) continue; |
| 178 if (!chunk_->GetLabel(i)->HasReplacement()) return i; | 180 if (!chunk_->GetLabel(i)->HasReplacement()) return i; |
| 179 } | 181 } |
| 180 return -1; | 182 return -1; |
| 181 } | 183 } |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 407 |
| 406 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( | 408 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( |
| 407 LInstruction* instr, DeoptimizeReason deopt_reason, int deopt_id) { | 409 LInstruction* instr, DeoptimizeReason deopt_reason, int deopt_id) { |
| 408 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), | 410 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), |
| 409 deopt_reason, deopt_id); | 411 deopt_reason, deopt_id); |
| 410 return deopt_info; | 412 return deopt_info; |
| 411 } | 413 } |
| 412 | 414 |
| 413 } // namespace internal | 415 } // namespace internal |
| 414 } // namespace v8 | 416 } // namespace v8 |
| OLD | NEW |