| 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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 } | 1032 } |
| 1033 | 1033 |
| 1034 GVNFlagSet ObservableChangesFlags() const { | 1034 GVNFlagSet ObservableChangesFlags() const { |
| 1035 GVNFlagSet result = gvn_flags_; | 1035 GVNFlagSet result = gvn_flags_; |
| 1036 result.Intersect(AllChangesFlagSet()); | 1036 result.Intersect(AllChangesFlagSet()); |
| 1037 result.Intersect(AllObservableSideEffectsFlagSet()); | 1037 result.Intersect(AllObservableSideEffectsFlagSet()); |
| 1038 return result; | 1038 return result; |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 Range* range() const { return range_; } | 1041 Range* range() const { return range_; } |
| 1042 // TODO(svenpanne) We should really use the null object pattern here. |
| 1042 bool HasRange() const { return range_ != NULL; } | 1043 bool HasRange() const { return range_ != NULL; } |
| 1044 bool CanBeNegative() const { return !HasRange() || range()->CanBeNegative(); } |
| 1045 bool CanBeZero() const { return !HasRange() || range()->CanBeZero(); } |
| 1046 bool RangeCanInclude(int value) const { |
| 1047 return !HasRange() || range()->Includes(value); |
| 1048 } |
| 1043 void AddNewRange(Range* r, Zone* zone); | 1049 void AddNewRange(Range* r, Zone* zone); |
| 1044 void RemoveLastAddedRange(); | 1050 void RemoveLastAddedRange(); |
| 1045 void ComputeInitialRange(Zone* zone); | 1051 void ComputeInitialRange(Zone* zone); |
| 1046 | 1052 |
| 1047 // Representation helpers. | 1053 // Representation helpers. |
| 1048 virtual Representation observed_input_representation(int index) { | 1054 virtual Representation observed_input_representation(int index) { |
| 1049 return Representation::None(); | 1055 return Representation::None(); |
| 1050 } | 1056 } |
| 1051 virtual Representation RequiredInputRepresentation(int index) = 0; | 1057 virtual Representation RequiredInputRepresentation(int index) = 0; |
| 1052 virtual void InferRepresentation(HInferRepresentation* h_infer); | 1058 virtual void InferRepresentation(HInferRepresentation* h_infer); |
| (...skipping 5524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6577 virtual bool IsDeletable() const { return true; } | 6583 virtual bool IsDeletable() const { return true; } |
| 6578 }; | 6584 }; |
| 6579 | 6585 |
| 6580 | 6586 |
| 6581 #undef DECLARE_INSTRUCTION | 6587 #undef DECLARE_INSTRUCTION |
| 6582 #undef DECLARE_CONCRETE_INSTRUCTION | 6588 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6583 | 6589 |
| 6584 } } // namespace v8::internal | 6590 } } // namespace v8::internal |
| 6585 | 6591 |
| 6586 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6592 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |