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

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

Issue 10500005: More shared code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « no previous file | runtime/vm/flow_graph_compiler_ia32.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 4
5 #ifndef VM_FLOW_GRAPH_COMPILER_IA32_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_IA32_H_
6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_ 6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_
7 7
8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_
9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h. 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h.
10 #endif 10 #endif
(...skipping 18 matching lines...) Expand all
29 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED. 29 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED.
30 class FlowGraphCompiler : public FlowGraphCompilerShared { 30 class FlowGraphCompiler : public FlowGraphCompilerShared {
31 public: 31 public:
32 FlowGraphCompiler(Assembler* assembler, 32 FlowGraphCompiler(Assembler* assembler,
33 const ParsedFunction& parsed_function, 33 const ParsedFunction& parsed_function,
34 const GrowableArray<BlockEntryInstr*>& block_order, 34 const GrowableArray<BlockEntryInstr*>& block_order,
35 bool is_optimizing); 35 bool is_optimizing);
36 36
37 void CompileGraph(); 37 void CompileGraph();
38 38
39 void FinalizeComments(const Code& code);
40
41 void GenerateCallRuntime(intptr_t cid, 39 void GenerateCallRuntime(intptr_t cid,
42 intptr_t token_index, 40 intptr_t token_index,
43 intptr_t try_index, 41 intptr_t try_index,
44 const RuntimeEntry& entry); 42 const RuntimeEntry& entry);
45 43
46 void EmitInstanceCall(intptr_t cid, 44 // Returns pc-offset (in bytes) of the pc after the call, can be used to emit
47 intptr_t token_index, 45 // pc-descriptor information.
48 intptr_t try_index, 46 virtual intptr_t EmitInstanceCall(ExternalLabel* target_label,
49 const String& function_name, 47 const ICData& ic_data,
50 intptr_t argument_count, 48 const Array& arguments_descriptor,
51 const Array& argument_names, 49 intptr_t argument_count);
52 intptr_t checked_argument_count); 50
53 void EmitStaticCall(intptr_t token_index, 51 // Returns pc-offset (in bytes) of the pc after the call, can be used to emit
54 intptr_t try_index, 52 // pc-descriptor information.
55 const Function& function, 53 virtual intptr_t EmitStaticCall(const Function& function,
56 intptr_t argument_count, 54 const Array& arguments_descriptor,
57 const Array& argument_names); 55 intptr_t argument_count);
56
58 void GenerateCall(intptr_t token_index, 57 void GenerateCall(intptr_t token_index,
59 intptr_t try_index, 58 intptr_t try_index,
60 const ExternalLabel* label, 59 const ExternalLabel* label,
61 PcDescriptors::Kind kind); 60 PcDescriptors::Kind kind);
62 61
63 private: 62 private:
64 friend class DeoptimizationStub; 63 friend class DeoptimizationStub;
65 64
66 // Bail out of the flow graph compiler. Does not return to the caller.
67 void Bailout(const char* reason);
68
69 virtual void VisitBlocks(); 65 virtual void VisitBlocks();
70 66
71 void CopyParameters(); 67 void CopyParameters();
72 void EmitInstructionPrologue(Instruction* instr); 68 void EmitInstructionPrologue(Instruction* instr);
73 69
74 bool CanOptimize(); 70 virtual void GenerateInlinedGetter(intptr_t offset);
75 bool TryIntrinsify(); 71 virtual void GenerateInlinedSetter(intptr_t offset);
76 void IntrinsifyGetter();
77 void IntrinsifySetter();
78 72
79 void EmitComment(Instruction* instr); 73 void EmitComment(Instruction* instr);
80 void BailoutOnInstruction(Instruction* instr); 74 void BailoutOnInstruction(Instruction* instr);
81 75
82 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 76 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
83 }; 77 };
84 78
85 } // namespace dart 79 } // namespace dart
86 80
87 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_ 81 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698