Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.h |
| diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h |
| index f141fd18bc1e1d991133e9e4fe711fe6595153f2..f90a6c621926c6d1e97d5d59cce51a47a3404324 100644 |
| --- a/runtime/vm/flow_graph_compiler.h |
| +++ b/runtime/vm/flow_graph_compiler.h |
| @@ -31,6 +31,41 @@ class ParallelMoveResolver : public ValueObject { |
| void EmitNativeCode(ParallelMoveInstr* parallel_move); |
| private: |
| + class ScratchFpuRegisterScope : public ValueObject { |
| + public: |
| + explicit ScratchFpuRegisterScope(ParallelMoveResolver* resolver); |
| + ~ScratchFpuRegisterScope(); |
| + |
| + FpuRegister reg() const { return reg_; } |
| + |
| + private: |
| + ParallelMoveResolver* resolver_; |
| + FpuRegister reg_; |
| + bool spilled_; |
| + }; |
| + |
| + class ScratchRegisterScope : public ValueObject { |
|
Florian Schneider
2013/04/09 09:44:27
Would one class instead of two almost identical cl
|
| + public: |
| + ScratchRegisterScope(ParallelMoveResolver* resolver, Register blocked); |
| + ~ScratchRegisterScope(); |
| + |
| + Register reg() const { return reg_; } |
| + |
| + private: |
| + ParallelMoveResolver* resolver_; |
| + Register reg_; |
| + bool spilled_; |
| + }; |
| + |
| + |
| + bool IsScratchLocation(Location loc); |
| + void SpillScratch(Register reg); |
| + void RestoreScratch(Register reg); |
| + void SpillFpuScratch(FpuRegister reg); |
| + void RestoreFpuScratch(FpuRegister reg); |
| + |
| + // friend class ScratchXmmRegisterScope; |
| + |
| // Build the initial list of moves. |
| void BuildInitialMoveList(ParallelMoveInstr* parallel_move); |