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

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

Issue 10538024: Implemented missing instructions in ia32, more sharing, removed bailouts, enable optimiziations on … (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
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 19 matching lines...) Expand all
30 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED. 30 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED.
31 class FlowGraphCompiler : public FlowGraphCompilerShared { 31 class FlowGraphCompiler : public FlowGraphCompilerShared {
32 public: 32 public:
33 FlowGraphCompiler(Assembler* assembler, 33 FlowGraphCompiler(Assembler* assembler,
34 const ParsedFunction& parsed_function, 34 const ParsedFunction& parsed_function,
35 const GrowableArray<BlockEntryInstr*>& block_order, 35 const GrowableArray<BlockEntryInstr*>& block_order,
36 bool is_optimizing); 36 bool is_optimizing);
37 37
38 void CompileGraph(); 38 void CompileGraph();
39 39
40 void GenerateCallRuntime(intptr_t cid, 40 virtual void GenerateCallRuntime(intptr_t cid,
41 intptr_t token_index, 41 intptr_t token_index,
42 intptr_t try_index, 42 intptr_t try_index,
43 const RuntimeEntry& entry); 43 const RuntimeEntry& entry);
44 44
45 // Returns pc-offset (in bytes) of the pc after the call, can be used to emit 45 // Returns pc-offset (in bytes) of the pc after the call, can be used to emit
46 // pc-descriptor information. 46 // pc-descriptor information.
47 virtual intptr_t EmitInstanceCall(ExternalLabel* target_label, 47 virtual intptr_t EmitInstanceCall(ExternalLabel* target_label,
48 const ICData& ic_data, 48 const ICData& ic_data,
49 const Array& arguments_descriptor, 49 const Array& arguments_descriptor,
50 intptr_t argument_count); 50 intptr_t argument_count);
51 51
52 // Returns pc-offset (in bytes) of the pc after the call, can be used to emit 52 // Returns pc-offset (in bytes) of the pc after the call, can be used to emit
53 // pc-descriptor information. 53 // pc-descriptor information.
54 virtual intptr_t EmitStaticCall(const Function& function, 54 virtual intptr_t EmitStaticCall(const Function& function,
55 const Array& arguments_descriptor, 55 const Array& arguments_descriptor,
56 intptr_t argument_count); 56 intptr_t argument_count);
57 57
58 void GenerateCall(intptr_t token_index, 58 virtual void GenerateCall(intptr_t token_index,
59 intptr_t try_index, 59 intptr_t try_index,
60 const ExternalLabel* label, 60 const ExternalLabel* label,
61 PcDescriptors::Kind kind); 61 PcDescriptors::Kind kind);
62 void GenerateInstanceOf(intptr_t cid, 62 virtual void GenerateInstanceOf(intptr_t cid,
63 intptr_t token_index, 63 intptr_t token_index,
64 intptr_t try_index, 64 intptr_t try_index,
65 const AbstractType& type, 65 const AbstractType& type,
66 bool negate_result); 66 bool negate_result);
67 void GenerateAssertAssignable(intptr_t cid, 67 virtual void GenerateAssertAssignable(intptr_t cid,
68 intptr_t token_index, 68 intptr_t token_index,
69 intptr_t try_index, 69 intptr_t try_index,
70 const AbstractType& dst_type, 70 const AbstractType& dst_type,
71 const String& dst_name); 71 const String& dst_name);
72
73 static const int kLocalsOffsetFromFP = (-1 * kWordSize);
72 74
73 private: 75 private:
74 friend class DeoptimizationStub; 76 friend class DeoptimizationStub;
75 77
76 virtual void VisitBlocks();
77
78 void CopyParameters(); 78 void CopyParameters();
79 void EmitInstructionPrologue(Instruction* instr); 79 virtual void EmitInstructionPrologue(Instruction* instr);
80 80
81 virtual void GenerateInlinedGetter(intptr_t offset); 81 virtual void GenerateInlinedGetter(intptr_t offset);
82 virtual void GenerateInlinedSetter(intptr_t offset); 82 virtual void GenerateInlinedSetter(intptr_t offset);
83 83
84 RawSubtypeTestCache* GenerateInlineInstanceof(intptr_t cid, 84 RawSubtypeTestCache* GenerateInlineInstanceof(intptr_t cid,
85 intptr_t token_index, 85 intptr_t token_index,
86 const AbstractType& type, 86 const AbstractType& type,
87 Label* is_instance_lbl, 87 Label* is_instance_lbl,
88 Label* is_not_instance_lbl); 88 Label* is_not_instance_lbl);
89 89
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 Label* is_instance_lbl, 127 Label* is_instance_lbl,
128 Label* is_not_instance_lbl); 128 Label* is_not_instance_lbl);
129 129
130 void GenerateBoolToJump(Register bool_reg, Label* is_true, Label* is_false); 130 void GenerateBoolToJump(Register bool_reg, Label* is_true, Label* is_false);
131 131
132 virtual void CheckClassIds(Register class_id_reg, 132 virtual void CheckClassIds(Register class_id_reg,
133 const GrowableArray<intptr_t>& class_ids, 133 const GrowableArray<intptr_t>& class_ids,
134 Label* is_equal_lbl, 134 Label* is_equal_lbl,
135 Label* is_not_equal_lbl); 135 Label* is_not_equal_lbl);
136 136
137 void EmitComment(Instruction* instr);
138 void BailoutOnInstruction(Instruction* instr);
139
140 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 137 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
141 }; 138 };
142 139
143 } // namespace dart 140 } // namespace dart
144 141
145 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_ 142 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | runtime/vm/flow_graph_compiler_shared.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698