Chromium Code Reviews| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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) \ | 79 V(LoadICTrampoline) \ |
| 80 V(MegamorphicLoad) \ | |
| 80 V(VectorLoad) \ | 81 V(VectorLoad) \ |
| 81 V(KeyedLoadICTrampoline) \ | 82 V(KeyedLoadICTrampoline) \ |
| 82 V(VectorKeyedLoad) \ | 83 V(VectorKeyedLoad) \ |
| 83 /* IC Handler stubs */ \ | 84 /* IC Handler stubs */ \ |
| 84 V(LoadField) \ | 85 V(LoadField) \ |
| 85 V(StoreField) \ | 86 V(StoreField) \ |
| 86 V(LoadConstant) \ | 87 V(LoadConstant) \ |
| 87 V(StringLength) | 88 V(StringLength) |
| 88 | 89 |
| 89 // List of code stubs only used on ARM 32 bits platforms. | 90 // List of code stubs only used on ARM 32 bits platforms. |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1954 | 1955 |
| 1955 virtual Major MajorKey() const OVERRIDE { return KeyedLoadICTrampoline; } | 1956 virtual Major MajorKey() const OVERRIDE { return KeyedLoadICTrampoline; } |
| 1956 | 1957 |
| 1957 private: | 1958 private: |
| 1958 virtual void Generate(MacroAssembler* masm); | 1959 virtual void Generate(MacroAssembler* masm); |
| 1959 | 1960 |
| 1960 DISALLOW_COPY_AND_ASSIGN(KeyedLoadICTrampolineStub); | 1961 DISALLOW_COPY_AND_ASSIGN(KeyedLoadICTrampolineStub); |
| 1961 }; | 1962 }; |
| 1962 | 1963 |
| 1963 | 1964 |
| 1965 class MegamorphicLoadStub : public HydrogenCodeStub { | |
| 1966 public: | |
| 1967 MegamorphicLoadStub(Isolate* isolate, const LoadIC::State& state) | |
| 1968 : HydrogenCodeStub(isolate) { | |
| 1969 set_sub_minor_key(state.GetExtraICState()); | |
| 1970 } | |
| 1971 | |
| 1972 virtual Handle<Code> GenerateCode() OVERRIDE; | |
| 1973 | |
| 1974 virtual void InitializeInterfaceDescriptor( | |
| 1975 CodeStubInterfaceDescriptor* descriptor) OVERRIDE; | |
| 1976 | |
| 1977 static void InstallDescriptors(Isolate* isolate); | |
| 1978 | |
| 1979 virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; } | |
| 1980 | |
| 1981 virtual InlineCacheState GetICState() const FINAL OVERRIDE { | |
| 1982 return MEGAMORPHIC; | |
| 1983 } | |
| 1984 | |
| 1985 virtual ExtraICState GetExtraICState() const FINAL OVERRIDE { | |
| 1986 return static_cast<ExtraICState>(sub_minor_key()); | |
| 1987 } | |
| 1988 | |
| 1989 private: | |
| 1990 virtual Major MajorKey() const OVERRIDE { return MegamorphicLoad; } | |
|
Yang
2014/09/08 08:43:00
Please rebase this CL and use the new DEFINE_HYDRO
mvstanton
2014/09/08 12:35:20
Done.
| |
| 1991 | |
| 1992 DISALLOW_COPY_AND_ASSIGN(MegamorphicLoadStub); | |
| 1993 }; | |
| 1994 | |
| 1995 | |
| 1964 class VectorLoadStub : public HydrogenCodeStub { | 1996 class VectorLoadStub : public HydrogenCodeStub { |
| 1965 public: | 1997 public: |
| 1966 explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state) | 1998 explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state) |
| 1967 : HydrogenCodeStub(isolate) { | 1999 : HydrogenCodeStub(isolate) { |
| 1968 set_sub_minor_key(state.GetExtraICState()); | 2000 set_sub_minor_key(state.GetExtraICState()); |
| 1969 } | 2001 } |
| 1970 | 2002 |
| 1971 virtual Handle<Code> GenerateCode() OVERRIDE; | 2003 virtual Handle<Code> GenerateCode() OVERRIDE; |
| 1972 | 2004 |
| 1973 virtual void InitializeInterfaceDescriptor( | 2005 virtual void InitializeInterfaceDescriptor( |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2670 private: | 2702 private: |
| 2671 virtual Major MajorKey() const { return StringCompare; } | 2703 virtual Major MajorKey() const { return StringCompare; } |
| 2672 | 2704 |
| 2673 virtual void Generate(MacroAssembler* masm); | 2705 virtual void Generate(MacroAssembler* masm); |
| 2674 | 2706 |
| 2675 DISALLOW_COPY_AND_ASSIGN(StringCompareStub); | 2707 DISALLOW_COPY_AND_ASSIGN(StringCompareStub); |
| 2676 }; | 2708 }; |
| 2677 } } // namespace v8::internal | 2709 } } // namespace v8::internal |
| 2678 | 2710 |
| 2679 #endif // V8_CODE_STUBS_H_ | 2711 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |