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 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 __ GenerateSwitchTable(input, case_count, [&i, this](size_t index) { | 2121 __ GenerateSwitchTable(input, case_count, [&i, this](size_t index) { |
2122 return GetLabel(i.InputRpo(index + 2)); | 2122 return GetLabel(i.InputRpo(index + 2)); |
2123 }); | 2123 }); |
2124 } | 2124 } |
2125 | 2125 |
2126 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( | 2126 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
2127 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 2127 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { |
2128 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 2128 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
2129 isolate(), deoptimization_id, bailout_type); | 2129 isolate(), deoptimization_id, bailout_type); |
2130 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 2130 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
| 2131 DeoptimizeReason deoptimization_reason = |
| 2132 GetDeoptimizationReason(deoptimization_id); |
| 2133 __ RecordDeoptReason(deoptimization_reason, 0, deoptimization_id); |
2131 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2134 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
2132 return kSuccess; | 2135 return kSuccess; |
2133 } | 2136 } |
2134 | 2137 |
2135 void CodeGenerator::FinishFrame(Frame* frame) { | 2138 void CodeGenerator::FinishFrame(Frame* frame) { |
2136 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2139 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
2137 | 2140 |
2138 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); | 2141 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); |
2139 if (saves_fpu != 0) { | 2142 if (saves_fpu != 0) { |
2140 int count = base::bits::CountPopulation32(saves_fpu); | 2143 int count = base::bits::CountPopulation32(saves_fpu); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2444 padding_size -= v8::internal::Assembler::kInstrSize; | 2447 padding_size -= v8::internal::Assembler::kInstrSize; |
2445 } | 2448 } |
2446 } | 2449 } |
2447 } | 2450 } |
2448 | 2451 |
2449 #undef __ | 2452 #undef __ |
2450 | 2453 |
2451 } // namespace compiler | 2454 } // namespace compiler |
2452 } // namespace internal | 2455 } // namespace internal |
2453 } // namespace v8 | 2456 } // namespace v8 |
OLD | NEW |