OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/code_generator.h" | 5 #include "vm/code_generator.h" |
6 | 6 |
7 #include "vm/assembler_macros.h" | 7 #include "vm/assembler_macros.h" |
8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 // Leave the usage_counter at the limit so that the count test knows that | 1325 // Leave the usage_counter at the limit so that the count test knows that |
1326 // method is optimized. | 1326 // method is optimized. |
1327 if (FLAG_trace_failed_optimization_attempts) { | 1327 if (FLAG_trace_failed_optimization_attempts) { |
1328 PrintCaller("Has Optimized Code"); | 1328 PrintCaller("Has Optimized Code"); |
1329 } | 1329 } |
1330 // TODO(srdjan): Enable reoptimizing optimized code, but most recognize | 1330 // TODO(srdjan): Enable reoptimizing optimized code, but most recognize |
1331 // that reoptimization was not already applied. | 1331 // that reoptimization was not already applied. |
1332 return; | 1332 return; |
1333 } | 1333 } |
1334 if ((FLAG_optimization_filter != NULL) && | 1334 if ((FLAG_optimization_filter != NULL) && |
1335 (strncmp(function.ToFullyQualifiedCString(), | 1335 (strstr(function.ToFullyQualifiedCString(), |
1336 FLAG_optimization_filter, | 1336 FLAG_optimization_filter) == NULL)) { |
1337 strlen(FLAG_optimization_filter)) != 0)) { | |
1338 function.set_usage_counter(kLowInvocationCount); | 1337 function.set_usage_counter(kLowInvocationCount); |
1339 return; | 1338 return; |
1340 } | 1339 } |
1341 if (function.is_optimizable()) { | 1340 if (function.is_optimizable()) { |
1342 // Compilation patches the entry of unoptimized code. | 1341 // Compilation patches the entry of unoptimized code. |
1343 ASSERT(!function.HasOptimizedCode()); | 1342 ASSERT(!function.HasOptimizedCode()); |
1344 const Error& error = | 1343 const Error& error = |
1345 Error::Handle(Compiler::CompileOptimizedFunction(function)); | 1344 Error::Handle(Compiler::CompileOptimizedFunction(function)); |
1346 if (!error.IsNull()) { | 1345 if (!error.IsNull()) { |
1347 Exceptions::PropagateError(error); | 1346 Exceptions::PropagateError(error); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 } | 1568 } |
1570 } | 1569 } |
1571 } | 1570 } |
1572 // The cache is null terminated, therefore the loop above should never | 1571 // The cache is null terminated, therefore the loop above should never |
1573 // terminate by itself. | 1572 // terminate by itself. |
1574 UNREACHABLE(); | 1573 UNREACHABLE(); |
1575 return Code::null(); | 1574 return Code::null(); |
1576 } | 1575 } |
1577 | 1576 |
1578 } // namespace dart | 1577 } // namespace dart |
OLD | NEW |