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 "hydrogen.h" | 5 #include "hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "v8.h" | 9 #include "v8.h" |
10 #include "allocation-site-scopes.h" | 10 #include "allocation-site-scopes.h" |
(...skipping 7252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7263 // Always inline builtins marked for inlining. | 7263 // Always inline builtins marked for inlining. |
7264 if (target->IsBuiltin()) { | 7264 if (target->IsBuiltin()) { |
7265 return target_shared->inline_builtin() ? 0 : kNotInlinable; | 7265 return target_shared->inline_builtin() ? 0 : kNotInlinable; |
7266 } | 7266 } |
7267 | 7267 |
7268 if (target_shared->IsApiFunction()) { | 7268 if (target_shared->IsApiFunction()) { |
7269 TraceInline(target, caller, "target is api function"); | 7269 TraceInline(target, caller, "target is api function"); |
7270 return kNotInlinable; | 7270 return kNotInlinable; |
7271 } | 7271 } |
7272 | 7272 |
7273 // Do a quick check on source code length to avoid parsing large | |
7274 // inlining candidates. | |
7275 if (target_shared->SourceSize() > | |
7276 Min(FLAG_max_inlined_source_size, kUnlimitedMaxInlinedSourceSize)) { | |
7277 TraceInline(target, caller, "target text too big"); | |
7278 return kNotInlinable; | |
7279 } | |
7280 | |
7281 // Target must be inlineable. | 7273 // Target must be inlineable. |
7282 if (!target_shared->IsInlineable()) { | 7274 if (!target_shared->IsInlineable()) { |
7283 TraceInline(target, caller, "target not inlineable"); | 7275 TraceInline(target, caller, "target not inlineable"); |
7284 return kNotInlinable; | 7276 return kNotInlinable; |
7285 } | 7277 } |
7286 if (target_shared->dont_inline() || target_shared->dont_optimize()) { | 7278 if (target_shared->dont_inline() || target_shared->dont_optimize()) { |
7287 TraceInline(target, caller, "target contains unsupported syntax [early]"); | 7279 TraceInline(target, caller, "target contains unsupported syntax [early]"); |
7288 return kNotInlinable; | 7280 return kNotInlinable; |
7289 } | 7281 } |
7290 | 7282 |
(...skipping 4497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11788 if (ShouldProduceTraceOutput()) { | 11780 if (ShouldProduceTraceOutput()) { |
11789 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11781 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11790 } | 11782 } |
11791 | 11783 |
11792 #ifdef DEBUG | 11784 #ifdef DEBUG |
11793 graph_->Verify(false); // No full verify. | 11785 graph_->Verify(false); // No full verify. |
11794 #endif | 11786 #endif |
11795 } | 11787 } |
11796 | 11788 |
11797 } } // namespace v8::internal | 11789 } } // namespace v8::internal |
OLD | NEW |