| 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/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
| 10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
| (...skipping 8260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8271 | 8271 |
| 8272 // Do a quick check on source code length to avoid parsing large | 8272 // Do a quick check on source code length to avoid parsing large |
| 8273 // inlining candidates. | 8273 // inlining candidates. |
| 8274 if (target_shared->SourceSize() > | 8274 if (target_shared->SourceSize() > |
| 8275 Min(FLAG_max_inlined_source_size, kUnlimitedMaxInlinedSourceSize)) { | 8275 Min(FLAG_max_inlined_source_size, kUnlimitedMaxInlinedSourceSize)) { |
| 8276 TraceInline(target, caller, "target text too big"); | 8276 TraceInline(target, caller, "target text too big"); |
| 8277 return kNotInlinable; | 8277 return kNotInlinable; |
| 8278 } | 8278 } |
| 8279 | 8279 |
| 8280 // Target must be inlineable. | 8280 // Target must be inlineable. |
| 8281 if (!target_shared->IsInlineable()) { | 8281 BailoutReason noopt_reason = target_shared->disable_optimization_reason(); |
| 8282 if (!target_shared->IsInlineable() && noopt_reason != kHydrogenFilter) { |
| 8282 TraceInline(target, caller, "target not inlineable"); | 8283 TraceInline(target, caller, "target not inlineable"); |
| 8283 return kNotInlinable; | 8284 return kNotInlinable; |
| 8284 } | 8285 } |
| 8285 if (target_shared->disable_optimization_reason() != kNoReason) { | 8286 if (noopt_reason != kNoReason && noopt_reason != kHydrogenFilter) { |
| 8286 TraceInline(target, caller, "target contains unsupported syntax [early]"); | 8287 TraceInline(target, caller, "target contains unsupported syntax [early]"); |
| 8287 return kNotInlinable; | 8288 return kNotInlinable; |
| 8288 } | 8289 } |
| 8289 | 8290 |
| 8290 int nodes_added = target_shared->ast_node_count(); | 8291 int nodes_added = target_shared->ast_node_count(); |
| 8291 return nodes_added; | 8292 return nodes_added; |
| 8292 } | 8293 } |
| 8293 | 8294 |
| 8294 | 8295 |
| 8295 bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, | 8296 bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, |
| (...skipping 5380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13676 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13677 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13677 } | 13678 } |
| 13678 | 13679 |
| 13679 #ifdef DEBUG | 13680 #ifdef DEBUG |
| 13680 graph_->Verify(false); // No full verify. | 13681 graph_->Verify(false); // No full verify. |
| 13681 #endif | 13682 #endif |
| 13682 } | 13683 } |
| 13683 | 13684 |
| 13684 } // namespace internal | 13685 } // namespace internal |
| 13685 } // namespace v8 | 13686 } // namespace v8 |
| OLD | NEW |