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

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

Issue 878243002: Cleanup: use const reference for ParsedFunction where possible. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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.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 FlowGraphCompiler;
17 class Function; 17 class Function;
18 class TargetEntryInstr; 18 class TargetEntryInstr;
19 class ParsedFunction; 19 class ParsedFunction;
20 class FlowGraph; 20 class FlowGraph;
21 21
22 class Intrinsifier : public AllStatic { 22 class Intrinsifier : public AllStatic {
23 public: 23 public:
24 static void Intrinsify(ParsedFunction* parsed_function, 24 static void Intrinsify(const ParsedFunction& parsed_function,
25 FlowGraphCompiler* compiler); 25 FlowGraphCompiler* compiler);
26 static void InitializeState(); 26 static void InitializeState();
27 27
28 static bool GraphIntrinsify(ParsedFunction* parsed_function, 28 static bool GraphIntrinsify(const ParsedFunction& parsed_function,
29 FlowGraphCompiler* compiler); 29 FlowGraphCompiler* compiler);
30 30
31 static intptr_t ParameterSlotFromSp(); 31 static intptr_t ParameterSlotFromSp();
32 32
33 private: 33 private:
34 static bool CanIntrinsify(const Function& function); 34 static bool CanIntrinsify(const Function& function);
35 35
36 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ 36 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \
37 static void enum_name(Assembler* assembler); 37 static void enum_name(Assembler* assembler);
38 38
39 ALL_INTRINSICS_LIST(DECLARE_FUNCTION) 39 ALL_INTRINSICS_LIST(DECLARE_FUNCTION)
40 40
41 #undef DECLARE_FUNCTION 41 #undef DECLARE_FUNCTION
42 42
43 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ 43 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \
44 static bool Build_##enum_name(FlowGraph* flow_graph); 44 static bool Build_##enum_name(FlowGraph* flow_graph);
45 45
46 GRAPH_INTRINSICS_LIST(DECLARE_FUNCTION) 46 GRAPH_INTRINSICS_LIST(DECLARE_FUNCTION)
47 47
48 #undef DECLARE_FUNCTION 48 #undef DECLARE_FUNCTION
49 }; 49 };
50 50
51 } // namespace dart 51 } // namespace dart
52 52
53 #endif // VM_INTRINSIFIER_H_ 53 #endif // VM_INTRINSIFIER_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698