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): Do we need to explicitly filter generic functions here? | |
rmacnak
2017/06/20 17:20:46
Only if there are errors we don't detect at link t
regis
2017/06/21 04:39:04
I updated, but kept the TODO here for now.
| |
35 if (function.IsClosureFunction()) { | 36 if (function.IsClosureFunction()) { |
36 if (FLAG_trace_intrinsifier) { | 37 if (FLAG_trace_intrinsifier) { |
37 THR_Print("No, closure function.\n"); | 38 THR_Print("No, closure function.\n"); |
38 } | 39 } |
39 return false; | 40 return false; |
40 } | 41 } |
41 // Can occur because of compile-all flag. | 42 // Can occur because of compile-all flag. |
42 if (function.is_external()) { | 43 if (function.is_external()) { |
43 if (FLAG_trace_intrinsifier) { | 44 if (FLAG_trace_intrinsifier) { |
44 THR_Print("No, external function.\n"); | 45 THR_Print("No, external function.\n"); |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1173 } | 1174 } |
1174 | 1175 |
1175 | 1176 |
1176 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { | 1177 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { |
1177 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); | 1178 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); |
1178 } | 1179 } |
1179 #endif // !defined(TARGET_ARCH_DBC) | 1180 #endif // !defined(TARGET_ARCH_DBC) |
1180 | 1181 |
1181 | 1182 |
1182 } // namespace dart | 1183 } // namespace dart |
OLD | NEW |