Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: src/hydrogen-instructions.h

Issue 425943002: Inline Math.fround in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm64 port Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 2599
2600 virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT 2600 virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT
2601 2601
2602 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 2602 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
2603 if (index == 0) { 2603 if (index == 0) {
2604 return Representation::Tagged(); 2604 return Representation::Tagged();
2605 } else { 2605 } else {
2606 switch (op_) { 2606 switch (op_) {
2607 case kMathFloor: 2607 case kMathFloor:
2608 case kMathRound: 2608 case kMathRound:
2609 case kMathFround:
2609 case kMathSqrt: 2610 case kMathSqrt:
2610 case kMathPowHalf: 2611 case kMathPowHalf:
2611 case kMathLog: 2612 case kMathLog:
2612 case kMathExp: 2613 case kMathExp:
2613 return Representation::Double(); 2614 return Representation::Double();
2614 case kMathAbs: 2615 case kMathAbs:
2615 return representation(); 2616 return representation();
2616 case kMathClz32: 2617 case kMathClz32:
2617 return Representation::Integer32(); 2618 return Representation::Integer32();
2618 default: 2619 default:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2665 case kMathClz32: 2666 case kMathClz32:
2666 set_representation(Representation::Integer32()); 2667 set_representation(Representation::Integer32());
2667 break; 2668 break;
2668 case kMathAbs: 2669 case kMathAbs:
2669 // Not setting representation here: it is None intentionally. 2670 // Not setting representation here: it is None intentionally.
2670 SetFlag(kFlexibleRepresentation); 2671 SetFlag(kFlexibleRepresentation);
2671 // TODO(svenpanne) This flag is actually only needed if representation() 2672 // TODO(svenpanne) This flag is actually only needed if representation()
2672 // is tagged, and not when it is an unboxed double or unboxed integer. 2673 // is tagged, and not when it is an unboxed double or unboxed integer.
2673 SetChangesFlag(kNewSpacePromotion); 2674 SetChangesFlag(kNewSpacePromotion);
2674 break; 2675 break;
2676 case kMathFround:
2675 case kMathLog: 2677 case kMathLog:
2676 case kMathExp: 2678 case kMathExp:
2677 case kMathSqrt: 2679 case kMathSqrt:
2678 case kMathPowHalf: 2680 case kMathPowHalf:
2679 set_representation(Representation::Double()); 2681 set_representation(Representation::Double());
2680 break; 2682 break;
2681 default: 2683 default:
2682 UNREACHABLE(); 2684 UNREACHABLE();
2683 } 2685 }
2684 SetFlag(kUseGVN); 2686 SetFlag(kUseGVN);
(...skipping 5170 matching lines...) Expand 10 before | Expand all | Expand 10 after
7855 }; 7857 };
7856 7858
7857 7859
7858 7860
7859 #undef DECLARE_INSTRUCTION 7861 #undef DECLARE_INSTRUCTION
7860 #undef DECLARE_CONCRETE_INSTRUCTION 7862 #undef DECLARE_CONCRETE_INSTRUCTION
7861 7863
7862 } } // namespace v8::internal 7864 } } // namespace v8::internal
7863 7865
7864 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7866 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698