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

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

Issue 10190007: Revert r11420 because Win32 compilation was broken. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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/frames.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 // 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 V(LoadFunctionPrototype) \ 133 V(LoadFunctionPrototype) \
134 V(LoadGlobalCell) \ 134 V(LoadGlobalCell) \
135 V(LoadGlobalGeneric) \ 135 V(LoadGlobalGeneric) \
136 V(LoadKeyedFastDoubleElement) \ 136 V(LoadKeyedFastDoubleElement) \
137 V(LoadKeyedFastElement) \ 137 V(LoadKeyedFastElement) \
138 V(LoadKeyedGeneric) \ 138 V(LoadKeyedGeneric) \
139 V(LoadKeyedSpecializedArrayElement) \ 139 V(LoadKeyedSpecializedArrayElement) \
140 V(LoadNamedField) \ 140 V(LoadNamedField) \
141 V(LoadNamedFieldPolymorphic) \ 141 V(LoadNamedFieldPolymorphic) \
142 V(LoadNamedGeneric) \ 142 V(LoadNamedGeneric) \
143 V(MathFloorOfDiv) \
144 V(Mod) \ 143 V(Mod) \
145 V(Mul) \ 144 V(Mul) \
146 V(ObjectLiteral) \ 145 V(ObjectLiteral) \
147 V(OsrEntry) \ 146 V(OsrEntry) \
148 V(OuterContext) \ 147 V(OuterContext) \
149 V(Parameter) \ 148 V(Parameter) \
150 V(Power) \ 149 V(Power) \
151 V(PushArgument) \ 150 V(PushArgument) \
152 V(Random) \ 151 V(Random) \
153 V(RegExpLiteral) \ 152 V(RegExpLiteral) \
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 return Representation::Double(); 1985 return Representation::Double();
1987 case kMathAbs: 1986 case kMathAbs:
1988 return representation(); 1987 return representation();
1989 default: 1988 default:
1990 UNREACHABLE(); 1989 UNREACHABLE();
1991 return Representation::None(); 1990 return Representation::None();
1992 } 1991 }
1993 } 1992 }
1994 } 1993 }
1995 1994
1996 virtual HValue* Canonicalize(); 1995 virtual HValue* Canonicalize() {
1996 // If the input is integer32 then we replace the floor instruction
1997 // with its inputs. This happens before the representation changes are
1998 // introduced.
1999 if (op() == kMathFloor) {
2000 if (value()->representation().IsInteger32()) return value();
2001 }
2002 return this;
2003 }
1997 2004
1998 BuiltinFunctionId op() const { return op_; } 2005 BuiltinFunctionId op() const { return op_; }
1999 const char* OpName() const; 2006 const char* OpName() const;
2000 2007
2001 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation) 2008 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation)
2002 2009
2003 protected: 2010 protected:
2004 virtual bool DataEquals(HValue* other) { 2011 virtual bool DataEquals(HValue* other) {
2005 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); 2012 HUnaryMathOperation* b = HUnaryMathOperation::cast(other);
2006 return op_ == b->op(); 2013 return op_ == b->op();
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 SetFlag(kUseGVN); 2751 SetFlag(kUseGVN);
2745 } 2752 }
2746 } 2753 }
2747 2754
2748 virtual HType CalculateInferredType(); 2755 virtual HType CalculateInferredType();
2749 2756
2750 DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation) 2757 DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation)
2751 }; 2758 };
2752 2759
2753 2760
2754 class HMathFloorOfDiv: public HBinaryOperation {
2755 public:
2756 HMathFloorOfDiv(HValue* context, HValue* left, HValue* right)
2757 : HBinaryOperation(context, left, right) {
2758 set_representation(Representation::Integer32());
2759 SetFlag(kUseGVN);
2760 }
2761
2762 virtual Representation RequiredInputRepresentation(int index) {
2763 return Representation::Integer32();
2764 }
2765
2766 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv)
2767
2768 protected:
2769 virtual bool DataEquals(HValue* other) { return true; }
2770 };
2771
2772
2773 class HArithmeticBinaryOperation: public HBinaryOperation { 2761 class HArithmeticBinaryOperation: public HBinaryOperation {
2774 public: 2762 public:
2775 HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right) 2763 HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right)
2776 : HBinaryOperation(context, left, right) { 2764 : HBinaryOperation(context, left, right) {
2777 set_representation(Representation::Tagged()); 2765 set_representation(Representation::Tagged());
2778 SetFlag(kFlexibleRepresentation); 2766 SetFlag(kFlexibleRepresentation);
2779 SetAllSideEffects(); 2767 SetAllSideEffects();
2780 } 2768 }
2781 2769
2782 virtual void RepresentationChanged(Representation to) { 2770 virtual void RepresentationChanged(Representation to) {
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 4947 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
4960 }; 4948 };
4961 4949
4962 4950
4963 #undef DECLARE_INSTRUCTION 4951 #undef DECLARE_INSTRUCTION
4964 #undef DECLARE_CONCRETE_INSTRUCTION 4952 #undef DECLARE_CONCRETE_INSTRUCTION
4965 4953
4966 } } // namespace v8::internal 4954 } } // namespace v8::internal
4967 4955
4968 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4956 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698