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 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT | 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Copy the string before recording it in the assembler to avoid | 147 // Copy the string before recording it in the assembler to avoid |
148 // issues when the stack allocated buffer goes out of scope. | 148 // issues when the stack allocated buffer goes out of scope. |
149 size_t length = builder.position(); | 149 size_t length = builder.position(); |
150 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); | 150 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); |
151 MemCopy(copy.start(), builder.Finalize(), copy.length()); | 151 MemCopy(copy.start(), builder.Finalize(), copy.length()); |
152 masm()->RecordComment(copy.start()); | 152 masm()->RecordComment(copy.start()); |
153 } | 153 } |
154 | 154 |
155 | 155 |
156 void LCodeGenBase::DeoptComment(const Deoptimizer::DeoptInfo& deopt_info) { | 156 void LCodeGenBase::DeoptComment(const Deoptimizer::DeoptInfo& deopt_info) { |
157 masm()->RecordDeoptReason(deopt_info.deopt_reason, deopt_info.position); | 157 SourcePosition position = deopt_info.position; |
| 158 int raw_position = position.IsUnknown() ? 0 : position.raw(); |
| 159 masm()->RecordDeoptReason(deopt_info.deopt_reason, raw_position); |
158 } | 160 } |
159 | 161 |
160 | 162 |
161 int LCodeGenBase::GetNextEmittedBlock() const { | 163 int LCodeGenBase::GetNextEmittedBlock() const { |
162 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { | 164 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { |
163 if (!graph()->blocks()->at(i)->IsReachable()) continue; | 165 if (!graph()->blocks()->at(i)->IsReachable()) continue; |
164 if (!chunk_->GetLabel(i)->HasReplacement()) return i; | 166 if (!chunk_->GetLabel(i)->HasReplacement()) return i; |
165 } | 167 } |
166 return -1; | 168 return -1; |
167 } | 169 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( | 351 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( |
350 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) { | 352 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) { |
351 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), | 353 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), |
352 instr->Mnemonic(), deopt_reason); | 354 instr->Mnemonic(), deopt_reason); |
353 HEnterInlined* enter_inlined = instr->environment()->entry(); | 355 HEnterInlined* enter_inlined = instr->environment()->entry(); |
354 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0; | 356 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0; |
355 return deopt_info; | 357 return deopt_info; |
356 } | 358 } |
357 } // namespace internal | 359 } // namespace internal |
358 } // namespace v8 | 360 } // namespace v8 |
OLD | NEW |