OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 | 8 |
9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
10 #include "src/ast-this-access-visitor.h" | 10 #include "src/ast-this-access-visitor.h" |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 if (function->shared()->is_compiled()) { | 960 if (function->shared()->is_compiled()) { |
961 return Handle<Code>(function->shared()->code()); | 961 return Handle<Code>(function->shared()->code()); |
962 } | 962 } |
963 | 963 |
964 CompilationInfoWithZone info(function); | 964 CompilationInfoWithZone info(function); |
965 Handle<Code> result; | 965 Handle<Code> result; |
966 ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCodeCommon(&info), | 966 ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCodeCommon(&info), |
967 Code); | 967 Code); |
968 | 968 |
969 if (FLAG_always_opt && isolate->use_crankshaft() && | 969 if (FLAG_always_opt && isolate->use_crankshaft() && |
970 !info.shared_info()->optimization_disabled() && | |
971 !isolate->DebuggerHasBreakPoints()) { | 970 !isolate->DebuggerHasBreakPoints()) { |
972 Handle<Code> opt_code; | 971 Handle<Code> opt_code; |
973 if (Compiler::GetOptimizedCode( | 972 if (Compiler::GetOptimizedCode( |
974 function, result, | 973 function, result, |
975 Compiler::NOT_CONCURRENT).ToHandle(&opt_code)) { | 974 Compiler::NOT_CONCURRENT).ToHandle(&opt_code)) { |
976 result = opt_code; | 975 result = opt_code; |
977 } | 976 } |
978 } | 977 } |
979 | 978 |
980 return result; | 979 return result; |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1580 AllowHandleDereference allow_deref; | 1579 AllowHandleDereference allow_deref; |
1581 bool tracing_on = info()->IsStub() | 1580 bool tracing_on = info()->IsStub() |
1582 ? FLAG_trace_hydrogen_stubs | 1581 ? FLAG_trace_hydrogen_stubs |
1583 : (FLAG_trace_hydrogen && | 1582 : (FLAG_trace_hydrogen && |
1584 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1583 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1585 return (tracing_on && | 1584 return (tracing_on && |
1586 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1585 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1587 } | 1586 } |
1588 | 1587 |
1589 } } // namespace v8::internal | 1588 } } // namespace v8::internal |
OLD | NEW |