| 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 8105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8116 } | 8116 } |
| 8117 } | 8117 } |
| 8118 | 8118 |
| 8119 // Generate the deoptimization data for the unoptimized version of | 8119 // Generate the deoptimization data for the unoptimized version of |
| 8120 // the target function if we don't already have it. | 8120 // the target function if we don't already have it. |
| 8121 if (!Compiler::EnsureDeoptimizationSupport(&target_info)) { | 8121 if (!Compiler::EnsureDeoptimizationSupport(&target_info)) { |
| 8122 TraceInline(target, caller, "could not generate deoptimization info"); | 8122 TraceInline(target, caller, "could not generate deoptimization info"); |
| 8123 return false; | 8123 return false; |
| 8124 } | 8124 } |
| 8125 | 8125 |
| 8126 // In strong mode it is an error to call a function with too few arguments. |
| 8127 // In that case do not inline because then the arity check would be skipped. |
| 8128 if (is_strong(function->language_mode()) && |
| 8129 arguments_count < function->parameter_count()) { |
| 8130 TraceInline(target, caller, |
| 8131 "too few arguments passed to a strong function"); |
| 8132 return false; |
| 8133 } |
| 8134 |
| 8126 // ---------------------------------------------------------------- | 8135 // ---------------------------------------------------------------- |
| 8127 // After this point, we've made a decision to inline this function (so | 8136 // After this point, we've made a decision to inline this function (so |
| 8128 // TryInline should always return true). | 8137 // TryInline should always return true). |
| 8129 | 8138 |
| 8130 // Type-check the inlined function. | 8139 // Type-check the inlined function. |
| 8131 DCHECK(target_shared->has_deoptimization_support()); | 8140 DCHECK(target_shared->has_deoptimization_support()); |
| 8132 AstTyper::Run(&target_info); | 8141 AstTyper::Run(&target_info); |
| 8133 | 8142 |
| 8134 int inlining_id = 0; | 8143 int inlining_id = 0; |
| 8135 if (top_info()->is_tracking_positions()) { | 8144 if (top_info()->is_tracking_positions()) { |
| (...skipping 5016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13152 if (ShouldProduceTraceOutput()) { | 13161 if (ShouldProduceTraceOutput()) { |
| 13153 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13162 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13154 } | 13163 } |
| 13155 | 13164 |
| 13156 #ifdef DEBUG | 13165 #ifdef DEBUG |
| 13157 graph_->Verify(false); // No full verify. | 13166 graph_->Verify(false); // No full verify. |
| 13158 #endif | 13167 #endif |
| 13159 } | 13168 } |
| 13160 | 13169 |
| 13161 } } // namespace v8::internal | 13170 } } // namespace v8::internal |
| OLD | NEW |