| 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 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 private: | 1851 private: |
| 1852 static const int kNoIndex = -1; | 1852 static const int kNoIndex = -1; |
| 1853 void AddValue(int index, HValue* value) { | 1853 void AddValue(int index, HValue* value) { |
| 1854 assigned_indexes_.Add(index, zone_); | 1854 assigned_indexes_.Add(index, zone_); |
| 1855 // Resize the list of pushed values. | 1855 // Resize the list of pushed values. |
| 1856 values_.Add(NULL, zone_); | 1856 values_.Add(NULL, zone_); |
| 1857 // Set the operand through the base method in HValue to make sure that the | 1857 // Set the operand through the base method in HValue to make sure that the |
| 1858 // use lists are correctly updated. | 1858 // use lists are correctly updated. |
| 1859 SetOperandAt(values_.length() - 1, value); | 1859 SetOperandAt(values_.length() - 1, value); |
| 1860 } | 1860 } |
| 1861 bool HasValueForIndex(int index) { |
| 1862 for (int i = 0; i < assigned_indexes_.length(); ++i) { |
| 1863 if (assigned_indexes_[i] == index) return true; |
| 1864 } |
| 1865 return false; |
| 1866 } |
| 1861 BailoutId ast_id_; | 1867 BailoutId ast_id_; |
| 1862 int pop_count_; | 1868 int pop_count_; |
| 1863 ZoneList<HValue*> values_; | 1869 ZoneList<HValue*> values_; |
| 1864 ZoneList<int> assigned_indexes_; | 1870 ZoneList<int> assigned_indexes_; |
| 1865 Zone* zone_; | 1871 Zone* zone_; |
| 1866 RemovableSimulate removable_; | 1872 RemovableSimulate removable_; |
| 1867 }; | 1873 }; |
| 1868 | 1874 |
| 1869 | 1875 |
| 1870 class HStackCheck: public HTemplateInstruction<1> { | 1876 class HStackCheck: public HTemplateInstruction<1> { |
| (...skipping 4591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6462 virtual bool IsDeletable() const { return true; } | 6468 virtual bool IsDeletable() const { return true; } |
| 6463 }; | 6469 }; |
| 6464 | 6470 |
| 6465 | 6471 |
| 6466 #undef DECLARE_INSTRUCTION | 6472 #undef DECLARE_INSTRUCTION |
| 6467 #undef DECLARE_CONCRETE_INSTRUCTION | 6473 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6468 | 6474 |
| 6469 } } // namespace v8::internal | 6475 } } // namespace v8::internal |
| 6470 | 6476 |
| 6471 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6477 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |