| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HYDROGEN_H_ | 5 #ifndef V8_HYDROGEN_H_ |
| 6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 HInstruction* increment_; | 1721 HInstruction* increment_; |
| 1722 HPhi* phi_; | 1722 HPhi* phi_; |
| 1723 HBasicBlock* header_block_; | 1723 HBasicBlock* header_block_; |
| 1724 HBasicBlock* body_block_; | 1724 HBasicBlock* body_block_; |
| 1725 HBasicBlock* exit_block_; | 1725 HBasicBlock* exit_block_; |
| 1726 HBasicBlock* exit_trampoline_block_; | 1726 HBasicBlock* exit_trampoline_block_; |
| 1727 Direction direction_; | 1727 Direction direction_; |
| 1728 bool finished_; | 1728 bool finished_; |
| 1729 }; | 1729 }; |
| 1730 | 1730 |
| 1731 template <class A, class P1> | |
| 1732 void DeoptimizeIf(P1 p1, char* const reason) { | |
| 1733 IfBuilder builder(this); | |
| 1734 builder.If<A>(p1); | |
| 1735 builder.ThenDeopt(reason); | |
| 1736 } | |
| 1737 | |
| 1738 template <class A, class P1, class P2> | |
| 1739 void DeoptimizeIf(P1 p1, P2 p2, const char* reason) { | |
| 1740 IfBuilder builder(this); | |
| 1741 builder.If<A>(p1, p2); | |
| 1742 builder.ThenDeopt(reason); | |
| 1743 } | |
| 1744 | |
| 1745 template <class A, class P1, class P2, class P3> | |
| 1746 void DeoptimizeIf(P1 p1, P2 p2, P3 p3, const char* reason) { | |
| 1747 IfBuilder builder(this); | |
| 1748 builder.If<A>(p1, p2, p3); | |
| 1749 builder.ThenDeopt(reason); | |
| 1750 } | |
| 1751 | |
| 1752 HValue* BuildNewElementsCapacity(HValue* old_capacity); | 1731 HValue* BuildNewElementsCapacity(HValue* old_capacity); |
| 1753 | 1732 |
| 1754 class JSArrayBuilder FINAL { | 1733 class JSArrayBuilder FINAL { |
| 1755 public: | 1734 public: |
| 1756 JSArrayBuilder(HGraphBuilder* builder, | 1735 JSArrayBuilder(HGraphBuilder* builder, |
| 1757 ElementsKind kind, | 1736 ElementsKind kind, |
| 1758 HValue* allocation_site_payload, | 1737 HValue* allocation_site_payload, |
| 1759 HValue* constructor_function, | 1738 HValue* constructor_function, |
| 1760 AllocationSiteOverrideMode override_mode); | 1739 AllocationSiteOverrideMode override_mode); |
| 1761 | 1740 |
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2926 } | 2905 } |
| 2927 | 2906 |
| 2928 private: | 2907 private: |
| 2929 HGraphBuilder* builder_; | 2908 HGraphBuilder* builder_; |
| 2930 }; | 2909 }; |
| 2931 | 2910 |
| 2932 | 2911 |
| 2933 } } // namespace v8::internal | 2912 } } // namespace v8::internal |
| 2934 | 2913 |
| 2935 #endif // V8_HYDROGEN_H_ | 2914 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |