| 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 intptr_t CurrentTryIndex() const { | 441 intptr_t CurrentTryIndex() const { |
| 442 if (current_block_ == NULL) { | 442 if (current_block_ == NULL) { |
| 443 return CatchClauseNode::kInvalidTryIndex; | 443 return CatchClauseNode::kInvalidTryIndex; |
| 444 } | 444 } |
| 445 return current_block_->try_index(); | 445 return current_block_->try_index(); |
| 446 } | 446 } |
| 447 | 447 |
| 448 bool may_reoptimize() const { return may_reoptimize_; } | 448 bool may_reoptimize() const { return may_reoptimize_; } |
| 449 | 449 |
| 450 // Array/list element address computations. | |
| 451 static intptr_t DataOffsetFor(intptr_t cid); | |
| 452 static intptr_t ElementSizeFor(intptr_t cid); | |
| 453 Address ElementAddressForIntIndex(intptr_t cid, | |
| 454 intptr_t index_scale, | |
| 455 Register array, | |
| 456 intptr_t offset); | |
| 457 Address ElementAddressForRegIndex(intptr_t cid, | |
| 458 intptr_t index_scale, | |
| 459 Register array, | |
| 460 Register index); | |
| 461 Address ExternalElementAddressForIntIndex(intptr_t index_scale, | |
| 462 Register array, | |
| 463 intptr_t offset); | |
| 464 Address ExternalElementAddressForRegIndex(intptr_t index_scale, | |
| 465 Register array, | |
| 466 Register index); | |
| 467 | |
| 468 // Returns 'sorted' array in decreasing count order. | 450 // Returns 'sorted' array in decreasing count order. |
| 469 static void SortICDataByCount(const ICData& ic_data, | 451 static void SortICDataByCount(const ICData& ic_data, |
| 470 GrowableArray<CidTarget>* sorted); | 452 GrowableArray<CidTarget>* sorted); |
| 471 | 453 |
| 472 private: | 454 private: |
| 473 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. | 455 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. |
| 474 | 456 |
| 475 Isolate* isolate() const { return isolate_; } | 457 Isolate* isolate() const { return isolate_; } |
| 476 | 458 |
| 477 void EmitFrameEntry(); | 459 void EmitFrameEntry(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 // that should be used when deoptimizing we store it in this variable. | 593 // that should be used when deoptimizing we store it in this variable. |
| 612 // In future AddDeoptStub should be moved out of the instruction template. | 594 // In future AddDeoptStub should be moved out of the instruction template. |
| 613 Environment* pending_deoptimization_env_; | 595 Environment* pending_deoptimization_env_; |
| 614 | 596 |
| 615 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 597 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 616 }; | 598 }; |
| 617 | 599 |
| 618 } // namespace dart | 600 } // namespace dart |
| 619 | 601 |
| 620 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 602 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |