Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: runtime/vm/intrinsifier.h

Issue 513213002: Generate some intrinsics using our IR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed Slava's feedback Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef VM_INTRINSIFIER_H_ 6 #ifndef VM_INTRINSIFIER_H_
7 #define VM_INTRINSIFIER_H_ 7 #define VM_INTRINSIFIER_H_
8 8
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/method_recognizer.h" 10 #include "vm/method_recognizer.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 // Forward declarations. 14 // Forward declarations.
15 class Assembler; 15 class Assembler;
16 class FlowGraphCompiler;
16 class Function; 17 class Function;
18 class TargetEntryInstr;
19 class ParsedFunction;
20 class FlowGraph;
17 21
18 class Intrinsifier : public AllStatic { 22 class Intrinsifier : public AllStatic {
19 public: 23 public:
20 // Try to intrinsify 'function'. Returns true if the function intrinsified 24 static void Intrinsify(ParsedFunction* parsed_function,
21 // completely and the code does not need to be generated (i.e., no slow 25 FlowGraphCompiler* compiler);
22 // path possible).
23 static void Intrinsify(const Function& function, Assembler* assembler);
24 static void InitializeState(); 26 static void InitializeState();
25 27
28 static bool GraphIntrinsify(ParsedFunction* parsed_function,
29 FlowGraphCompiler* compiler);
30
31 static intptr_t ParameterSlotFromSp();
32
26 private: 33 private:
27 static bool CanIntrinsify(const Function& function); 34 static bool CanIntrinsify(const Function& function);
28 35
29 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ 36 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \
30 static void destination(Assembler* assembler); 37 static void enum_name(Assembler* assembler);
31 38
32 ALL_INTRINSICS_LIST(DECLARE_FUNCTION) 39 ALL_INTRINSICS_LIST(DECLARE_FUNCTION)
33 40
34 #undef DECLARE_FUNCTION 41 #undef DECLARE_FUNCTION
42
43 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \
44 static bool Build_##enum_name(FlowGraph* flow_graph);
45
46 GRAPH_INTRINSICS_LIST(DECLARE_FUNCTION)
47
48 #undef DECLARE_FUNCTION
35 }; 49 };
36 50
37 } // namespace dart 51 } // namespace dart
38 52
39 #endif // VM_INTRINSIFIER_H_ 53 #endif // VM_INTRINSIFIER_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698