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/ast/scopes.h" | 7 #include "src/ast/scopes.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 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1999 } | 1999 } |
2000 | 2000 |
2001 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( | 2001 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
2002 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 2002 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { |
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 // TODO(turbofan): We should be able to generate better code by sharing the | 2005 // TODO(turbofan): We should be able to generate better code by sharing the |
2006 // actual final call site and just bl'ing to it here, similar to what we do | 2006 // actual final call site and just bl'ing to it here, similar to what we do |
2007 // in the lithium backend. | 2007 // in the lithium backend. |
2008 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 2008 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
| 2009 DeoptimizeReason deoptimization_reason = |
| 2010 GetDeoptimizationReason(deoptimization_id); |
| 2011 __ RecordDeoptReason(deoptimization_reason, 0, deoptimization_id); |
2009 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2012 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
2010 return kSuccess; | 2013 return kSuccess; |
2011 } | 2014 } |
2012 | 2015 |
2013 void CodeGenerator::FinishFrame(Frame* frame) { | 2016 void CodeGenerator::FinishFrame(Frame* frame) { |
2014 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2017 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
2015 const RegList double_saves = descriptor->CalleeSavedFPRegisters(); | 2018 const RegList double_saves = descriptor->CalleeSavedFPRegisters(); |
2016 | 2019 |
2017 // Save callee-saved Double registers. | 2020 // Save callee-saved Double registers. |
2018 if (double_saves != 0) { | 2021 if (double_saves != 0) { |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 padding_size -= v8::internal::Assembler::kInstrSize; | 2370 padding_size -= v8::internal::Assembler::kInstrSize; |
2368 } | 2371 } |
2369 } | 2372 } |
2370 } | 2373 } |
2371 | 2374 |
2372 #undef __ | 2375 #undef __ |
2373 | 2376 |
2374 } // namespace compiler | 2377 } // namespace compiler |
2375 } // namespace internal | 2378 } // namespace internal |
2376 } // namespace v8 | 2379 } // namespace v8 |
OLD | NEW |