OLD | NEW |
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_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 V(ElementsTransitionAndStore) \ | 69 V(ElementsTransitionAndStore) \ |
70 V(TransitionElementsKind) \ | 70 V(TransitionElementsKind) \ |
71 V(StoreArrayLiteralElement) \ | 71 V(StoreArrayLiteralElement) \ |
72 V(StubFailureTrampoline) \ | 72 V(StubFailureTrampoline) \ |
73 V(ArrayConstructor) \ | 73 V(ArrayConstructor) \ |
74 V(InternalArrayConstructor) \ | 74 V(InternalArrayConstructor) \ |
75 V(ProfileEntryHook) \ | 75 V(ProfileEntryHook) \ |
76 V(StoreGlobal) \ | 76 V(StoreGlobal) \ |
77 V(CallApiFunction) \ | 77 V(CallApiFunction) \ |
78 V(CallApiGetter) \ | 78 V(CallApiGetter) \ |
| 79 V(LoadICTrampoline) \ |
| 80 V(VectorLoad) \ |
| 81 V(KeyedLoadICTrampoline) \ |
| 82 V(VectorKeyedLoad) \ |
79 /* IC Handler stubs */ \ | 83 /* IC Handler stubs */ \ |
80 V(LoadField) \ | 84 V(LoadField) \ |
81 V(StoreField) \ | 85 V(StoreField) \ |
82 V(LoadConstant) \ | 86 V(LoadConstant) \ |
83 V(StringLength) | 87 V(StringLength) |
84 | 88 |
85 // List of code stubs only used on ARM 32 bits platforms. | 89 // List of code stubs only used on ARM 32 bits platforms. |
86 #if V8_TARGET_ARCH_ARM | 90 #if V8_TARGET_ARCH_ARM |
87 #define CODE_STUB_LIST_ARM(V) \ | 91 #define CODE_STUB_LIST_ARM(V) \ |
88 V(GetProperty) \ | 92 V(GetProperty) \ |
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1889 virtual InlineCacheState GetICState() const { return GENERIC; } | 1893 virtual InlineCacheState GetICState() const { return GENERIC; } |
1890 | 1894 |
1891 private: | 1895 private: |
1892 Major MajorKey() const { return KeyedLoadGeneric; } | 1896 Major MajorKey() const { return KeyedLoadGeneric; } |
1893 int NotMissMinorKey() const { return 0; } | 1897 int NotMissMinorKey() const { return 0; } |
1894 | 1898 |
1895 DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericStub); | 1899 DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericStub); |
1896 }; | 1900 }; |
1897 | 1901 |
1898 | 1902 |
| 1903 class LoadICTrampolineStub : public PlatformCodeStub { |
| 1904 public: |
| 1905 LoadICTrampolineStub(Isolate* isolate, const LoadIC::State& state) |
| 1906 : PlatformCodeStub(isolate), state_(state) {} |
| 1907 |
| 1908 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; } |
| 1909 |
| 1910 virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE { |
| 1911 return GENERIC; |
| 1912 } |
| 1913 |
| 1914 virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE { |
| 1915 return state_.GetExtraICState(); |
| 1916 } |
| 1917 |
| 1918 private: |
| 1919 Major MajorKey() const { return LoadICTrampoline; } |
| 1920 uint32_t MinorKey() const { return GetExtraICState(); } |
| 1921 |
| 1922 void Generate(MacroAssembler* masm); |
| 1923 |
| 1924 const LoadIC::State state_; |
| 1925 |
| 1926 DISALLOW_COPY_AND_ASSIGN(LoadICTrampolineStub); |
| 1927 }; |
| 1928 |
| 1929 |
| 1930 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { |
| 1931 public: |
| 1932 explicit KeyedLoadICTrampolineStub(Isolate* isolate) |
| 1933 : LoadICTrampolineStub(isolate, LoadIC::State(0)) {} |
| 1934 |
| 1935 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { |
| 1936 return Code::KEYED_LOAD_IC; |
| 1937 } |
| 1938 |
| 1939 private: |
| 1940 Major MajorKey() const { return KeyedLoadICTrampoline; } |
| 1941 |
| 1942 DISALLOW_COPY_AND_ASSIGN(KeyedLoadICTrampolineStub); |
| 1943 }; |
| 1944 |
| 1945 |
| 1946 class VectorLoadStub : public HydrogenCodeStub { |
| 1947 public: |
| 1948 explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state) |
| 1949 : HydrogenCodeStub(isolate), state_(state) {} |
| 1950 |
| 1951 virtual Handle<Code> GenerateCode() V8_OVERRIDE; |
| 1952 |
| 1953 virtual void InitializeInterfaceDescriptor( |
| 1954 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; |
| 1955 |
| 1956 static void InstallDescriptors(Isolate* isolate); |
| 1957 |
| 1958 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; } |
| 1959 |
| 1960 virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE { |
| 1961 return GENERIC; |
| 1962 } |
| 1963 |
| 1964 virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE { |
| 1965 return state_.GetExtraICState(); |
| 1966 } |
| 1967 |
| 1968 private: |
| 1969 Major MajorKey() const { return VectorLoad; } |
| 1970 int NotMissMinorKey() const { return state_.GetExtraICState(); } |
| 1971 |
| 1972 const LoadIC::State state_; |
| 1973 |
| 1974 DISALLOW_COPY_AND_ASSIGN(VectorLoadStub); |
| 1975 }; |
| 1976 |
| 1977 |
| 1978 class VectorKeyedLoadStub : public VectorLoadStub { |
| 1979 public: |
| 1980 explicit VectorKeyedLoadStub(Isolate* isolate) |
| 1981 : VectorLoadStub(isolate, LoadIC::State(0)) {} |
| 1982 |
| 1983 virtual Handle<Code> GenerateCode() V8_OVERRIDE; |
| 1984 |
| 1985 virtual void InitializeInterfaceDescriptor( |
| 1986 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; |
| 1987 |
| 1988 static void InstallDescriptors(Isolate* isolate); |
| 1989 |
| 1990 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { |
| 1991 return Code::KEYED_LOAD_IC; |
| 1992 } |
| 1993 |
| 1994 private: |
| 1995 Major MajorKey() const { return VectorKeyedLoad; } |
| 1996 |
| 1997 DISALLOW_COPY_AND_ASSIGN(VectorKeyedLoadStub); |
| 1998 }; |
| 1999 |
| 2000 |
1899 class DoubleToIStub : public PlatformCodeStub { | 2001 class DoubleToIStub : public PlatformCodeStub { |
1900 public: | 2002 public: |
1901 DoubleToIStub(Isolate* isolate, | 2003 DoubleToIStub(Isolate* isolate, |
1902 Register source, | 2004 Register source, |
1903 Register destination, | 2005 Register destination, |
1904 int offset, | 2006 int offset, |
1905 bool is_truncating, | 2007 bool is_truncating, |
1906 bool skip_fastpath = false) | 2008 bool skip_fastpath = false) |
1907 : PlatformCodeStub(isolate), bit_field_(0) { | 2009 : PlatformCodeStub(isolate), bit_field_(0) { |
1908 bit_field_ = SourceRegisterBits::encode(source.code()) | | 2010 bit_field_ = SourceRegisterBits::encode(source.code()) | |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 | 2642 |
2541 | 2643 |
2542 class CallDescriptors { | 2644 class CallDescriptors { |
2543 public: | 2645 public: |
2544 static void InitializeForIsolate(Isolate* isolate); | 2646 static void InitializeForIsolate(Isolate* isolate); |
2545 }; | 2647 }; |
2546 | 2648 |
2547 } } // namespace v8::internal | 2649 } } // namespace v8::internal |
2548 | 2650 |
2549 #endif // V8_CODE_STUBS_H_ | 2651 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |