OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 #ifdef DEBUG | 1767 #ifdef DEBUG |
1768 Handle<JSFunction> closure_; | 1768 Handle<JSFunction> closure_; |
1769 #endif | 1769 #endif |
1770 }; | 1770 }; |
1771 | 1771 |
1772 | 1772 |
1773 class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { | 1773 class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { |
1774 public: | 1774 public: |
1775 enum Kind { BIND, LOOKUP }; | 1775 enum Kind { BIND, LOOKUP }; |
1776 | 1776 |
1777 HEnvironmentMarker(Kind kind, int index) | 1777 DECLARE_INSTRUCTION_FACTORY_P2(HEnvironmentMarker, Kind, int); |
1778 : kind_(kind), index_(index), next_simulate_(NULL) { } | |
1779 | 1778 |
1780 Kind kind() { return kind_; } | 1779 Kind kind() { return kind_; } |
1781 int index() { return index_; } | 1780 int index() { return index_; } |
1782 HSimulate* next_simulate() { return next_simulate_; } | 1781 HSimulate* next_simulate() { return next_simulate_; } |
1783 void set_next_simulate(HSimulate* simulate) { | 1782 void set_next_simulate(HSimulate* simulate) { |
1784 next_simulate_ = simulate; | 1783 next_simulate_ = simulate; |
1785 } | 1784 } |
1786 | 1785 |
1787 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 1786 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
1788 return Representation::None(); | 1787 return Representation::None(); |
1789 } | 1788 } |
1790 | 1789 |
1791 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1790 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1792 | 1791 |
1793 #ifdef DEBUG | 1792 #ifdef DEBUG |
1794 void set_closure(Handle<JSFunction> closure) { | 1793 void set_closure(Handle<JSFunction> closure) { |
1795 ASSERT(closure_.is_null()); | 1794 ASSERT(closure_.is_null()); |
1796 ASSERT(!closure.is_null()); | 1795 ASSERT(!closure.is_null()); |
1797 closure_ = closure; | 1796 closure_ = closure; |
1798 } | 1797 } |
1799 Handle<JSFunction> closure() const { return closure_; } | 1798 Handle<JSFunction> closure() const { return closure_; } |
1800 #endif | 1799 #endif |
1801 | 1800 |
1802 DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker); | 1801 DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker); |
1803 | 1802 |
1804 private: | 1803 private: |
| 1804 HEnvironmentMarker(Kind kind, int index) |
| 1805 : kind_(kind), index_(index), next_simulate_(NULL) { } |
| 1806 |
1805 Kind kind_; | 1807 Kind kind_; |
1806 int index_; | 1808 int index_; |
1807 HSimulate* next_simulate_; | 1809 HSimulate* next_simulate_; |
1808 | 1810 |
1809 #ifdef DEBUG | 1811 #ifdef DEBUG |
1810 Handle<JSFunction> closure_; | 1812 Handle<JSFunction> closure_; |
1811 #endif | 1813 #endif |
1812 }; | 1814 }; |
1813 | 1815 |
1814 | 1816 |
(...skipping 5330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7145 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7147 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7146 }; | 7148 }; |
7147 | 7149 |
7148 | 7150 |
7149 #undef DECLARE_INSTRUCTION | 7151 #undef DECLARE_INSTRUCTION |
7150 #undef DECLARE_CONCRETE_INSTRUCTION | 7152 #undef DECLARE_CONCRETE_INSTRUCTION |
7151 | 7153 |
7152 } } // namespace v8::internal | 7154 } } // namespace v8::internal |
7153 | 7155 |
7154 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7156 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |