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

Side by Side Diff: src/code-stubs.h

Issue 500423002: Minor-key-ify new LoadICTrampolineStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-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 // 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 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 Major MajorKey() const { return KeyedLoadGeneric; } 1937 Major MajorKey() const { return KeyedLoadGeneric; }
1938 int NotMissMinorKey() const { return 0; } 1938 int NotMissMinorKey() const { return 0; }
1939 1939
1940 DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericStub); 1940 DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericStub);
1941 }; 1941 };
1942 1942
1943 1943
1944 class LoadICTrampolineStub : public PlatformCodeStub { 1944 class LoadICTrampolineStub : public PlatformCodeStub {
1945 public: 1945 public:
1946 LoadICTrampolineStub(Isolate* isolate, const LoadIC::State& state) 1946 LoadICTrampolineStub(Isolate* isolate, const LoadIC::State& state)
1947 : PlatformCodeStub(isolate), state_(state) {} 1947 : PlatformCodeStub(isolate) {
1948 minor_key_ = state.GetExtraICState();
1949 }
1948 1950
1949 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; } 1951 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; }
1950 1952
1951 virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE { 1953 virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE {
1952 return GENERIC; 1954 return GENERIC;
1953 } 1955 }
1954 1956
1955 virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE { 1957 virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE {
1956 return state_.GetExtraICState(); 1958 return static_cast<ExtraICState>(minor_key_);
1957 } 1959 }
1958 1960
1961 virtual Major MajorKey() const V8_OVERRIDE { return LoadICTrampoline; }
1962
1959 private: 1963 private:
1960 Major MajorKey() const { return LoadICTrampoline; } 1964 LoadIC::State state() const {
1961 uint32_t MinorKey() const { return GetExtraICState(); } 1965 return LoadIC::State(static_cast<ExtraICState>(minor_key_));
1966 }
1962 1967
1963 virtual void Generate(MacroAssembler* masm); 1968 virtual void Generate(MacroAssembler* masm);
1964 1969
1965 const LoadIC::State state_;
1966
1967 DISALLOW_COPY_AND_ASSIGN(LoadICTrampolineStub); 1970 DISALLOW_COPY_AND_ASSIGN(LoadICTrampolineStub);
1968 }; 1971 };
1969 1972
1970 1973
1971 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { 1974 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
1972 public: 1975 public:
1973 explicit KeyedLoadICTrampolineStub(Isolate* isolate) 1976 explicit KeyedLoadICTrampolineStub(Isolate* isolate)
1974 : LoadICTrampolineStub(isolate, LoadIC::State(0)) {} 1977 : LoadICTrampolineStub(isolate, LoadIC::State(0)) {}
1975 1978
1976 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { 1979 virtual Code::Kind GetCodeKind() const V8_OVERRIDE {
1977 return Code::KEYED_LOAD_IC; 1980 return Code::KEYED_LOAD_IC;
1978 } 1981 }
1979 1982
1983 virtual Major MajorKey() const V8_OVERRIDE { return KeyedLoadICTrampoline; }
1984
1980 private: 1985 private:
1981 Major MajorKey() const { return KeyedLoadICTrampoline; }
1982
1983 virtual void Generate(MacroAssembler* masm); 1986 virtual void Generate(MacroAssembler* masm);
1984 1987
1985 DISALLOW_COPY_AND_ASSIGN(KeyedLoadICTrampolineStub); 1988 DISALLOW_COPY_AND_ASSIGN(KeyedLoadICTrampolineStub);
1986 }; 1989 };
1987 1990
1988 1991
1989 class VectorLoadStub : public HydrogenCodeStub { 1992 class VectorLoadStub : public HydrogenCodeStub {
1990 public: 1993 public:
1991 explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state) 1994 explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state)
1992 : HydrogenCodeStub(isolate), state_(state) {} 1995 : HydrogenCodeStub(isolate), state_(state) {}
1993 1996
1994 virtual Handle<Code> GenerateCode() V8_OVERRIDE; 1997 virtual Handle<Code> GenerateCode() V8_OVERRIDE;
1995 1998
1996 virtual void InitializeInterfaceDescriptor( 1999 virtual void InitializeInterfaceDescriptor(
1997 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; 2000 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
1998 2001
1999 static void InstallDescriptors(Isolate* isolate); 2002 static void InstallDescriptors(Isolate* isolate);
2000 2003
2001 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; } 2004 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; }
2002 2005
2003 virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE { 2006 virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE {
2004 return GENERIC; 2007 return GENERIC;
2005 } 2008 }
2006 2009
2007 virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE { 2010 virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE {
2008 return state_.GetExtraICState(); 2011 return state_.GetExtraICState();
2009 } 2012 }
2010 2013
2014 virtual Major MajorKey() const V8_OVERRIDE { return VectorLoad; }
2015
2011 private: 2016 private:
2012 Major MajorKey() const { return VectorLoad; }
2013 int NotMissMinorKey() const { return state_.GetExtraICState(); } 2017 int NotMissMinorKey() const { return state_.GetExtraICState(); }
2014 2018
2015 const LoadIC::State state_; 2019 const LoadIC::State state_;
2016 2020
2017 DISALLOW_COPY_AND_ASSIGN(VectorLoadStub); 2021 DISALLOW_COPY_AND_ASSIGN(VectorLoadStub);
2018 }; 2022 };
2019 2023
2020 2024
2021 class VectorKeyedLoadStub : public VectorLoadStub { 2025 class VectorKeyedLoadStub : public VectorLoadStub {
2022 public: 2026 public:
2023 explicit VectorKeyedLoadStub(Isolate* isolate) 2027 explicit VectorKeyedLoadStub(Isolate* isolate)
2024 : VectorLoadStub(isolate, LoadIC::State(0)) {} 2028 : VectorLoadStub(isolate, LoadIC::State(0)) {}
2025 2029
2026 virtual Handle<Code> GenerateCode() V8_OVERRIDE; 2030 virtual Handle<Code> GenerateCode() V8_OVERRIDE;
2027 2031
2028 virtual void InitializeInterfaceDescriptor( 2032 virtual void InitializeInterfaceDescriptor(
2029 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; 2033 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
2030 2034
2031 static void InstallDescriptors(Isolate* isolate); 2035 static void InstallDescriptors(Isolate* isolate);
2032 2036
2033 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { 2037 virtual Code::Kind GetCodeKind() const V8_OVERRIDE {
2034 return Code::KEYED_LOAD_IC; 2038 return Code::KEYED_LOAD_IC;
2035 } 2039 }
2036 2040
2041 virtual Major MajorKey() const V8_OVERRIDE { return VectorKeyedLoad; }
2042
2037 private: 2043 private:
2038 Major MajorKey() const { return VectorKeyedLoad; }
2039
2040 DISALLOW_COPY_AND_ASSIGN(VectorKeyedLoadStub); 2044 DISALLOW_COPY_AND_ASSIGN(VectorKeyedLoadStub);
2041 }; 2045 };
2042 2046
2043 2047
2044 class DoubleToIStub : public PlatformCodeStub { 2048 class DoubleToIStub : public PlatformCodeStub {
2045 public: 2049 public:
2046 DoubleToIStub(Isolate* isolate, Register source, Register destination, 2050 DoubleToIStub(Isolate* isolate, Register source, Register destination,
2047 int offset, bool is_truncating, bool skip_fastpath = false) 2051 int offset, bool is_truncating, bool skip_fastpath = false)
2048 : PlatformCodeStub(isolate) { 2052 : PlatformCodeStub(isolate) {
2049 minor_key_ = SourceRegisterBits::encode(source.code()) | 2053 minor_key_ = SourceRegisterBits::encode(source.code()) |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 2661
2658 2662
2659 class CallDescriptors { 2663 class CallDescriptors {
2660 public: 2664 public:
2661 static void InitializeForIsolate(Isolate* isolate); 2665 static void InitializeForIsolate(Isolate* isolate);
2662 }; 2666 };
2663 2667
2664 } } // namespace v8::internal 2668 } } // namespace v8::internal
2665 2669
2666 #endif // V8_CODE_STUBS_H_ 2670 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698