| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 __ cmp(input, Immediate(case_count)); | 1692 __ cmp(input, Immediate(case_count)); |
| 1693 __ j(above_equal, GetLabel(i.InputRpo(1))); | 1693 __ j(above_equal, GetLabel(i.InputRpo(1))); |
| 1694 __ jmp(Operand::JumpTable(input, times_4, table)); | 1694 __ jmp(Operand::JumpTable(input, times_4, table)); |
| 1695 } | 1695 } |
| 1696 | 1696 |
| 1697 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( | 1697 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
| 1698 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 1698 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { |
| 1699 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 1699 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
| 1700 isolate(), deoptimization_id, bailout_type); | 1700 isolate(), deoptimization_id, bailout_type); |
| 1701 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 1701 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
| 1702 DeoptimizeReason deoptimization_reason = |
| 1703 GetDeoptimizationReason(deoptimization_id); |
| 1704 __ RecordDeoptReason(deoptimization_reason, 0, deoptimization_id); |
| 1702 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 1705 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
| 1703 return kSuccess; | 1706 return kSuccess; |
| 1704 } | 1707 } |
| 1705 | 1708 |
| 1706 | 1709 |
| 1707 // The calling convention for JSFunctions on IA32 passes arguments on the | 1710 // The calling convention for JSFunctions on IA32 passes arguments on the |
| 1708 // stack and the JSFunction and context in EDI and ESI, respectively, thus | 1711 // stack and the JSFunction and context in EDI and ESI, respectively, thus |
| 1709 // the steps of the call look as follows: | 1712 // the steps of the call look as follows: |
| 1710 | 1713 |
| 1711 // --{ before the call instruction }-------------------------------------------- | 1714 // --{ before the call instruction }-------------------------------------------- |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2174 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2177 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2175 __ Nop(padding_size); | 2178 __ Nop(padding_size); |
| 2176 } | 2179 } |
| 2177 } | 2180 } |
| 2178 | 2181 |
| 2179 #undef __ | 2182 #undef __ |
| 2180 | 2183 |
| 2181 } // namespace compiler | 2184 } // namespace compiler |
| 2182 } // namespace internal | 2185 } // namespace internal |
| 2183 } // namespace v8 | 2186 } // namespace v8 |
| OLD | NEW |