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/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 7854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7865 AddCheckPrototypeMaps(info.holder(), map); | 7865 AddCheckPrototypeMaps(info.holder(), map); |
7866 | 7866 |
7867 HValue* function = Add<HConstant>(expr->target()); | 7867 HValue* function = Add<HConstant>(expr->target()); |
7868 environment()->SetExpressionStackAt(0, function); | 7868 environment()->SetExpressionStackAt(0, function); |
7869 Push(receiver); | 7869 Push(receiver); |
7870 CHECK_ALIVE(VisitExpressions(expr->arguments())); | 7870 CHECK_ALIVE(VisitExpressions(expr->arguments())); |
7871 bool needs_wrapping = info.NeedsWrappingFor(target); | 7871 bool needs_wrapping = info.NeedsWrappingFor(target); |
7872 bool try_inline = FLAG_polymorphic_inlining && !needs_wrapping; | 7872 bool try_inline = FLAG_polymorphic_inlining && !needs_wrapping; |
7873 if (FLAG_trace_inlining && try_inline) { | 7873 if (FLAG_trace_inlining && try_inline) { |
7874 Handle<JSFunction> caller = current_info()->closure(); | 7874 Handle<JSFunction> caller = current_info()->closure(); |
7875 SmartArrayPointer<char> caller_name = | 7875 base::SmartArrayPointer<char> caller_name = |
7876 caller->shared()->DebugName()->ToCString(); | 7876 caller->shared()->DebugName()->ToCString(); |
7877 PrintF("Trying to inline the polymorphic call to %s from %s\n", | 7877 PrintF("Trying to inline the polymorphic call to %s from %s\n", |
7878 name->ToCString().get(), | 7878 name->ToCString().get(), |
7879 caller_name.get()); | 7879 caller_name.get()); |
7880 } | 7880 } |
7881 if (try_inline && TryInlineCall(expr)) { | 7881 if (try_inline && TryInlineCall(expr)) { |
7882 // Trying to inline will signal that we should bailout from the | 7882 // Trying to inline will signal that we should bailout from the |
7883 // entire compilation by setting stack overflow on the visitor. | 7883 // entire compilation by setting stack overflow on the visitor. |
7884 if (HasStackOverflow()) return; | 7884 if (HasStackOverflow()) return; |
7885 } else { | 7885 } else { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7947 } else { | 7947 } else { |
7948 set_current_block(NULL); | 7948 set_current_block(NULL); |
7949 } | 7949 } |
7950 } | 7950 } |
7951 | 7951 |
7952 | 7952 |
7953 void HOptimizedGraphBuilder::TraceInline(Handle<JSFunction> target, | 7953 void HOptimizedGraphBuilder::TraceInline(Handle<JSFunction> target, |
7954 Handle<JSFunction> caller, | 7954 Handle<JSFunction> caller, |
7955 const char* reason) { | 7955 const char* reason) { |
7956 if (FLAG_trace_inlining) { | 7956 if (FLAG_trace_inlining) { |
7957 SmartArrayPointer<char> target_name = | 7957 base::SmartArrayPointer<char> target_name = |
7958 target->shared()->DebugName()->ToCString(); | 7958 target->shared()->DebugName()->ToCString(); |
7959 SmartArrayPointer<char> caller_name = | 7959 base::SmartArrayPointer<char> caller_name = |
7960 caller->shared()->DebugName()->ToCString(); | 7960 caller->shared()->DebugName()->ToCString(); |
7961 if (reason == NULL) { | 7961 if (reason == NULL) { |
7962 PrintF("Inlined %s called from %s.\n", target_name.get(), | 7962 PrintF("Inlined %s called from %s.\n", target_name.get(), |
7963 caller_name.get()); | 7963 caller_name.get()); |
7964 } else { | 7964 } else { |
7965 PrintF("Did not inline %s called from %s (%s).\n", | 7965 PrintF("Did not inline %s called from %s (%s).\n", |
7966 target_name.get(), caller_name.get(), reason); | 7966 target_name.get(), caller_name.get(), reason); |
7967 } | 7967 } |
7968 } | 7968 } |
7969 } | 7969 } |
(...skipping 5275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13245 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13245 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13246 } | 13246 } |
13247 | 13247 |
13248 #ifdef DEBUG | 13248 #ifdef DEBUG |
13249 graph_->Verify(false); // No full verify. | 13249 graph_->Verify(false); // No full verify. |
13250 #endif | 13250 #endif |
13251 } | 13251 } |
13252 | 13252 |
13253 } // namespace internal | 13253 } // namespace internal |
13254 } // namespace v8 | 13254 } // namespace v8 |
OLD | NEW |