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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.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 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1828 __ GenerateSwitchTable(input, case_count, [&i, this](size_t index) { | 1828 __ GenerateSwitchTable(input, case_count, [&i, this](size_t index) { |
1829 return GetLabel(i.InputRpo(index + 2)); | 1829 return GetLabel(i.InputRpo(index + 2)); |
1830 }); | 1830 }); |
1831 } | 1831 } |
1832 | 1832 |
1833 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( | 1833 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
1834 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 1834 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { |
1835 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 1835 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
1836 isolate(), deoptimization_id, bailout_type); | 1836 isolate(), deoptimization_id, bailout_type); |
1837 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 1837 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
| 1838 DeoptimizeReason deoptimization_reason = |
| 1839 GetDeoptimizationReason(deoptimization_id); |
| 1840 __ RecordDeoptReason(deoptimization_reason, 0, deoptimization_id); |
1838 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 1841 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
1839 return kSuccess; | 1842 return kSuccess; |
1840 } | 1843 } |
1841 | 1844 |
1842 void CodeGenerator::FinishFrame(Frame* frame) { | 1845 void CodeGenerator::FinishFrame(Frame* frame) { |
1843 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1846 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
1844 | 1847 |
1845 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); | 1848 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); |
1846 if (saves_fpu != 0) { | 1849 if (saves_fpu != 0) { |
1847 frame->AlignSavedCalleeRegisterSlots(); | 1850 frame->AlignSavedCalleeRegisterSlots(); |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2156 padding_size -= v8::internal::Assembler::kInstrSize; | 2159 padding_size -= v8::internal::Assembler::kInstrSize; |
2157 } | 2160 } |
2158 } | 2161 } |
2159 } | 2162 } |
2160 | 2163 |
2161 #undef __ | 2164 #undef __ |
2162 | 2165 |
2163 } // namespace compiler | 2166 } // namespace compiler |
2164 } // namespace internal | 2167 } // namespace internal |
2165 } // namespace v8 | 2168 } // namespace v8 |
OLD | NEW |