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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2500 int deoptimization_id, SourcePosition pos) { | 2500 int deoptimization_id, SourcePosition pos) { |
2501 DeoptimizeKind deoptimization_kind = GetDeoptimizationKind(deoptimization_id); | 2501 DeoptimizeKind deoptimization_kind = GetDeoptimizationKind(deoptimization_id); |
2502 DeoptimizeReason deoptimization_reason = | 2502 DeoptimizeReason deoptimization_reason = |
2503 GetDeoptimizationReason(deoptimization_id); | 2503 GetDeoptimizationReason(deoptimization_id); |
2504 Deoptimizer::BailoutType bailout_type = | 2504 Deoptimizer::BailoutType bailout_type = |
2505 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT | 2505 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT |
2506 : Deoptimizer::EAGER; | 2506 : Deoptimizer::EAGER; |
2507 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 2507 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
2508 isolate(), deoptimization_id, bailout_type); | 2508 isolate(), deoptimization_id, bailout_type); |
2509 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; | 2509 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
2510 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); | 2510 if (isolate()->NeedsSourcePositionsForProfiling()) { |
| 2511 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
| 2512 } |
2511 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2513 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
2512 return kSuccess; | 2514 return kSuccess; |
2513 } | 2515 } |
2514 | 2516 |
2515 | 2517 |
2516 namespace { | 2518 namespace { |
2517 | 2519 |
2518 static const int kQuadWordSize = 16; | 2520 static const int kQuadWordSize = 16; |
2519 | 2521 |
2520 } // namespace | 2522 } // namespace |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2931 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2933 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2932 __ Nop(padding_size); | 2934 __ Nop(padding_size); |
2933 } | 2935 } |
2934 } | 2936 } |
2935 | 2937 |
2936 #undef __ | 2938 #undef __ |
2937 | 2939 |
2938 } // namespace compiler | 2940 } // namespace compiler |
2939 } // namespace internal | 2941 } // namespace internal |
2940 } // namespace v8 | 2942 } // namespace v8 |
OLD | NEW |