| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 ~FlowGraphCompiler(); | 234 ~FlowGraphCompiler(); |
| 235 | 235 |
| 236 static bool SupportsUnboxedMints(); | 236 static bool SupportsUnboxedMints(); |
| 237 | 237 |
| 238 // Accessors. | 238 // Accessors. |
| 239 Assembler* assembler() const { return assembler_; } | 239 Assembler* assembler() const { return assembler_; } |
| 240 const ParsedFunction& parsed_function() const { return parsed_function_; } | 240 const ParsedFunction& parsed_function() const { return parsed_function_; } |
| 241 const GrowableArray<BlockEntryInstr*>& block_order() const { | 241 const GrowableArray<BlockEntryInstr*>& block_order() const { |
| 242 return block_order_; | 242 return block_order_; |
| 243 } | 243 } |
| 244 |
| 245 const FlowGraph& flow_graph() const { return flow_graph_; } |
| 246 |
| 244 DescriptorList* pc_descriptors_list() const { | 247 DescriptorList* pc_descriptors_list() const { |
| 245 return pc_descriptors_list_; | 248 return pc_descriptors_list_; |
| 246 } | 249 } |
| 247 BlockEntryInstr* current_block() const { return current_block_; } | 250 BlockEntryInstr* current_block() const { return current_block_; } |
| 248 void set_current_block(BlockEntryInstr* value) { | 251 void set_current_block(BlockEntryInstr* value) { |
| 249 current_block_ = value; | 252 current_block_ = value; |
| 250 } | 253 } |
| 251 static bool CanOptimize(); | 254 static bool CanOptimize(); |
| 252 bool CanOptimizeFunction() const; | 255 bool CanOptimizeFunction() const; |
| 253 bool is_optimizing() const { return is_optimizing_; } | 256 bool is_optimizing() const { return is_optimizing_; } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 void EmitEqualityRegConstCompare(Register reg, | 373 void EmitEqualityRegConstCompare(Register reg, |
| 371 const Object& obj, | 374 const Object& obj, |
| 372 bool needs_number_check); | 375 bool needs_number_check); |
| 373 void EmitEqualityRegRegCompare(Register left, | 376 void EmitEqualityRegRegCompare(Register left, |
| 374 Register right, | 377 Register right, |
| 375 bool needs_number_check); | 378 bool needs_number_check); |
| 376 // Implement equality: if any of the arguments is null do identity check. | 379 // Implement equality: if any of the arguments is null do identity check. |
| 377 // Fallthrough calls super equality. | 380 // Fallthrough calls super equality. |
| 378 void EmitSuperEqualityCallPrologue(Register result, Label* skip_call); | 381 void EmitSuperEqualityCallPrologue(Register result, Label* skip_call); |
| 379 | 382 |
| 383 |
| 384 void EmitTrySync(Instruction* instr, intptr_t try_index); |
| 385 |
| 380 intptr_t StackSize() const; | 386 intptr_t StackSize() const; |
| 381 | 387 |
| 382 // Returns assembler label associated with the given block entry. | 388 // Returns assembler label associated with the given block entry. |
| 383 Label* GetJumpLabel(BlockEntryInstr* block_entry) const; | 389 Label* GetJumpLabel(BlockEntryInstr* block_entry) const; |
| 384 bool WasCompacted(BlockEntryInstr* block_entry) const; | 390 bool WasCompacted(BlockEntryInstr* block_entry) const; |
| 385 | 391 |
| 386 // Returns true if there is a next block after the current one in | 392 // Returns true if there is a next block after the current one in |
| 387 // the block order and if it is the given block. | 393 // the block order and if it is the given block. |
| 388 bool CanFallThroughTo(BlockEntryInstr* block_entry) const; | 394 bool CanFallThroughTo(BlockEntryInstr* block_entry) const; |
| 389 | 395 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 // that should be used when deoptimizing we store it in this variable. | 586 // that should be used when deoptimizing we store it in this variable. |
| 581 // In future AddDeoptStub should be moved out of the instruction template. | 587 // In future AddDeoptStub should be moved out of the instruction template. |
| 582 Environment* pending_deoptimization_env_; | 588 Environment* pending_deoptimization_env_; |
| 583 | 589 |
| 584 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 590 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 585 }; | 591 }; |
| 586 | 592 |
| 587 } // namespace dart | 593 } // namespace dart |
| 588 | 594 |
| 589 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 595 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |