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

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

Issue 157503002: A64: Synchronize with r18444. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/checks.cc ('k') | src/code-stubs.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 #include "macro-assembler.h" 35 #include "macro-assembler.h"
36 36
37 namespace v8 { 37 namespace v8 {
38 namespace internal { 38 namespace internal {
39 39
40 // List of code stubs used on all platforms. 40 // List of code stubs used on all platforms.
41 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \ 41 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \
42 V(CallFunction) \ 42 V(CallFunction) \
43 V(CallConstruct) \ 43 V(CallConstruct) \
44 V(BinaryOpIC) \ 44 V(BinaryOpIC) \
45 V(BinaryOpICWithAllocationSite) \
46 V(BinaryOpWithAllocationSite) \
45 V(StringAdd) \ 47 V(StringAdd) \
46 V(NewStringAdd) \ 48 V(NewStringAdd) \
47 V(SubString) \ 49 V(SubString) \
48 V(StringCompare) \ 50 V(StringCompare) \
49 V(Compare) \ 51 V(Compare) \
50 V(CompareIC) \ 52 V(CompareIC) \
51 V(CompareNilIC) \ 53 V(CompareNilIC) \
52 V(MathPow) \ 54 V(MathPow) \
53 V(StringLength) \ 55 V(StringLength) \
54 V(FunctionPrototype) \ 56 V(FunctionPrototype) \
55 V(StoreArrayLength) \ 57 V(StoreArrayLength) \
56 V(RecordWrite) \ 58 V(RecordWrite) \
57 V(StoreBufferOverflow) \ 59 V(StoreBufferOverflow) \
58 V(RegExpExec) \ 60 V(RegExpExec) \
59 V(TranscendentalCache) \
60 V(Instanceof) \ 61 V(Instanceof) \
61 V(ConvertToDouble) \ 62 V(ConvertToDouble) \
62 V(WriteInt32ToHeapNumber) \ 63 V(WriteInt32ToHeapNumber) \
63 V(StackCheck) \ 64 V(StackCheck) \
64 V(Interrupt) \ 65 V(Interrupt) \
65 V(FastNewClosure) \ 66 V(FastNewClosure) \
66 V(FastNewContext) \ 67 V(FastNewContext) \
67 V(FastNewBlockContext) \ 68 V(FastNewBlockContext) \
68 V(FastCloneShallowArray) \ 69 V(FastCloneShallowArray) \
69 V(FastCloneShallowObject) \ 70 V(FastCloneShallowObject) \
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 V(InvokeBuiltin) \ 115 V(InvokeBuiltin) \
115 V(DirectCEntry) 116 V(DirectCEntry)
116 #else 117 #else
117 #define CODE_STUB_LIST_ARM(V) 118 #define CODE_STUB_LIST_ARM(V)
118 #endif 119 #endif
119 120
120 // List of code stubs only used on MIPS platforms. 121 // List of code stubs only used on MIPS platforms.
121 #if V8_TARGET_ARCH_MIPS 122 #if V8_TARGET_ARCH_MIPS
122 #define CODE_STUB_LIST_MIPS(V) \ 123 #define CODE_STUB_LIST_MIPS(V) \
123 V(RegExpCEntry) \ 124 V(RegExpCEntry) \
124 V(DirectCEntry) 125 V(DirectCEntry) \
126 V(StoreRegistersState) \
127 V(RestoreRegistersState)
125 #else 128 #else
126 #define CODE_STUB_LIST_MIPS(V) 129 #define CODE_STUB_LIST_MIPS(V)
127 #endif 130 #endif
128 131
129 // Combined list of code stubs. 132 // Combined list of code stubs.
130 #define CODE_STUB_LIST(V) \ 133 #define CODE_STUB_LIST(V) \
131 CODE_STUB_LIST_ALL_PLATFORMS(V) \ 134 CODE_STUB_LIST_ALL_PLATFORMS(V) \
132 CODE_STUB_LIST_ARM(V) \ 135 CODE_STUB_LIST_ARM(V) \
133 CODE_STUB_LIST_MIPS(V) 136 CODE_STUB_LIST_MIPS(V)
134 137
135 // Stub is base classes of all stubs. 138 // Stub is base classes of all stubs.
136 class CodeStub BASE_EMBEDDED { 139 class CodeStub BASE_EMBEDDED {
137 public: 140 public:
138 enum Major { 141 enum Major {
142 UninitializedMajorKey = 0,
139 #define DEF_ENUM(name) name, 143 #define DEF_ENUM(name) name,
140 CODE_STUB_LIST(DEF_ENUM) 144 CODE_STUB_LIST(DEF_ENUM)
141 #undef DEF_ENUM 145 #undef DEF_ENUM
142 NoCache, // marker for stubs that do custom caching 146 NoCache, // marker for stubs that do custom caching
143 NUMBER_OF_IDS 147 NUMBER_OF_IDS
144 }; 148 };
145 149
146 // Retrieve the code for the stub. Generate the code if needed. 150 // Retrieve the code for the stub. Generate the code if needed.
147 Handle<Code> GetCode(Isolate* isolate); 151 Handle<Code> GetCode(Isolate* isolate);
148 152
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // If a stub uses a special cache override this. 248 // If a stub uses a special cache override this.
245 virtual bool UseSpecialCache() { return false; } 249 virtual bool UseSpecialCache() { return false; }
246 250
247 // Computes the key based on major and minor. 251 // Computes the key based on major and minor.
248 uint32_t GetKey() { 252 uint32_t GetKey() {
249 ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS); 253 ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS);
250 return MinorKeyBits::encode(MinorKey()) | 254 return MinorKeyBits::encode(MinorKey()) |
251 MajorKeyBits::encode(MajorKey()); 255 MajorKeyBits::encode(MajorKey());
252 } 256 }
253 257
258 STATIC_ASSERT(NUMBER_OF_IDS < (1 << kStubMajorKeyBits));
254 class MajorKeyBits: public BitField<uint32_t, 0, kStubMajorKeyBits> {}; 259 class MajorKeyBits: public BitField<uint32_t, 0, kStubMajorKeyBits> {};
255 class MinorKeyBits: public BitField<uint32_t, 260 class MinorKeyBits: public BitField<uint32_t,
256 kStubMajorKeyBits, kStubMinorKeyBits> {}; // NOLINT 261 kStubMajorKeyBits, kStubMinorKeyBits> {}; // NOLINT
257 262
258 friend class BreakPointIterator; 263 friend class BreakPointIterator;
259 }; 264 };
260 265
261 266
262 class PlatformCodeStub : public CodeStub { 267 class PlatformCodeStub : public CodeStub {
263 public: 268 public:
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 public: 746 public:
742 enum ArgumentCountKey { ANY, NONE, ONE, MORE_THAN_ONE }; 747 enum ArgumentCountKey { ANY, NONE, ONE, MORE_THAN_ONE };
743 ArrayConstructorStub(Isolate* isolate, int argument_count); 748 ArrayConstructorStub(Isolate* isolate, int argument_count);
744 explicit ArrayConstructorStub(Isolate* isolate); 749 explicit ArrayConstructorStub(Isolate* isolate);
745 750
746 void Generate(MacroAssembler* masm); 751 void Generate(MacroAssembler* masm);
747 752
748 private: 753 private:
749 void GenerateDispatchToArrayStub(MacroAssembler* masm, 754 void GenerateDispatchToArrayStub(MacroAssembler* masm,
750 AllocationSiteOverrideMode mode); 755 AllocationSiteOverrideMode mode);
756 virtual void PrintName(StringStream* stream);
751 757
752 virtual CodeStub::Major MajorKey() { return ArrayConstructor; } 758 virtual CodeStub::Major MajorKey() { return ArrayConstructor; }
753 virtual int MinorKey() { return argument_count_; } 759 virtual int MinorKey() { return argument_count_; }
754 760
755 ArgumentCountKey argument_count_; 761 ArgumentCountKey argument_count_;
756 }; 762 };
757 763
758 764
759 class InternalArrayConstructorStub: public PlatformCodeStub { 765 class InternalArrayConstructorStub: public PlatformCodeStub {
760 public: 766 public:
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 STATIC_ASSERT(CallICBase::Contextual::kSize == ContextualBits::kSize); 1065 STATIC_ASSERT(CallICBase::Contextual::kSize == ContextualBits::kSize);
1060 class HoleyBits: public BitField<bool, 1, 1> {}; 1066 class HoleyBits: public BitField<bool, 1, 1> {};
1061 STATIC_ASSERT(Code::kArgumentsBits <= kStubMinorKeyBits - 2); 1067 STATIC_ASSERT(Code::kArgumentsBits <= kStubMinorKeyBits - 2);
1062 class ArgcBits: public BitField<int, 2, Code::kArgumentsBits> {}; 1068 class ArgcBits: public BitField<int, 2, Code::kArgumentsBits> {};
1063 virtual CodeStub::Major MajorKey() { return KeyedArrayCall; } 1069 virtual CodeStub::Major MajorKey() { return KeyedArrayCall; }
1064 int bit_field_; 1070 int bit_field_;
1065 int argc_; 1071 int argc_;
1066 }; 1072 };
1067 1073
1068 1074
1069 class BinaryOpICStub V8_FINAL : public HydrogenCodeStub { 1075 class BinaryOpICStub : public HydrogenCodeStub {
1070 public: 1076 public:
1071 BinaryOpICStub(Token::Value op, OverwriteMode mode) 1077 BinaryOpICStub(Token::Value op, OverwriteMode mode)
1072 : HydrogenCodeStub(UNINITIALIZED), state_(op, mode) {} 1078 : HydrogenCodeStub(UNINITIALIZED), state_(op, mode) {}
1073 1079
1074 explicit BinaryOpICStub(const BinaryOpIC::State& state) : state_(state) {} 1080 explicit BinaryOpICStub(const BinaryOpIC::State& state) : state_(state) {}
1075 1081
1076 static void GenerateAheadOfTime(Isolate* isolate); 1082 static void GenerateAheadOfTime(Isolate* isolate);
1077 1083
1078 virtual void InitializeInterfaceDescriptor( 1084 virtual void InitializeInterfaceDescriptor(
1079 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; 1085 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
1080 1086
1081 static void InstallDescriptors(Isolate* isolate); 1087 static void InstallDescriptors(Isolate* isolate);
1082 1088
1083 virtual Code::Kind GetCodeKind() const V8_OVERRIDE { 1089 virtual Code::Kind GetCodeKind() const V8_OVERRIDE {
1084 return Code::BINARY_OP_IC; 1090 return Code::BINARY_OP_IC;
1085 } 1091 }
1086 1092
1087 virtual InlineCacheState GetICState() V8_OVERRIDE { 1093 virtual InlineCacheState GetICState() V8_FINAL V8_OVERRIDE {
1088 return state_.GetICState(); 1094 return state_.GetICState();
1089 } 1095 }
1090 1096
1091 virtual ExtraICState GetExtraICState() V8_OVERRIDE { 1097 virtual ExtraICState GetExtraICState() V8_FINAL V8_OVERRIDE {
1092 return state_.GetExtraICState(); 1098 return state_.GetExtraICState();
1093 } 1099 }
1094 1100
1095 virtual void VerifyPlatformFeatures(Isolate* isolate) V8_OVERRIDE { 1101 virtual void VerifyPlatformFeatures(Isolate* isolate) V8_FINAL V8_OVERRIDE {
1096 ASSERT(CpuFeatures::VerifyCrossCompiling(SSE2)); 1102 ASSERT(CpuFeatures::VerifyCrossCompiling(SSE2));
1097 } 1103 }
1098 1104
1099 virtual Handle<Code> GenerateCode(Isolate* isolate) V8_OVERRIDE; 1105 virtual Handle<Code> GenerateCode(Isolate* isolate) V8_OVERRIDE;
1100 1106
1101 const BinaryOpIC::State& state() const { return state_; } 1107 const BinaryOpIC::State& state() const { return state_; }
1102 1108
1103 virtual void PrintState(StringStream* stream) V8_OVERRIDE; 1109 virtual void PrintState(StringStream* stream) V8_FINAL V8_OVERRIDE;
1110
1111 virtual Major MajorKey() V8_OVERRIDE { return BinaryOpIC; }
1112 virtual int NotMissMinorKey() V8_FINAL V8_OVERRIDE {
1113 return GetExtraICState();
1114 }
1104 1115
1105 // Parameters accessed via CodeStubGraphBuilder::GetParameter() 1116 // Parameters accessed via CodeStubGraphBuilder::GetParameter()
1106 static const int kLeft = 0; 1117 static const int kLeft = 0;
1107 static const int kRight = 1; 1118 static const int kRight = 1;
1108 1119
1109 private: 1120 private:
1110 static void GenerateAheadOfTime(Isolate* isolate, 1121 static void GenerateAheadOfTime(Isolate* isolate,
1111 const BinaryOpIC::State& state); 1122 const BinaryOpIC::State& state);
1112 1123
1113 virtual Major MajorKey() V8_OVERRIDE { return BinaryOpIC; }
1114 virtual int NotMissMinorKey() V8_OVERRIDE { return GetExtraICState(); }
1115
1116 BinaryOpIC::State state_; 1124 BinaryOpIC::State state_;
1117 1125
1118 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub); 1126 DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub);
1119 }; 1127 };
1120 1128
1121 1129
1130 // TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail
1131 // call support for stubs in Hydrogen.
1132 class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub {
1133 public:
1134 explicit BinaryOpICWithAllocationSiteStub(const BinaryOpIC::State& state)
1135 : state_(state) {}
1136
1137 static void GenerateAheadOfTime(Isolate* isolate);
1138
1139 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate,
1140 Handle<AllocationSite> allocation_site) {
1141 Handle<Code> code = CodeStub::GetCodeCopyFromTemplate(isolate);
1142 // Replace the placeholder oddball with the actual allocation site.
1143 code->ReplaceNthObject(1, isolate->heap()->oddball_map(), *allocation_site);
1144 return code;
1145 }
1146
1147 virtual Code::Kind GetCodeKind() const V8_OVERRIDE {
1148 return Code::BINARY_OP_IC;
1149 }
1150
1151 virtual InlineCacheState GetICState() V8_OVERRIDE {
1152 return state_.GetICState();
1153 }
1154
1155 virtual ExtraICState GetExtraICState() V8_OVERRIDE {
1156 return state_.GetExtraICState();
1157 }
1158
1159 virtual void VerifyPlatformFeatures(Isolate* isolate) V8_OVERRIDE {
1160 ASSERT(CpuFeatures::VerifyCrossCompiling(SSE2));
1161 }
1162
1163 virtual void Generate(MacroAssembler* masm) V8_OVERRIDE;
1164
1165 virtual void PrintState(StringStream* stream) V8_OVERRIDE;
1166
1167 virtual Major MajorKey() V8_OVERRIDE { return BinaryOpICWithAllocationSite; }
1168 virtual int MinorKey() V8_OVERRIDE { return GetExtraICState(); }
1169
1170 private:
1171 static void GenerateAheadOfTime(Isolate* isolate,
1172 const BinaryOpIC::State& state);
1173
1174 BinaryOpIC::State state_;
1175
1176 DISALLOW_COPY_AND_ASSIGN(BinaryOpICWithAllocationSiteStub);
1177 };
1178
1179
1180 class BinaryOpWithAllocationSiteStub V8_FINAL : public BinaryOpICStub {
1181 public:
1182 explicit BinaryOpWithAllocationSiteStub(const BinaryOpIC::State& state)
1183 : BinaryOpICStub(state) {}
1184
1185 virtual void InitializeInterfaceDescriptor(
1186 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
1187
1188 static void InstallDescriptors(Isolate* isolate);
1189
1190 virtual Code::Kind GetCodeKind() const V8_FINAL V8_OVERRIDE {
1191 return Code::STUB;
1192 }
1193
1194 virtual Handle<Code> GenerateCode(Isolate* isolate) V8_OVERRIDE;
1195
1196 virtual Major MajorKey() V8_OVERRIDE {
1197 return BinaryOpWithAllocationSite;
1198 }
1199
1200 // Parameters accessed via CodeStubGraphBuilder::GetParameter()
1201 static const int kAllocationSite = 0;
1202 static const int kLeft = 1;
1203 static const int kRight = 2;
1204 };
1205
1206
1122 // TODO(bmeurer): Rename to StringAddStub once we dropped the old StringAddStub. 1207 // TODO(bmeurer): Rename to StringAddStub once we dropped the old StringAddStub.
1123 class NewStringAddStub V8_FINAL : public HydrogenCodeStub { 1208 class NewStringAddStub V8_FINAL : public HydrogenCodeStub {
1124 public: 1209 public:
1125 NewStringAddStub(StringAddFlags flags, PretenureFlag pretenure_flag) 1210 NewStringAddStub(StringAddFlags flags, PretenureFlag pretenure_flag)
1126 : bit_field_(StringAddFlagsBits::encode(flags) | 1211 : bit_field_(StringAddFlagsBits::encode(flags) |
1127 PretenureFlagBits::encode(pretenure_flag)) {} 1212 PretenureFlagBits::encode(pretenure_flag)) {}
1128 1213
1129 StringAddFlags flags() const { 1214 StringAddFlags flags() const {
1130 return StringAddFlagsBits::decode(bit_field_); 1215 return StringAddFlagsBits::decode(bit_field_);
1131 } 1216 }
1132 1217
1133 PretenureFlag pretenure_flag() const { 1218 PretenureFlag pretenure_flag() const {
1134 return PretenureFlagBits::decode(bit_field_); 1219 return PretenureFlagBits::decode(bit_field_);
1135 } 1220 }
1136 1221
1222 virtual void VerifyPlatformFeatures(Isolate* isolate) V8_OVERRIDE {
1223 ASSERT(CpuFeatures::VerifyCrossCompiling(SSE2));
1224 }
1225
1137 virtual Handle<Code> GenerateCode(Isolate* isolate) V8_OVERRIDE; 1226 virtual Handle<Code> GenerateCode(Isolate* isolate) V8_OVERRIDE;
1138 1227
1139 virtual void InitializeInterfaceDescriptor( 1228 virtual void InitializeInterfaceDescriptor(
1140 Isolate* isolate, 1229 Isolate* isolate,
1141 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; 1230 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
1142 1231
1143 static void InstallDescriptors(Isolate* isolate); 1232 static void InstallDescriptors(Isolate* isolate);
1144 1233
1145 // Parameters accessed via CodeStubGraphBuilder::GetParameter() 1234 // Parameters accessed via CodeStubGraphBuilder::GetParameter()
1146 static const int kLeft = 0; 1235 static const int kLeft = 0;
(...skipping 29 matching lines...) Expand all
1176 virtual void Generate(MacroAssembler* masm); 1265 virtual void Generate(MacroAssembler* masm);
1177 1266
1178 void set_known_map(Handle<Map> map) { known_map_ = map; } 1267 void set_known_map(Handle<Map> map) { known_map_ = map; }
1179 1268
1180 static void DecodeMinorKey(int minor_key, 1269 static void DecodeMinorKey(int minor_key,
1181 CompareIC::State* left_state, 1270 CompareIC::State* left_state,
1182 CompareIC::State* right_state, 1271 CompareIC::State* right_state,
1183 CompareIC::State* handler_state, 1272 CompareIC::State* handler_state,
1184 Token::Value* op); 1273 Token::Value* op);
1185 1274
1186 static CompareIC::State CompareState(int minor_key) {
1187 return static_cast<CompareIC::State>(HandlerStateField::decode(minor_key));
1188 }
1189
1190 virtual InlineCacheState GetICState(); 1275 virtual InlineCacheState GetICState();
1191 1276
1192 private: 1277 private:
1193 class OpField: public BitField<int, 0, 3> { }; 1278 class OpField: public BitField<int, 0, 3> { };
1194 class LeftStateField: public BitField<int, 3, 4> { }; 1279 class LeftStateField: public BitField<int, 3, 4> { };
1195 class RightStateField: public BitField<int, 7, 4> { }; 1280 class RightStateField: public BitField<int, 7, 4> { };
1196 class HandlerStateField: public BitField<int, 11, 4> { }; 1281 class HandlerStateField: public BitField<int, 11, 4> { };
1197 1282
1198 virtual void FinishCode(Handle<Code> code) { 1283 virtual void FinishCode(Handle<Code> code) {
1199 code->set_stub_info(MinorKey()); 1284 code->set_stub_info(MinorKey());
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 return ContextCheckModeBits::decode(bit_field_); 2046 return ContextCheckModeBits::decode(bit_field_);
1962 } 2047 }
1963 2048
1964 static void GenerateStubsAheadOfTime(Isolate* isolate); 2049 static void GenerateStubsAheadOfTime(Isolate* isolate);
1965 static void InstallDescriptors(Isolate* isolate); 2050 static void InstallDescriptors(Isolate* isolate);
1966 2051
1967 // Parameters accessed via CodeStubGraphBuilder::GetParameter() 2052 // Parameters accessed via CodeStubGraphBuilder::GetParameter()
1968 static const int kConstructor = 0; 2053 static const int kConstructor = 0;
1969 static const int kPropertyCell = 1; 2054 static const int kPropertyCell = 1;
1970 2055
2056 protected:
2057 void BasePrintName(const char* name, StringStream* stream);
2058
1971 private: 2059 private:
1972 int NotMissMinorKey() { return bit_field_; } 2060 int NotMissMinorKey() { return bit_field_; }
1973 2061
1974 // Ensure data fits within available bits. 2062 // Ensure data fits within available bits.
1975 STATIC_ASSERT(LAST_ALLOCATION_SITE_OVERRIDE_MODE == 1); 2063 STATIC_ASSERT(LAST_ALLOCATION_SITE_OVERRIDE_MODE == 1);
1976 STATIC_ASSERT(LAST_CONTEXT_CHECK_MODE == 1); 2064 STATIC_ASSERT(LAST_CONTEXT_CHECK_MODE == 1);
1977 2065
1978 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {}; 2066 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
1979 class AllocationSiteOverrideModeBits: public 2067 class AllocationSiteOverrideModeBits: public
1980 BitField<AllocationSiteOverrideMode, 8, 1> {}; // NOLINT 2068 BitField<AllocationSiteOverrideMode, 8, 1> {}; // NOLINT
(...skipping 15 matching lines...) Expand all
1996 2084
1997 virtual Handle<Code> GenerateCode(Isolate* isolate); 2085 virtual Handle<Code> GenerateCode(Isolate* isolate);
1998 2086
1999 virtual void InitializeInterfaceDescriptor( 2087 virtual void InitializeInterfaceDescriptor(
2000 Isolate* isolate, 2088 Isolate* isolate,
2001 CodeStubInterfaceDescriptor* descriptor); 2089 CodeStubInterfaceDescriptor* descriptor);
2002 2090
2003 private: 2091 private:
2004 Major MajorKey() { return ArrayNoArgumentConstructor; } 2092 Major MajorKey() { return ArrayNoArgumentConstructor; }
2005 2093
2094 virtual void PrintName(StringStream* stream) {
2095 BasePrintName("ArrayNoArgumentConstructorStub", stream);
2096 }
2097
2006 DISALLOW_COPY_AND_ASSIGN(ArrayNoArgumentConstructorStub); 2098 DISALLOW_COPY_AND_ASSIGN(ArrayNoArgumentConstructorStub);
2007 }; 2099 };
2008 2100
2009 2101
2010 class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase { 2102 class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase {
2011 public: 2103 public:
2012 ArraySingleArgumentConstructorStub( 2104 ArraySingleArgumentConstructorStub(
2013 ElementsKind kind, 2105 ElementsKind kind,
2014 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED, 2106 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
2015 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE) 2107 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
2016 : ArrayConstructorStubBase(kind, context_mode, override_mode) { 2108 : ArrayConstructorStubBase(kind, context_mode, override_mode) {
2017 } 2109 }
2018 2110
2019 virtual Handle<Code> GenerateCode(Isolate* isolate); 2111 virtual Handle<Code> GenerateCode(Isolate* isolate);
2020 2112
2021 virtual void InitializeInterfaceDescriptor( 2113 virtual void InitializeInterfaceDescriptor(
2022 Isolate* isolate, 2114 Isolate* isolate,
2023 CodeStubInterfaceDescriptor* descriptor); 2115 CodeStubInterfaceDescriptor* descriptor);
2024 2116
2025 private: 2117 private:
2026 Major MajorKey() { return ArraySingleArgumentConstructor; } 2118 Major MajorKey() { return ArraySingleArgumentConstructor; }
2027 2119
2120 virtual void PrintName(StringStream* stream) {
2121 BasePrintName("ArraySingleArgumentConstructorStub", stream);
2122 }
2123
2028 DISALLOW_COPY_AND_ASSIGN(ArraySingleArgumentConstructorStub); 2124 DISALLOW_COPY_AND_ASSIGN(ArraySingleArgumentConstructorStub);
2029 }; 2125 };
2030 2126
2031 2127
2032 class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase { 2128 class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
2033 public: 2129 public:
2034 ArrayNArgumentsConstructorStub( 2130 ArrayNArgumentsConstructorStub(
2035 ElementsKind kind, 2131 ElementsKind kind,
2036 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED, 2132 ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
2037 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE) 2133 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
2038 : ArrayConstructorStubBase(kind, context_mode, override_mode) { 2134 : ArrayConstructorStubBase(kind, context_mode, override_mode) {
2039 } 2135 }
2040 2136
2041 virtual Handle<Code> GenerateCode(Isolate* isolate); 2137 virtual Handle<Code> GenerateCode(Isolate* isolate);
2042 2138
2043 virtual void InitializeInterfaceDescriptor( 2139 virtual void InitializeInterfaceDescriptor(
2044 Isolate* isolate, 2140 Isolate* isolate,
2045 CodeStubInterfaceDescriptor* descriptor); 2141 CodeStubInterfaceDescriptor* descriptor);
2046 2142
2047 private: 2143 private:
2048 Major MajorKey() { return ArrayNArgumentsConstructor; } 2144 Major MajorKey() { return ArrayNArgumentsConstructor; }
2049 2145
2146 virtual void PrintName(StringStream* stream) {
2147 BasePrintName("ArrayNArgumentsConstructorStub", stream);
2148 }
2149
2050 DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub); 2150 DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub);
2051 }; 2151 };
2052 2152
2053 2153
2054 class InternalArrayConstructorStubBase : public HydrogenCodeStub { 2154 class InternalArrayConstructorStubBase : public HydrogenCodeStub {
2055 public: 2155 public:
2056 explicit InternalArrayConstructorStubBase(ElementsKind kind) { 2156 explicit InternalArrayConstructorStubBase(ElementsKind kind) {
2057 kind_ = kind; 2157 kind_ = kind;
2058 } 2158 }
2059 2159
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 int MinorKey() { return 0; } 2479 int MinorKey() { return 0; }
2380 2480
2381 void Generate(MacroAssembler* masm); 2481 void Generate(MacroAssembler* masm);
2382 2482
2383 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2483 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2384 }; 2484 };
2385 2485
2386 } } // namespace v8::internal 2486 } } // namespace v8::internal
2387 2487
2388 #endif // V8_CODE_STUBS_H_ 2488 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/checks.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698