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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/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 8249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8260 | 8260 |
8261 // Precondition: call is monomorphic and we have found a target with the | 8261 // Precondition: call is monomorphic and we have found a target with the |
8262 // appropriate arity. | 8262 // appropriate arity. |
8263 Handle<JSFunction> caller = current_info()->closure(); | 8263 Handle<JSFunction> caller = current_info()->closure(); |
8264 Handle<SharedFunctionInfo> target_shared(target->shared()); | 8264 Handle<SharedFunctionInfo> target_shared(target->shared()); |
8265 | 8265 |
8266 // Always inline functions that force inlining. | 8266 // Always inline functions that force inlining. |
8267 if (target_shared->force_inline()) { | 8267 if (target_shared->force_inline()) { |
8268 return 0; | 8268 return 0; |
8269 } | 8269 } |
8270 if (target->IsBuiltin()) { | 8270 if (target->shared()->IsBuiltin()) { |
8271 return kNotInlinable; | 8271 return kNotInlinable; |
8272 } | 8272 } |
8273 | 8273 |
8274 if (target_shared->IsApiFunction()) { | 8274 if (target_shared->IsApiFunction()) { |
8275 TraceInline(target, caller, "target is api function"); | 8275 TraceInline(target, caller, "target is api function"); |
8276 return kNotInlinable; | 8276 return kNotInlinable; |
8277 } | 8277 } |
8278 | 8278 |
8279 // Do a quick check on source code length to avoid parsing large | 8279 // Do a quick check on source code length to avoid parsing large |
8280 // inlining candidates. | 8280 // inlining candidates. |
(...skipping 5400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13681 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13681 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13682 } | 13682 } |
13683 | 13683 |
13684 #ifdef DEBUG | 13684 #ifdef DEBUG |
13685 graph_->Verify(false); // No full verify. | 13685 graph_->Verify(false); // No full verify. |
13686 #endif | 13686 #endif |
13687 } | 13687 } |
13688 | 13688 |
13689 } // namespace internal | 13689 } // namespace internal |
13690 } // namespace v8 | 13690 } // namespace v8 |
OLD | NEW |