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

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

Issue 10823308: Implement basic support for deferred slow path code with calls that save and restore live registers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Kevin's comments Created 8 years, 4 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_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_
6 #define VM_FLOW_GRAPH_COMPILER_H_ 6 #define VM_FLOW_GRAPH_COMPILER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 const intptr_t deopt_id_; 165 const intptr_t deopt_id_;
166 const intptr_t try_index_; 166 const intptr_t try_index_;
167 const DeoptReasonId reason_; 167 const DeoptReasonId reason_;
168 GrowableArray<Register> registers_; 168 GrowableArray<Register> registers_;
169 const Environment* deoptimization_env_; 169 const Environment* deoptimization_env_;
170 Label entry_label_; 170 Label entry_label_;
171 171
172 DISALLOW_COPY_AND_ASSIGN(DeoptimizationStub); 172 DISALLOW_COPY_AND_ASSIGN(DeoptimizationStub);
173 }; 173 };
174 174
175
176 class SlowPathCode : public ZoneAllocated {
177 public:
178 SlowPathCode() : entry_label_(), exit_label_() { }
179
180 Label* entry_label() { return &entry_label_; }
181 Label* exit_label() { return &exit_label_; }
182
183 virtual void EmitNativeCode(FlowGraphCompiler* compiler) = 0;
184
185 private:
186 Label entry_label_;
187 Label exit_label_;
188
189 DISALLOW_COPY_AND_ASSIGN(SlowPathCode);
190 };
191
192
175 } // namespace dart 193 } // namespace dart
176 194
177 #if defined(TARGET_ARCH_IA32) 195 #if defined(TARGET_ARCH_IA32)
178 #include "vm/flow_graph_compiler_ia32.h" 196 #include "vm/flow_graph_compiler_ia32.h"
179 #elif defined(TARGET_ARCH_X64) 197 #elif defined(TARGET_ARCH_X64)
180 #include "vm/flow_graph_compiler_x64.h" 198 #include "vm/flow_graph_compiler_x64.h"
181 #elif defined(TARGET_ARCH_ARM) 199 #elif defined(TARGET_ARCH_ARM)
182 #include "vm/flow_graph_compiler_arm.h" 200 #include "vm/flow_graph_compiler_arm.h"
183 #else 201 #else
184 #error Unknown architecture. 202 #error Unknown architecture.
185 #endif 203 #endif
186 204
187 #endif // VM_FLOW_GRAPH_COMPILER_H_ 205 #endif // VM_FLOW_GRAPH_COMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698