| OLD | NEW |
| 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/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 ParallelMoveResolver* resolver_; | 56 ParallelMoveResolver* resolver_; |
| 57 Register reg_; | 57 Register reg_; |
| 58 bool spilled_; | 58 bool spilled_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 | 61 |
| 62 bool IsScratchLocation(Location loc); | 62 bool IsScratchLocation(Location loc); |
| 63 intptr_t AllocateScratchRegister(Location::Kind kind, | 63 intptr_t AllocateScratchRegister(Location::Kind kind, |
| 64 intptr_t blocked, | 64 uword blocked_mask, |
| 65 intptr_t first_free_register, | 65 intptr_t first_free_register, |
| 66 intptr_t last_free_register, | 66 intptr_t last_free_register, |
| 67 bool* spilled); | 67 bool* spilled); |
| 68 | 68 |
| 69 void SpillScratch(Register reg); | 69 void SpillScratch(Register reg); |
| 70 void RestoreScratch(Register reg); | 70 void RestoreScratch(Register reg); |
| 71 void SpillFpuScratch(FpuRegister reg); | 71 void SpillFpuScratch(FpuRegister reg); |
| 72 void RestoreFpuScratch(FpuRegister reg); | 72 void RestoreFpuScratch(FpuRegister reg); |
| 73 | 73 |
| 74 // friend class ScratchXmmRegisterScope; | 74 // friend class ScratchXmmRegisterScope; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 89 | 89 |
| 90 // Verify the move list before performing moves. | 90 // Verify the move list before performing moves. |
| 91 void Verify(); | 91 void Verify(); |
| 92 | 92 |
| 93 // Helpers for non-trivial source-destination combinations that cannot | 93 // Helpers for non-trivial source-destination combinations that cannot |
| 94 // be handled by a single instruction. | 94 // be handled by a single instruction. |
| 95 void MoveMemoryToMemory(const Address& dst, const Address& src); | 95 void MoveMemoryToMemory(const Address& dst, const Address& src); |
| 96 void StoreObject(const Address& dst, const Object& obj); | 96 void StoreObject(const Address& dst, const Object& obj); |
| 97 void Exchange(Register reg, const Address& mem); | 97 void Exchange(Register reg, const Address& mem); |
| 98 void Exchange(const Address& mem1, const Address& mem2); | 98 void Exchange(const Address& mem1, const Address& mem2); |
| 99 void Exchange(Register reg, intptr_t stack_offset); | 99 void Exchange(Register reg, Register base_reg, intptr_t stack_offset); |
| 100 void Exchange(intptr_t stack_offset1, intptr_t stack_offset2); | 100 void Exchange(Register base_reg1, |
| 101 intptr_t stack_offset1, |
| 102 Register base_reg2, |
| 103 intptr_t stack_offset2); |
| 101 | 104 |
| 102 FlowGraphCompiler* compiler_; | 105 FlowGraphCompiler* compiler_; |
| 103 | 106 |
| 104 // List of moves not yet resolved. | 107 // List of moves not yet resolved. |
| 105 GrowableArray<MoveOperands*> moves_; | 108 GrowableArray<MoveOperands*> moves_; |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 | 111 |
| 109 // Used for describing a deoptimization point after call (lazy deoptimization). | 112 // Used for describing a deoptimization point after call (lazy deoptimization). |
| 110 // For deoptimization before instruction use class CompilerDeoptInfoWithStub. | 113 // For deoptimization before instruction use class CompilerDeoptInfoWithStub. |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 intptr_t lazy_deopt_pc_offset_; | 641 intptr_t lazy_deopt_pc_offset_; |
| 639 | 642 |
| 640 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; | 643 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; |
| 641 | 644 |
| 642 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 645 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 643 }; | 646 }; |
| 644 | 647 |
| 645 } // namespace dart | 648 } // namespace dart |
| 646 | 649 |
| 647 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 650 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |