OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 type_ = type; | 581 type_ = type; |
582 } | 582 } |
583 | 583 |
584 // An operation needs to override this function iff: | 584 // An operation needs to override this function iff: |
585 // 1) it can produce an int32 output. | 585 // 1) it can produce an int32 output. |
586 // 2) the true value of its output can potentially be minus zero. | 586 // 2) the true value of its output can potentially be minus zero. |
587 // The implementation must set a flag so that it bails out in the case where | 587 // The implementation must set a flag so that it bails out in the case where |
588 // it would otherwise output what should be a minus zero as an int32 zero. | 588 // it would otherwise output what should be a minus zero as an int32 zero. |
589 // If the operation also exists in a form that takes int32 and outputs int32 | 589 // If the operation also exists in a form that takes int32 and outputs int32 |
590 // then the operation should return its input value so that we can propagate | 590 // then the operation should return its input value so that we can propagate |
591 // back. There are two operations that need to propagate back to more than | 591 // back. There are three operations that need to propagate back to more than |
592 // one input. They are phi and binary add. They always return NULL and | 592 // one input. They are phi and binary div and mul. They always return NULL |
593 // expect the caller to take care of things. | 593 // and expect the caller to take care of things. |
594 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited) { | 594 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited) { |
595 visited->Add(id()); | 595 visited->Add(id()); |
596 return NULL; | 596 return NULL; |
597 } | 597 } |
598 | 598 |
599 bool IsDefinedAfter(HBasicBlock* other) const; | 599 bool IsDefinedAfter(HBasicBlock* other) const; |
600 | 600 |
601 // Operands. | 601 // Operands. |
602 virtual int OperandCount() = 0; | 602 virtual int OperandCount() = 0; |
603 virtual HValue* OperandAt(int index) = 0; | 603 virtual HValue* OperandAt(int index) = 0; |
(...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4146 | 4146 |
4147 DECLARE_CONCRETE_INSTRUCTION(In) | 4147 DECLARE_CONCRETE_INSTRUCTION(In) |
4148 }; | 4148 }; |
4149 | 4149 |
4150 #undef DECLARE_INSTRUCTION | 4150 #undef DECLARE_INSTRUCTION |
4151 #undef DECLARE_CONCRETE_INSTRUCTION | 4151 #undef DECLARE_CONCRETE_INSTRUCTION |
4152 | 4152 |
4153 } } // namespace v8::internal | 4153 } } // namespace v8::internal |
4154 | 4154 |
4155 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4155 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |