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 4943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4954 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } | 4954 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } |
4955 | 4955 |
4956 private: | 4956 private: |
4957 HSar(HValue* context, HValue* left, HValue* right) | 4957 HSar(HValue* context, HValue* left, HValue* right) |
4958 : HBitwiseBinaryOperation(context, left, right) { } | 4958 : HBitwiseBinaryOperation(context, left, right) { } |
4959 }; | 4959 }; |
4960 | 4960 |
4961 | 4961 |
4962 class HRor V8_FINAL : public HBitwiseBinaryOperation { | 4962 class HRor V8_FINAL : public HBitwiseBinaryOperation { |
4963 public: | 4963 public: |
4964 HRor(HValue* context, HValue* left, HValue* right) | 4964 static HInstruction* New(Zone* zone, |
4965 : HBitwiseBinaryOperation(context, left, right) { | 4965 HValue* context, |
4966 ChangeRepresentation(Representation::Integer32()); | 4966 HValue* left, |
| 4967 HValue* right) { |
| 4968 return new(zone) HRor(context, left, right); |
4967 } | 4969 } |
4968 | 4970 |
4969 virtual void UpdateRepresentation(Representation new_rep, | 4971 virtual void UpdateRepresentation(Representation new_rep, |
4970 HInferRepresentationPhase* h_infer, | 4972 HInferRepresentationPhase* h_infer, |
4971 const char* reason) V8_OVERRIDE { | 4973 const char* reason) V8_OVERRIDE { |
4972 if (new_rep.IsSmi()) new_rep = Representation::Integer32(); | 4974 if (new_rep.IsSmi()) new_rep = Representation::Integer32(); |
4973 HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); | 4975 HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); |
4974 } | 4976 } |
4975 | 4977 |
4976 DECLARE_CONCRETE_INSTRUCTION(Ror) | 4978 DECLARE_CONCRETE_INSTRUCTION(Ror) |
4977 | 4979 |
4978 protected: | 4980 protected: |
4979 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } | 4981 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } |
| 4982 |
| 4983 private: |
| 4984 HRor(HValue* context, HValue* left, HValue* right) |
| 4985 : HBitwiseBinaryOperation(context, left, right) { |
| 4986 ChangeRepresentation(Representation::Integer32()); |
| 4987 } |
4980 }; | 4988 }; |
4981 | 4989 |
4982 | 4990 |
4983 class HOsrEntry V8_FINAL : public HTemplateInstruction<0> { | 4991 class HOsrEntry V8_FINAL : public HTemplateInstruction<0> { |
4984 public: | 4992 public: |
4985 DECLARE_INSTRUCTION_FACTORY_P1(HOsrEntry, BailoutId); | 4993 DECLARE_INSTRUCTION_FACTORY_P1(HOsrEntry, BailoutId); |
4986 | 4994 |
4987 BailoutId ast_id() const { return ast_id_; } | 4995 BailoutId ast_id() const { return ast_id_; } |
4988 | 4996 |
4989 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 4997 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7063 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7071 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7064 }; | 7072 }; |
7065 | 7073 |
7066 | 7074 |
7067 #undef DECLARE_INSTRUCTION | 7075 #undef DECLARE_INSTRUCTION |
7068 #undef DECLARE_CONCRETE_INSTRUCTION | 7076 #undef DECLARE_CONCRETE_INSTRUCTION |
7069 | 7077 |
7070 } } // namespace v8::internal | 7078 } } // namespace v8::internal |
7071 | 7079 |
7072 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7080 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |