OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2194 GetDeoptimizationReason(deoptimization_id); | 2194 GetDeoptimizationReason(deoptimization_id); |
2195 Deoptimizer::BailoutType bailout_type = | 2195 Deoptimizer::BailoutType bailout_type = |
2196 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT | 2196 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT |
2197 : Deoptimizer::EAGER; | 2197 : Deoptimizer::EAGER; |
2198 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 2198 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
2199 isolate(), deoptimization_id, bailout_type); | 2199 isolate(), deoptimization_id, bailout_type); |
2200 // TODO(turbofan): We should be able to generate better code by sharing the | 2200 // TODO(turbofan): We should be able to generate better code by sharing the |
2201 // actual final call site and just bl'ing to it here, similar to what we do | 2201 // actual final call site and just bl'ing to it here, similar to what we do |
2202 // in the lithium backend. | 2202 // in the lithium backend. |
2203 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 2203 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
2204 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); | 2204 if (isolate()->NeedsSourcePositionsForProfiling()) { |
| 2205 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
| 2206 } |
2205 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2207 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
2206 return kSuccess; | 2208 return kSuccess; |
2207 } | 2209 } |
2208 | 2210 |
2209 void CodeGenerator::FinishFrame(Frame* frame) { | 2211 void CodeGenerator::FinishFrame(Frame* frame) { |
2210 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2212 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
2211 const RegList double_saves = descriptor->CalleeSavedFPRegisters(); | 2213 const RegList double_saves = descriptor->CalleeSavedFPRegisters(); |
2212 | 2214 |
2213 // Save callee-saved Double registers. | 2215 // Save callee-saved Double registers. |
2214 if (double_saves != 0) { | 2216 if (double_saves != 0) { |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2588 padding_size -= v8::internal::Assembler::kInstrSize; | 2590 padding_size -= v8::internal::Assembler::kInstrSize; |
2589 } | 2591 } |
2590 } | 2592 } |
2591 } | 2593 } |
2592 | 2594 |
2593 #undef __ | 2595 #undef __ |
2594 | 2596 |
2595 } // namespace compiler | 2597 } // namespace compiler |
2596 } // namespace internal | 2598 } // namespace internal |
2597 } // namespace v8 | 2599 } // namespace v8 |
OLD | NEW |