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/compilation-info.h" | 7 #include "src/compilation-info.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 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 } | 2238 } |
2239 | 2239 |
2240 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( | 2240 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
2241 int deoptimization_id, Deoptimizer::BailoutType bailout_type, | 2241 int deoptimization_id, Deoptimizer::BailoutType bailout_type, |
2242 SourcePosition pos) { | 2242 SourcePosition pos) { |
2243 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 2243 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
2244 isolate(), deoptimization_id, bailout_type); | 2244 isolate(), deoptimization_id, bailout_type); |
2245 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 2245 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
2246 DeoptimizeReason deoptimization_reason = | 2246 DeoptimizeReason deoptimization_reason = |
2247 GetDeoptimizationReason(deoptimization_id); | 2247 GetDeoptimizationReason(deoptimization_id); |
2248 __ RecordDeoptReason(deoptimization_reason, pos.raw(), deoptimization_id); | 2248 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
2249 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2249 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
2250 return kSuccess; | 2250 return kSuccess; |
2251 } | 2251 } |
2252 | 2252 |
2253 | 2253 |
2254 // The calling convention for JSFunctions on X87 passes arguments on the | 2254 // The calling convention for JSFunctions on X87 passes arguments on the |
2255 // stack and the JSFunction and context in EDI and ESI, respectively, thus | 2255 // stack and the JSFunction and context in EDI and ESI, respectively, thus |
2256 // the steps of the call look as follows: | 2256 // the steps of the call look as follows: |
2257 | 2257 |
2258 // --{ before the call instruction }-------------------------------------------- | 2258 // --{ before the call instruction }-------------------------------------------- |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2730 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2731 __ Nop(padding_size); | 2731 __ Nop(padding_size); |
2732 } | 2732 } |
2733 } | 2733 } |
2734 | 2734 |
2735 #undef __ | 2735 #undef __ |
2736 | 2736 |
2737 } // namespace compiler | 2737 } // namespace compiler |
2738 } // namespace internal | 2738 } // namespace internal |
2739 } // namespace v8 | 2739 } // namespace v8 |
OLD | NEW |