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 #include "src/compilation-info.h" | 6 #include "src/compilation-info.h" |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1996 int deoptimization_id, SourcePosition pos) { | 1996 int deoptimization_id, SourcePosition pos) { |
1997 DeoptimizeKind deoptimization_kind = GetDeoptimizationKind(deoptimization_id); | 1997 DeoptimizeKind deoptimization_kind = GetDeoptimizationKind(deoptimization_id); |
1998 DeoptimizeReason deoptimization_reason = | 1998 DeoptimizeReason deoptimization_reason = |
1999 GetDeoptimizationReason(deoptimization_id); | 1999 GetDeoptimizationReason(deoptimization_id); |
2000 Deoptimizer::BailoutType bailout_type = | 2000 Deoptimizer::BailoutType bailout_type = |
2001 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT | 2001 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT |
2002 : Deoptimizer::EAGER; | 2002 : Deoptimizer::EAGER; |
2003 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 2003 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
2004 isolate(), deoptimization_id, bailout_type); | 2004 isolate(), deoptimization_id, bailout_type); |
2005 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 2005 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
2006 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); | 2006 if (isolate()->NeedsSourcePositionsForProfiling()) { |
| 2007 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
| 2008 } |
2007 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2009 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
2008 return kSuccess; | 2010 return kSuccess; |
2009 } | 2011 } |
2010 | 2012 |
2011 void CodeGenerator::FinishFrame(Frame* frame) { | 2013 void CodeGenerator::FinishFrame(Frame* frame) { |
2012 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2014 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
2013 | 2015 |
2014 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); | 2016 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); |
2015 if (saves_fpu != 0) { | 2017 if (saves_fpu != 0) { |
2016 frame->AlignSavedCalleeRegisterSlots(); | 2018 frame->AlignSavedCalleeRegisterSlots(); |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2383 padding_size -= v8::internal::Assembler::kInstrSize; | 2385 padding_size -= v8::internal::Assembler::kInstrSize; |
2384 } | 2386 } |
2385 } | 2387 } |
2386 } | 2388 } |
2387 | 2389 |
2388 #undef __ | 2390 #undef __ |
2389 | 2391 |
2390 } // namespace compiler | 2392 } // namespace compiler |
2391 } // namespace internal | 2393 } // namespace internal |
2392 } // namespace v8 | 2394 } // namespace v8 |
OLD | NEW |