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

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: u Created 8 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 V(Constant) \ 99 V(Constant) \
100 V(Context) \ 100 V(Context) \
101 V(DeclareGlobals) \ 101 V(DeclareGlobals) \
102 V(DeleteProperty) \ 102 V(DeleteProperty) \
103 V(Deoptimize) \ 103 V(Deoptimize) \
104 V(Div) \ 104 V(Div) \
105 V(ElementsKind) \ 105 V(ElementsKind) \
106 V(EnterInlined) \ 106 V(EnterInlined) \
107 V(FastLiteral) \ 107 V(FastLiteral) \
108 V(FixedArrayBaseLength) \ 108 V(FixedArrayBaseLength) \
109 V(MapEnumLength) \
Michael Starzinger 2012/08/06 15:06:22 Alpha-sort!
Toon Verwaest 2012/08/07 10:49:47 Done.
109 V(ForceRepresentation) \ 110 V(ForceRepresentation) \
110 V(FunctionLiteral) \ 111 V(FunctionLiteral) \
111 V(GetCachedArrayIndex) \ 112 V(GetCachedArrayIndex) \
112 V(GlobalObject) \ 113 V(GlobalObject) \
113 V(GlobalReceiver) \ 114 V(GlobalReceiver) \
114 V(Goto) \ 115 V(Goto) \
115 V(HasCachedArrayIndexAndBranch) \ 116 V(HasCachedArrayIndexAndBranch) \
116 V(HasInstanceTypeAndBranch) \ 117 V(HasInstanceTypeAndBranch) \
117 V(In) \ 118 V(In) \
118 V(InstanceOf) \ 119 V(InstanceOf) \
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 return Representation::Tagged(); 1899 return Representation::Tagged();
1899 } 1900 }
1900 1901
1901 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength) 1902 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength)
1902 1903
1903 protected: 1904 protected:
1904 virtual bool DataEquals(HValue* other) { return true; } 1905 virtual bool DataEquals(HValue* other) { return true; }
1905 }; 1906 };
1906 1907
1907 1908
1909 class HMapEnumLength: public HUnaryOperation {
1910 public:
1911 explicit HMapEnumLength(HValue* value) : HUnaryOperation(value) {
1912 set_type(HType::Smi());
1913 set_representation(Representation::Tagged());
1914 SetFlag(kUseGVN);
1915 SetGVNFlag(kDependsOnMaps);
1916 }
1917
1918 virtual Representation RequiredInputRepresentation(int index) {
1919 return Representation::Tagged();
1920 }
1921
1922 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength)
1923
1924 protected:
1925 virtual bool DataEquals(HValue* other) { return true; }
1926 };
1927
1928
1908 class HElementsKind: public HUnaryOperation { 1929 class HElementsKind: public HUnaryOperation {
1909 public: 1930 public:
1910 explicit HElementsKind(HValue* value) : HUnaryOperation(value) { 1931 explicit HElementsKind(HValue* value) : HUnaryOperation(value) {
1911 set_representation(Representation::Integer32()); 1932 set_representation(Representation::Integer32());
1912 SetFlag(kUseGVN); 1933 SetFlag(kUseGVN);
1913 SetGVNFlag(kDependsOnElementsKind); 1934 SetGVNFlag(kDependsOnElementsKind);
1914 } 1935 }
1915 1936
1916 virtual Representation RequiredInputRepresentation(int index) { 1937 virtual Representation RequiredInputRepresentation(int index) {
1917 return Representation::Tagged(); 1938 return Representation::Tagged();
(...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after
5184 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 5205 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
5185 }; 5206 };
5186 5207
5187 5208
5188 #undef DECLARE_INSTRUCTION 5209 #undef DECLARE_INSTRUCTION
5189 #undef DECLARE_CONCRETE_INSTRUCTION 5210 #undef DECLARE_CONCRETE_INSTRUCTION
5190 5211
5191 } } // namespace v8::internal 5212 } } // namespace v8::internal
5192 5213
5193 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5214 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698