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

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

Issue 10824079: Use a special EnumLength field to indicate number of valid enum cache values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 3 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/ia32/full-codegen-ia32.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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 V(LoadFunctionPrototype) \ 132 V(LoadFunctionPrototype) \
133 V(LoadGlobalCell) \ 133 V(LoadGlobalCell) \
134 V(LoadGlobalGeneric) \ 134 V(LoadGlobalGeneric) \
135 V(LoadKeyedFastDoubleElement) \ 135 V(LoadKeyedFastDoubleElement) \
136 V(LoadKeyedFastElement) \ 136 V(LoadKeyedFastElement) \
137 V(LoadKeyedGeneric) \ 137 V(LoadKeyedGeneric) \
138 V(LoadKeyedSpecializedArrayElement) \ 138 V(LoadKeyedSpecializedArrayElement) \
139 V(LoadNamedField) \ 139 V(LoadNamedField) \
140 V(LoadNamedFieldPolymorphic) \ 140 V(LoadNamedFieldPolymorphic) \
141 V(LoadNamedGeneric) \ 141 V(LoadNamedGeneric) \
142 V(MapEnumLength) \
142 V(MathFloorOfDiv) \ 143 V(MathFloorOfDiv) \
143 V(MathMinMax) \ 144 V(MathMinMax) \
144 V(Mod) \ 145 V(Mod) \
145 V(Mul) \ 146 V(Mul) \
146 V(ObjectLiteral) \ 147 V(ObjectLiteral) \
147 V(OsrEntry) \ 148 V(OsrEntry) \
148 V(OuterContext) \ 149 V(OuterContext) \
149 V(Parameter) \ 150 V(Parameter) \
150 V(Power) \ 151 V(Power) \
151 V(PushArgument) \ 152 V(PushArgument) \
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 return Representation::Tagged(); 1917 return Representation::Tagged();
1917 } 1918 }
1918 1919
1919 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength) 1920 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength)
1920 1921
1921 protected: 1922 protected:
1922 virtual bool DataEquals(HValue* other) { return true; } 1923 virtual bool DataEquals(HValue* other) { return true; }
1923 }; 1924 };
1924 1925
1925 1926
1927 class HMapEnumLength: public HUnaryOperation {
1928 public:
1929 explicit HMapEnumLength(HValue* value) : HUnaryOperation(value) {
1930 set_type(HType::Smi());
1931 set_representation(Representation::Tagged());
1932 SetFlag(kUseGVN);
1933 SetGVNFlag(kDependsOnMaps);
1934 }
1935
1936 virtual Representation RequiredInputRepresentation(int index) {
1937 return Representation::Tagged();
1938 }
1939
1940 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength)
1941
1942 protected:
1943 virtual bool DataEquals(HValue* other) { return true; }
1944 };
1945
1946
1926 class HElementsKind: public HUnaryOperation { 1947 class HElementsKind: public HUnaryOperation {
1927 public: 1948 public:
1928 explicit HElementsKind(HValue* value) : HUnaryOperation(value) { 1949 explicit HElementsKind(HValue* value) : HUnaryOperation(value) {
1929 set_representation(Representation::Integer32()); 1950 set_representation(Representation::Integer32());
1930 SetFlag(kUseGVN); 1951 SetFlag(kUseGVN);
1931 SetGVNFlag(kDependsOnElementsKind); 1952 SetGVNFlag(kDependsOnElementsKind);
1932 } 1953 }
1933 1954
1934 virtual Representation RequiredInputRepresentation(int index) { 1955 virtual Representation RequiredInputRepresentation(int index) {
1935 return Representation::Tagged(); 1956 return Representation::Tagged();
(...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after
5259 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 5280 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
5260 }; 5281 };
5261 5282
5262 5283
5263 #undef DECLARE_INSTRUCTION 5284 #undef DECLARE_INSTRUCTION
5264 #undef DECLARE_CONCRETE_INSTRUCTION 5285 #undef DECLARE_CONCRETE_INSTRUCTION
5265 5286
5266 } } // namespace v8::internal 5287 } } // namespace v8::internal
5267 5288
5268 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5289 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698