| 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/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
| 8 #include "src/assembler-inl.h" | 8 #include "src/assembler-inl.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
| (...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2274 GetDeoptimizationReason(deoptimization_id); | 2274 GetDeoptimizationReason(deoptimization_id); |
| 2275 Deoptimizer::BailoutType bailout_type = | 2275 Deoptimizer::BailoutType bailout_type = |
| 2276 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT | 2276 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT |
| 2277 : Deoptimizer::EAGER; | 2277 : Deoptimizer::EAGER; |
| 2278 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 2278 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
| 2279 isolate(), deoptimization_id, bailout_type); | 2279 isolate(), deoptimization_id, bailout_type); |
| 2280 // TODO(turbofan): We should be able to generate better code by sharing the | 2280 // TODO(turbofan): We should be able to generate better code by sharing the |
| 2281 // actual final call site and just bl'ing to it here, similar to what we do | 2281 // actual final call site and just bl'ing to it here, similar to what we do |
| 2282 // in the lithium backend. | 2282 // in the lithium backend. |
| 2283 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 2283 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
| 2284 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); | 2284 if (isolate()->NeedsSourcePositionsForProfiling()) { |
| 2285 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
| 2286 } |
| 2285 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2287 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
| 2286 __ CheckConstPool(false, false); | 2288 __ CheckConstPool(false, false); |
| 2287 return kSuccess; | 2289 return kSuccess; |
| 2288 } | 2290 } |
| 2289 | 2291 |
| 2290 void CodeGenerator::FinishFrame(Frame* frame) { | 2292 void CodeGenerator::FinishFrame(Frame* frame) { |
| 2291 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2293 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 2292 | 2294 |
| 2293 const RegList saves_fp = descriptor->CalleeSavedFPRegisters(); | 2295 const RegList saves_fp = descriptor->CalleeSavedFPRegisters(); |
| 2294 if (saves_fp != 0) { | 2296 if (saves_fp != 0) { |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2739 padding_size -= v8::internal::Assembler::kInstrSize; | 2741 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2740 } | 2742 } |
| 2741 } | 2743 } |
| 2742 } | 2744 } |
| 2743 | 2745 |
| 2744 #undef __ | 2746 #undef __ |
| 2745 | 2747 |
| 2746 } // namespace compiler | 2748 } // namespace compiler |
| 2747 } // namespace internal | 2749 } // namespace internal |
| 2748 } // namespace v8 | 2750 } // namespace v8 |
| OLD | NEW |