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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 int arg_count() const { return state().arg_count(); } | 830 int arg_count() const { return state().arg_count(); } |
831 | 831 |
832 CallIC::State state() const { | 832 CallIC::State state() const { |
833 return CallIC::State(static_cast<ExtraICState>(minor_key_)); | 833 return CallIC::State(static_cast<ExtraICState>(minor_key_)); |
834 } | 834 } |
835 | 835 |
836 // Code generation helpers. | 836 // Code generation helpers. |
837 void GenerateMiss(MacroAssembler* masm, IC::UtilityId id); | 837 void GenerateMiss(MacroAssembler* masm, IC::UtilityId id); |
838 | 838 |
839 private: | 839 private: |
840 virtual inline Major MajorKey() const FINAL OVERRIDE; | 840 virtual inline Major MajorKey() const OVERRIDE; |
841 | 841 |
842 virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT | 842 virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT |
843 | 843 |
844 DISALLOW_COPY_AND_ASSIGN(CallICStub); | 844 DISALLOW_COPY_AND_ASSIGN(CallICStub); |
845 }; | 845 }; |
846 | 846 |
847 | 847 |
848 class CallIC_ArrayStub: public CallICStub { | 848 class CallIC_ArrayStub: public CallICStub { |
849 public: | 849 public: |
850 CallIC_ArrayStub(Isolate* isolate, const CallIC::State& state_in) | 850 CallIC_ArrayStub(Isolate* isolate, const CallIC::State& state_in) |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 return BinaryOpIC::State(isolate(), GetExtraICState()); | 1151 return BinaryOpIC::State(isolate(), GetExtraICState()); |
1152 } | 1152 } |
1153 | 1153 |
1154 virtual void PrintState(OStream& os) const FINAL OVERRIDE; // NOLINT | 1154 virtual void PrintState(OStream& os) const FINAL OVERRIDE; // NOLINT |
1155 | 1155 |
1156 // Parameters accessed via CodeStubGraphBuilder::GetParameter() | 1156 // Parameters accessed via CodeStubGraphBuilder::GetParameter() |
1157 static const int kLeft = 0; | 1157 static const int kLeft = 0; |
1158 static const int kRight = 1; | 1158 static const int kRight = 1; |
1159 | 1159 |
1160 private: | 1160 private: |
1161 virtual inline Major MajorKey() const FINAL OVERRIDE; | 1161 virtual inline Major MajorKey() const OVERRIDE; |
1162 | 1162 |
1163 static void GenerateAheadOfTime(Isolate* isolate, | 1163 static void GenerateAheadOfTime(Isolate* isolate, |
1164 const BinaryOpIC::State& state); | 1164 const BinaryOpIC::State& state); |
1165 | 1165 |
1166 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub); | 1166 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub); |
1167 }; | 1167 }; |
1168 | 1168 |
1169 | 1169 |
1170 // TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail | 1170 // TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail |
1171 // call support for stubs in Hydrogen. | 1171 // call support for stubs in Hydrogen. |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1899 virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; } | 1899 virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; } |
1900 | 1900 |
1901 virtual InlineCacheState GetICState() const FINAL OVERRIDE { | 1901 virtual InlineCacheState GetICState() const FINAL OVERRIDE { |
1902 return GENERIC; | 1902 return GENERIC; |
1903 } | 1903 } |
1904 | 1904 |
1905 virtual ExtraICState GetExtraICState() const FINAL OVERRIDE { | 1905 virtual ExtraICState GetExtraICState() const FINAL OVERRIDE { |
1906 return static_cast<ExtraICState>(minor_key_); | 1906 return static_cast<ExtraICState>(minor_key_); |
1907 } | 1907 } |
1908 | 1908 |
1909 virtual inline Major MajorKey() const FINAL OVERRIDE; | 1909 virtual inline Major MajorKey() const OVERRIDE; |
1910 | 1910 |
1911 private: | 1911 private: |
1912 LoadIC::State state() const { | 1912 LoadIC::State state() const { |
1913 return LoadIC::State(static_cast<ExtraICState>(minor_key_)); | 1913 return LoadIC::State(static_cast<ExtraICState>(minor_key_)); |
1914 } | 1914 } |
1915 | 1915 |
1916 virtual void Generate(MacroAssembler* masm); | 1916 virtual void Generate(MacroAssembler* masm); |
1917 | 1917 |
1918 DISALLOW_COPY_AND_ASSIGN(LoadICTrampolineStub); | 1918 DISALLOW_COPY_AND_ASSIGN(LoadICTrampolineStub); |
1919 }; | 1919 }; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 | 1955 |
1956 virtual InlineCacheState GetICState() const FINAL OVERRIDE { | 1956 virtual InlineCacheState GetICState() const FINAL OVERRIDE { |
1957 return GENERIC; | 1957 return GENERIC; |
1958 } | 1958 } |
1959 | 1959 |
1960 virtual ExtraICState GetExtraICState() const FINAL OVERRIDE { | 1960 virtual ExtraICState GetExtraICState() const FINAL OVERRIDE { |
1961 return static_cast<ExtraICState>(sub_minor_key()); | 1961 return static_cast<ExtraICState>(sub_minor_key()); |
1962 } | 1962 } |
1963 | 1963 |
1964 private: | 1964 private: |
1965 virtual inline Major MajorKey() const FINAL OVERRIDE; | 1965 virtual inline Major MajorKey() const OVERRIDE; |
1966 | 1966 |
1967 LoadIC::State state() const { return LoadIC::State(GetExtraICState()); } | 1967 LoadIC::State state() const { return LoadIC::State(GetExtraICState()); } |
1968 | 1968 |
1969 DISALLOW_COPY_AND_ASSIGN(VectorLoadStub); | 1969 DISALLOW_COPY_AND_ASSIGN(VectorLoadStub); |
1970 }; | 1970 }; |
1971 | 1971 |
1972 | 1972 |
1973 class VectorKeyedLoadStub : public VectorLoadStub { | 1973 class VectorKeyedLoadStub : public VectorLoadStub { |
1974 public: | 1974 public: |
1975 explicit VectorKeyedLoadStub(Isolate* isolate) | 1975 explicit VectorKeyedLoadStub(Isolate* isolate) |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 | 2638 |
2639 #define DEFINE_MAJOR_KEY(NAME) \ | 2639 #define DEFINE_MAJOR_KEY(NAME) \ |
2640 CodeStub::Major NAME##Stub::MajorKey() const { return NAME; } | 2640 CodeStub::Major NAME##Stub::MajorKey() const { return NAME; } |
2641 | 2641 |
2642 CODE_STUB_LIST(DEFINE_MAJOR_KEY) | 2642 CODE_STUB_LIST(DEFINE_MAJOR_KEY) |
2643 | 2643 |
2644 #undef DEFINE_MAJOR_KEY | 2644 #undef DEFINE_MAJOR_KEY |
2645 } } // namespace v8::internal | 2645 } } // namespace v8::internal |
2646 | 2646 |
2647 #endif // V8_CODE_STUBS_H_ | 2647 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |