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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 kFlexibleRepresentation, | 535 kFlexibleRepresentation, |
536 // Participate in Global Value Numbering, i.e. elimination of | 536 // Participate in Global Value Numbering, i.e. elimination of |
537 // unnecessary recomputations. If an instruction sets this flag, it must | 537 // unnecessary recomputations. If an instruction sets this flag, it must |
538 // implement DataEquals(), which will be used to determine if other | 538 // implement DataEquals(), which will be used to determine if other |
539 // occurrences of the instruction are indeed the same. | 539 // occurrences of the instruction are indeed the same. |
540 kUseGVN, | 540 kUseGVN, |
541 // Track instructions that are dominating side effects. If an instruction | 541 // Track instructions that are dominating side effects. If an instruction |
542 // sets this flag, it must implement SetSideEffectDominator() and should | 542 // sets this flag, it must implement SetSideEffectDominator() and should |
543 // indicate which side effects to track by setting GVN flags. | 543 // indicate which side effects to track by setting GVN flags. |
544 kTrackSideEffectDominators, | 544 kTrackSideEffectDominators, |
| 545 // This flag must be set if a phase before range analysis adds range |
| 546 // information, so that range analysis can still assert that it cannot |
| 547 // be run twice on any HValue. |
| 548 kHasPreinitializedRange, |
545 kCanOverflow, | 549 kCanOverflow, |
546 kBailoutOnMinusZero, | 550 kBailoutOnMinusZero, |
547 kCanBeDivByZero, | 551 kCanBeDivByZero, |
548 kDeoptimizeOnUndefined, | 552 kDeoptimizeOnUndefined, |
549 kIsArguments, | 553 kIsArguments, |
550 kTruncatingToInt32, | 554 kTruncatingToInt32, |
551 kIsDead, | 555 kIsDead, |
552 kLastFlag = kIsDead | 556 kLastFlag = kIsDead |
553 }; | 557 }; |
554 | 558 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 result.Intersect(AllChangesFlagSet()); | 709 result.Intersect(AllChangesFlagSet()); |
706 result.Intersect(AllObservableSideEffectsFlagSet()); | 710 result.Intersect(AllObservableSideEffectsFlagSet()); |
707 return result; | 711 return result; |
708 } | 712 } |
709 | 713 |
710 Range* range() const { return range_; } | 714 Range* range() const { return range_; } |
711 bool HasRange() const { return range_ != NULL; } | 715 bool HasRange() const { return range_ != NULL; } |
712 void AddNewRange(Range* r, Zone* zone); | 716 void AddNewRange(Range* r, Zone* zone); |
713 void RemoveLastAddedRange(); | 717 void RemoveLastAddedRange(); |
714 void ComputeInitialRange(Zone* zone); | 718 void ComputeInitialRange(Zone* zone); |
| 719 void PreinitializeRange(Zone* zone); |
715 | 720 |
716 // Representation helpers. | 721 // Representation helpers. |
717 virtual Representation RequiredInputRepresentation(int index) = 0; | 722 virtual Representation RequiredInputRepresentation(int index) = 0; |
718 | 723 |
719 virtual Representation InferredRepresentation() { | 724 virtual Representation InferredRepresentation() { |
720 return representation(); | 725 return representation(); |
721 } | 726 } |
722 | 727 |
723 // This gives the instruction an opportunity to replace itself with an | 728 // This gives the instruction an opportunity to replace itself with an |
724 // instruction that does the same in some better way. To replace an | 729 // instruction that does the same in some better way. To replace an |
(...skipping 4234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4959 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 4964 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
4960 }; | 4965 }; |
4961 | 4966 |
4962 | 4967 |
4963 #undef DECLARE_INSTRUCTION | 4968 #undef DECLARE_INSTRUCTION |
4964 #undef DECLARE_CONCRETE_INSTRUCTION | 4969 #undef DECLARE_CONCRETE_INSTRUCTION |
4965 | 4970 |
4966 } } // namespace v8::internal | 4971 } } // namespace v8::internal |
4967 | 4972 |
4968 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4973 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |