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

Side by Side Diff: src/hydrogen.h

Issue 324093002: ARM/ARM64: Optimise HLoadNamedField and HStoreNamedField. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Upload the correct patch (minor diff in hydrogen.h) Created 6 years, 6 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 // 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_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 1901
1902 1902
1903 template<> 1903 template<>
1904 inline HInstruction* HGraphBuilder::AddUncasted<HDeoptimize>( 1904 inline HInstruction* HGraphBuilder::AddUncasted<HDeoptimize>(
1905 const char* reason, Deoptimizer::BailoutType type) { 1905 const char* reason, Deoptimizer::BailoutType type) {
1906 return Add<HDeoptimize>(reason, type); 1906 return Add<HDeoptimize>(reason, type);
1907 } 1907 }
1908 1908
1909 1909
1910 template<> 1910 template<>
1911 inline HLoadNamedField*
1912 HGraphBuilder::Add<HLoadNamedField, HValue*, HValue*, HObjectAccess>(
1913 HValue* object, HValue* dependency, HObjectAccess access) {
1914 HLoadNamedField* object_properties = NULL;
1915 if (HLoadNamedField::PreferExtractLoadPropertiesPointer() &&
1916 HLoadNamedField::NeedsPropertiesPointer(access)) {
1917 object_properties = Add<HLoadNamedField>(
1918 object, dependency, HObjectAccess::ForPropertiesPointer());
1919 }
1920 return AddInstructionTyped(New<HLoadNamedField>(
1921 object, dependency, access, object_properties));
1922 }
1923
1924
1925 template<>
1926 inline HLoadNamedField*
1927 HGraphBuilder::Add<HLoadNamedField, HValue*, HValue*,
1928 HObjectAccess, const UniqueSet<Map>*, HType>(
1929 HValue* object, HValue* dependency, HObjectAccess access,
1930 const UniqueSet<Map>* maps, HType type) {
1931 HLoadNamedField* object_properties = NULL;
1932 if (HLoadNamedField::PreferExtractLoadPropertiesPointer() &&
1933 HLoadNamedField::NeedsPropertiesPointer(access)) {
1934 object_properties = Add<HLoadNamedField>(
1935 object, dependency, HObjectAccess::ForPropertiesPointer());
1936 }
1937 return AddInstructionTyped(New<HLoadNamedField>(
1938 object, dependency, access, maps, type, object_properties));
1939 }
1940
1941
1942 template<>
1911 inline HSimulate* HGraphBuilder::Add<HSimulate>( 1943 inline HSimulate* HGraphBuilder::Add<HSimulate>(
1912 BailoutId id, 1944 BailoutId id,
1913 RemovableSimulate removable) { 1945 RemovableSimulate removable) {
1914 HSimulate* instr = current_block()->CreateSimulate(id, removable); 1946 HSimulate* instr = current_block()->CreateSimulate(id, removable);
1915 AddInstruction(instr); 1947 AddInstruction(instr);
1916 return instr; 1948 return instr;
1917 } 1949 }
1918 1950
1919 1951
1920 template<> 1952 template<>
1921 inline HSimulate* HGraphBuilder::Add<HSimulate>( 1953 inline HSimulate* HGraphBuilder::Add<HSimulate>(
1922 BailoutId id) { 1954 BailoutId id) {
1923 return Add<HSimulate>(id, FIXED_SIMULATE); 1955 return Add<HSimulate>(id, FIXED_SIMULATE);
1924 } 1956 }
1925 1957
1926 1958
1927 template<> 1959 template<>
1928 inline HInstruction* HGraphBuilder::AddUncasted<HSimulate>(BailoutId id) { 1960 inline HInstruction* HGraphBuilder::AddUncasted<HSimulate>(BailoutId id) {
1929 return Add<HSimulate>(id, FIXED_SIMULATE); 1961 return Add<HSimulate>(id, FIXED_SIMULATE);
1930 } 1962 }
1931 1963
1932 1964
1933 template<> 1965 template<>
1966 inline HStoreNamedField*
1967 HGraphBuilder::Add<HStoreNamedField, HValue*, HObjectAccess,
1968 HValue*, StoreFieldOrKeyedMode, HValue*>(
1969 HValue* obj, HObjectAccess access, HValue* val,
1970 StoreFieldOrKeyedMode store_mode, HValue* obj_properties) {
1971 HLoadNamedField* object_properties = NULL;
1972 if (HStoreNamedField::PreferExtractLoadPropertiesPointer() &&
1973 HStoreNamedField::NeedsPropertiesPointer(access)) {
1974 object_properties = Add<HLoadNamedField>(
1975 obj, reinterpret_cast<HValue*>(NULL),
1976 HObjectAccess::ForPropertiesPointer());
1977 }
1978 return AddInstructionTyped(New<HStoreNamedField>(
1979 obj, access, val, store_mode, object_properties));
1980 }
1981
1982
1983 template<>
1934 inline HReturn* HGraphBuilder::Add<HReturn>(HValue* value) { 1984 inline HReturn* HGraphBuilder::Add<HReturn>(HValue* value) {
1935 int num_parameters = graph()->info()->num_parameters(); 1985 int num_parameters = graph()->info()->num_parameters();
1936 HValue* params = AddUncasted<HConstant>(num_parameters); 1986 HValue* params = AddUncasted<HConstant>(num_parameters);
1937 HReturn* return_instruction = New<HReturn>(value, params); 1987 HReturn* return_instruction = New<HReturn>(value, params);
1938 FinishExitCurrentBlock(return_instruction); 1988 FinishExitCurrentBlock(return_instruction);
1939 return return_instruction; 1989 return return_instruction;
1940 } 1990 }
1941 1991
1942 1992
1943 template<> 1993 template<>
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
2839 } 2889 }
2840 2890
2841 private: 2891 private:
2842 HGraphBuilder* builder_; 2892 HGraphBuilder* builder_;
2843 }; 2893 };
2844 2894
2845 2895
2846 } } // namespace v8::internal 2896 } } // namespace v8::internal
2847 2897
2848 #endif // V8_HYDROGEN_H_ 2898 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698