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 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2061 virtual bool DataEquals(HValue* other) { | 2061 virtual bool DataEquals(HValue* other) { |
2062 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); | 2062 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); |
2063 return op_ == b->op(); | 2063 return op_ == b->op(); |
2064 } | 2064 } |
2065 | 2065 |
2066 private: | 2066 private: |
2067 BuiltinFunctionId op_; | 2067 BuiltinFunctionId op_; |
2068 }; | 2068 }; |
2069 | 2069 |
2070 | 2070 |
2071 class HLoadElements: public HUnaryOperation { | 2071 class HLoadElements: public HTemplateInstruction<2> { |
2072 public: | 2072 public: |
2073 explicit HLoadElements(HValue* value) : HUnaryOperation(value) { | 2073 HLoadElements(HValue* value, HValue* typecheck) { |
| 2074 SetOperandAt(0, value); |
| 2075 SetOperandAt(1, typecheck); |
2074 set_representation(Representation::Tagged()); | 2076 set_representation(Representation::Tagged()); |
2075 SetFlag(kUseGVN); | 2077 SetFlag(kUseGVN); |
2076 SetGVNFlag(kDependsOnElementsPointer); | 2078 SetGVNFlag(kDependsOnElementsPointer); |
2077 } | 2079 } |
2078 | 2080 |
| 2081 HValue* value() { return OperandAt(0); } |
| 2082 |
2079 virtual Representation RequiredInputRepresentation(int index) { | 2083 virtual Representation RequiredInputRepresentation(int index) { |
2080 return Representation::Tagged(); | 2084 return Representation::Tagged(); |
2081 } | 2085 } |
2082 | 2086 |
2083 DECLARE_CONCRETE_INSTRUCTION(LoadElements) | 2087 DECLARE_CONCRETE_INSTRUCTION(LoadElements) |
2084 | 2088 |
2085 protected: | 2089 protected: |
2086 virtual bool DataEquals(HValue* other) { return true; } | 2090 virtual bool DataEquals(HValue* other) { return true; } |
2087 }; | 2091 }; |
2088 | 2092 |
(...skipping 3191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5280 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5284 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
5281 }; | 5285 }; |
5282 | 5286 |
5283 | 5287 |
5284 #undef DECLARE_INSTRUCTION | 5288 #undef DECLARE_INSTRUCTION |
5285 #undef DECLARE_CONCRETE_INSTRUCTION | 5289 #undef DECLARE_CONCRETE_INSTRUCTION |
5286 | 5290 |
5287 } } // namespace v8::internal | 5291 } } // namespace v8::internal |
5288 | 5292 |
5289 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5293 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |