| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // Verify the move list before performing moves. | 89 // Verify the move list before performing moves. |
| 90 void Verify(); | 90 void Verify(); |
| 91 | 91 |
| 92 // Helpers for non-trivial source-destination combinations that cannot | 92 // Helpers for non-trivial source-destination combinations that cannot |
| 93 // be handled by a single instruction. | 93 // be handled by a single instruction. |
| 94 void MoveMemoryToMemory(const Address& dst, const Address& src); | 94 void MoveMemoryToMemory(const Address& dst, const Address& src); |
| 95 void StoreObject(const Address& dst, const Object& obj); | 95 void StoreObject(const Address& dst, const Object& obj); |
| 96 void Exchange(Register reg, const Address& mem); | 96 void Exchange(Register reg, const Address& mem); |
| 97 void Exchange(const Address& mem1, const Address& mem2); | 97 void Exchange(const Address& mem1, const Address& mem2); |
| 98 void Exchange(Register reg, intptr_t stack_offset); |
| 99 void Exchange(intptr_t stack_offset1, intptr_t stack_offset2); |
| 98 | 100 |
| 99 FlowGraphCompiler* compiler_; | 101 FlowGraphCompiler* compiler_; |
| 100 | 102 |
| 101 // List of moves not yet resolved. | 103 // List of moves not yet resolved. |
| 102 GrowableArray<MoveOperands*> moves_; | 104 GrowableArray<MoveOperands*> moves_; |
| 103 }; | 105 }; |
| 104 | 106 |
| 105 | 107 |
| 106 // Used for describing a deoptimization point after call (lazy deoptimization). | 108 // Used for describing a deoptimization point after call (lazy deoptimization). |
| 107 // For deoptimization before instruction use class CompilerDeoptInfoWithStub. | 109 // For deoptimization before instruction use class CompilerDeoptInfoWithStub. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 462 |
| 461 // Returns 'sorted' array in decreasing count order. | 463 // Returns 'sorted' array in decreasing count order. |
| 462 static void SortICDataByCount(const ICData& ic_data, | 464 static void SortICDataByCount(const ICData& ic_data, |
| 463 GrowableArray<CidTarget>* sorted); | 465 GrowableArray<CidTarget>* sorted); |
| 464 | 466 |
| 465 private: | 467 private: |
| 466 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. | 468 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. |
| 467 | 469 |
| 468 void EmitFrameEntry(); | 470 void EmitFrameEntry(); |
| 469 | 471 |
| 470 void EmitTrySyncMove(Address dest, Location loc, bool* push_emitted); | 472 void EmitTrySyncMove(intptr_t dest_offset, Location loc, bool* push_emitted); |
| 471 | 473 |
| 472 void AddStaticCallTarget(const Function& function); | 474 void AddStaticCallTarget(const Function& function); |
| 473 | 475 |
| 474 void GenerateDeferredCode(); | 476 void GenerateDeferredCode(); |
| 475 | 477 |
| 476 void EmitInstructionPrologue(Instruction* instr); | 478 void EmitInstructionPrologue(Instruction* instr); |
| 477 void EmitInstructionEpilogue(Instruction* instr); | 479 void EmitInstructionEpilogue(Instruction* instr); |
| 478 | 480 |
| 479 // Emit code to load a Value into register 'dst'. | 481 // Emit code to load a Value into register 'dst'. |
| 480 void LoadValue(Register dst, Value* value); | 482 void LoadValue(Register dst, Value* value); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 // that should be used when deoptimizing we store it in this variable. | 602 // that should be used when deoptimizing we store it in this variable. |
| 601 // In future AddDeoptStub should be moved out of the instruction template. | 603 // In future AddDeoptStub should be moved out of the instruction template. |
| 602 Environment* pending_deoptimization_env_; | 604 Environment* pending_deoptimization_env_; |
| 603 | 605 |
| 604 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 606 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 605 }; | 607 }; |
| 606 | 608 |
| 607 } // namespace dart | 609 } // namespace dart |
| 608 | 610 |
| 609 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 611 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |