| 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 <memory> | 7 #include <memory> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
| (...skipping 7947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7958 | 7958 |
| 7959 // Precondition: call is monomorphic and we have found a target with the | 7959 // Precondition: call is monomorphic and we have found a target with the |
| 7960 // appropriate arity. | 7960 // appropriate arity. |
| 7961 Handle<JSFunction> caller = current_info()->closure(); | 7961 Handle<JSFunction> caller = current_info()->closure(); |
| 7962 Handle<SharedFunctionInfo> target_shared(target->shared()); | 7962 Handle<SharedFunctionInfo> target_shared(target->shared()); |
| 7963 | 7963 |
| 7964 // Always inline functions that force inlining. | 7964 // Always inline functions that force inlining. |
| 7965 if (target_shared->force_inline()) { | 7965 if (target_shared->force_inline()) { |
| 7966 return 0; | 7966 return 0; |
| 7967 } | 7967 } |
| 7968 if (!target->shared()->IsUserJavaScript()) { | 7968 if (target->shared()->IsBuiltin()) { |
| 7969 return kNotInlinable; | 7969 return kNotInlinable; |
| 7970 } | 7970 } |
| 7971 | 7971 |
| 7972 if (target_shared->IsApiFunction()) { | 7972 if (target_shared->IsApiFunction()) { |
| 7973 TraceInline(target, caller, "target is api function"); | 7973 TraceInline(target, caller, "target is api function"); |
| 7974 return kNotInlinable; | 7974 return kNotInlinable; |
| 7975 } | 7975 } |
| 7976 | 7976 |
| 7977 // Do a quick check on source code length to avoid parsing large | 7977 // Do a quick check on source code length to avoid parsing large |
| 7978 // inlining candidates. | 7978 // inlining candidates. |
| (...skipping 5030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13009 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13009 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13010 } | 13010 } |
| 13011 | 13011 |
| 13012 #ifdef DEBUG | 13012 #ifdef DEBUG |
| 13013 graph_->Verify(false); // No full verify. | 13013 graph_->Verify(false); // No full verify. |
| 13014 #endif | 13014 #endif |
| 13015 } | 13015 } |
| 13016 | 13016 |
| 13017 } // namespace internal | 13017 } // namespace internal |
| 13018 } // namespace v8 | 13018 } // namespace v8 |
| OLD | NEW |