| 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 // Class for intrinsifying functions. | 4 // Class for intrinsifying functions. |
| 5 | 5 |
| 6 #include "vm/assembler.h" | 6 #include "vm/assembler.h" |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 DEFINE_FLAG(bool, trace_intrinsifier, false, "Trace intrinsifier"); | 25 DEFINE_FLAG(bool, trace_intrinsifier, false, "Trace intrinsifier"); |
| 26 DECLARE_FLAG(bool, code_comments); | 26 DECLARE_FLAG(bool, code_comments); |
| 27 DECLARE_FLAG(bool, print_flow_graph); | 27 DECLARE_FLAG(bool, print_flow_graph); |
| 28 DECLARE_FLAG(bool, print_flow_graph_optimized); | 28 DECLARE_FLAG(bool, print_flow_graph_optimized); |
| 29 | 29 |
| 30 bool Intrinsifier::CanIntrinsify(const Function& function) { | 30 bool Intrinsifier::CanIntrinsify(const Function& function) { |
| 31 if (FLAG_trace_intrinsifier) { | 31 if (FLAG_trace_intrinsifier) { |
| 32 THR_Print("CanIntrinsify %s ->", function.ToQualifiedCString()); | 32 THR_Print("CanIntrinsify %s ->", function.ToQualifiedCString()); |
| 33 } | 33 } |
| 34 if (!FLAG_intrinsify) return false; | 34 if (!FLAG_intrinsify) return false; |
| 35 // TODO(regis): We do not need to explicitly filter generic functions here, |
| 36 // unless there are errors we don't detect at link time. Revisit if necessary. |
| 35 if (function.IsClosureFunction()) { | 37 if (function.IsClosureFunction()) { |
| 36 if (FLAG_trace_intrinsifier) { | 38 if (FLAG_trace_intrinsifier) { |
| 37 THR_Print("No, closure function.\n"); | 39 THR_Print("No, closure function.\n"); |
| 38 } | 40 } |
| 39 return false; | 41 return false; |
| 40 } | 42 } |
| 41 // Can occur because of compile-all flag. | 43 // Can occur because of compile-all flag. |
| 42 if (function.is_external()) { | 44 if (function.is_external()) { |
| 43 if (FLAG_trace_intrinsifier) { | 45 if (FLAG_trace_intrinsifier) { |
| 44 THR_Print("No, external function.\n"); | 46 THR_Print("No, external function.\n"); |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 } | 1175 } |
| 1174 | 1176 |
| 1175 | 1177 |
| 1176 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { | 1178 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { |
| 1177 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); | 1179 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); |
| 1178 } | 1180 } |
| 1179 #endif // !defined(TARGET_ARCH_DBC) | 1181 #endif // !defined(TARGET_ARCH_DBC) |
| 1180 | 1182 |
| 1181 | 1183 |
| 1182 } // namespace dart | 1184 } // namespace dart |
| OLD | NEW |