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