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 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2596 } | 2596 } |
2597 | 2597 |
2598 private: | 2598 private: |
2599 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) | 2599 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) |
2600 : op_(op) { | 2600 : op_(op) { |
2601 SetOperandAt(0, context); | 2601 SetOperandAt(0, context); |
2602 SetOperandAt(1, value); | 2602 SetOperandAt(1, value); |
2603 switch (op) { | 2603 switch (op) { |
2604 case kMathFloor: | 2604 case kMathFloor: |
2605 case kMathRound: | 2605 case kMathRound: |
2606 case kMathCeil: | |
2607 set_representation(Representation::Integer32()); | 2606 set_representation(Representation::Integer32()); |
2608 break; | 2607 break; |
2609 case kMathAbs: | 2608 case kMathAbs: |
2610 // Not setting representation here: it is None intentionally. | 2609 // Not setting representation here: it is None intentionally. |
2611 SetFlag(kFlexibleRepresentation); | 2610 SetFlag(kFlexibleRepresentation); |
2612 // TODO(svenpanne) This flag is actually only needed if representation() | 2611 // TODO(svenpanne) This flag is actually only needed if representation() |
2613 // is tagged, and not when it is an unboxed double or unboxed integer. | 2612 // is tagged, and not when it is an unboxed double or unboxed integer. |
2614 SetGVNFlag(kChangesNewSpacePromotion); | 2613 SetGVNFlag(kChangesNewSpacePromotion); |
2615 break; | 2614 break; |
2616 case kMathLog: | 2615 case kMathLog: |
(...skipping 3934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6551 virtual bool IsDeletable() const { return true; } | 6550 virtual bool IsDeletable() const { return true; } |
6552 }; | 6551 }; |
6553 | 6552 |
6554 | 6553 |
6555 #undef DECLARE_INSTRUCTION | 6554 #undef DECLARE_INSTRUCTION |
6556 #undef DECLARE_CONCRETE_INSTRUCTION | 6555 #undef DECLARE_CONCRETE_INSTRUCTION |
6557 | 6556 |
6558 } } // namespace v8::internal | 6557 } } // namespace v8::internal |
6559 | 6558 |
6560 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6559 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |