OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_STUB_ASSEMBLER_H_ | 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_ |
6 #define V8_CODE_STUB_ASSEMBLER_H_ | 6 #define V8_CODE_STUB_ASSEMBLER_H_ |
7 | 7 |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "src/compiler/code-assembler.h" | 10 #include "src/compiler/code-assembler.h" |
11 #include "src/globals.h" | 11 #include "src/globals.h" |
12 #include "src/objects.h" | 12 #include "src/objects.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 class CallInterfaceDescriptor; | 17 class CallInterfaceDescriptor; |
18 class StatsCounter; | 18 class StatsCounter; |
19 class StubCache; | 19 class StubCache; |
20 | 20 |
21 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; | 21 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; |
22 | 22 |
23 enum class IterationKind { kKeys, kValues, kEntries }; | 23 enum class IterationKind { kKeys, kValues, kEntries }; |
24 | 24 |
25 #define HEAP_CONSTANT_LIST(V) \ | 25 #define HEAP_CONSTANT_LIST(V) \ |
26 V(BooleanMap, BooleanMap) \ | 26 V(BooleanMap, BooleanMap) \ |
| 27 V(CodeMap, CodeMap) \ |
27 V(empty_string, EmptyString) \ | 28 V(empty_string, EmptyString) \ |
28 V(EmptyFixedArray, EmptyFixedArray) \ | 29 V(EmptyFixedArray, EmptyFixedArray) \ |
29 V(FalseValue, False) \ | 30 V(FalseValue, False) \ |
30 V(FixedArrayMap, FixedArrayMap) \ | 31 V(FixedArrayMap, FixedArrayMap) \ |
31 V(FixedCOWArrayMap, FixedCOWArrayMap) \ | 32 V(FixedCOWArrayMap, FixedCOWArrayMap) \ |
32 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ | 33 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ |
33 V(HeapNumberMap, HeapNumberMap) \ | 34 V(HeapNumberMap, HeapNumberMap) \ |
34 V(MinusZeroValue, MinusZero) \ | 35 V(MinusZeroValue, MinusZero) \ |
35 V(NanValue, Nan) \ | 36 V(NanValue, Nan) \ |
36 V(NullValue, Null) \ | 37 V(NullValue, Null) \ |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 compiler::Node* handler, Variable* var_holder, | 1146 compiler::Node* handler, Variable* var_holder, |
1146 Variable* var_smi_handler, | 1147 Variable* var_smi_handler, |
1147 Label* if_smi_handler, Label* miss); | 1148 Label* if_smi_handler, Label* miss); |
1148 | 1149 |
1149 void CheckPrototype(compiler::Node* prototype_cell, compiler::Node* name, | 1150 void CheckPrototype(compiler::Node* prototype_cell, compiler::Node* name, |
1150 Label* miss); | 1151 Label* miss); |
1151 | 1152 |
1152 void NameDictionaryNegativeLookup(compiler::Node* object, | 1153 void NameDictionaryNegativeLookup(compiler::Node* object, |
1153 compiler::Node* name, Label* miss); | 1154 compiler::Node* name, Label* miss); |
1154 | 1155 |
| 1156 // If |transition| is nullptr then the normal field store is generated or |
| 1157 // transitioning store otherwise. |
1155 void HandleStoreFieldAndReturn(compiler::Node* handler_word, | 1158 void HandleStoreFieldAndReturn(compiler::Node* handler_word, |
1156 compiler::Node* holder, | 1159 compiler::Node* holder, |
1157 Representation representation, | 1160 Representation representation, |
1158 compiler::Node* value, | 1161 compiler::Node* value, |
1159 bool transition_to_field, Label* miss); | 1162 compiler::Node* transition, Label* miss); |
1160 | 1163 |
| 1164 // If |transition| is nullptr then the normal field store is generated or |
| 1165 // transitioning store otherwise. |
1161 void HandleStoreICSmiHandlerCase(compiler::Node* handler_word, | 1166 void HandleStoreICSmiHandlerCase(compiler::Node* handler_word, |
1162 compiler::Node* holder, | 1167 compiler::Node* holder, |
1163 compiler::Node* value, | 1168 compiler::Node* value, |
1164 bool transition_to_field, Label* miss); | 1169 compiler::Node* transition, Label* miss); |
| 1170 |
| 1171 void HandleStoreICProtoHandler(const StoreICParameters* p, |
| 1172 compiler::Node* handler, Label* miss); |
1165 | 1173 |
1166 compiler::Node* TryToIntptr(compiler::Node* key, Label* miss); | 1174 compiler::Node* TryToIntptr(compiler::Node* key, Label* miss); |
1167 void EmitFastElementsBoundsCheck(compiler::Node* object, | 1175 void EmitFastElementsBoundsCheck(compiler::Node* object, |
1168 compiler::Node* elements, | 1176 compiler::Node* elements, |
1169 compiler::Node* intptr_index, | 1177 compiler::Node* intptr_index, |
1170 compiler::Node* is_jsarray_condition, | 1178 compiler::Node* is_jsarray_condition, |
1171 Label* miss); | 1179 Label* miss); |
1172 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, | 1180 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, |
1173 compiler::Node* elements_kind, compiler::Node* key, | 1181 compiler::Node* elements_kind, compiler::Node* key, |
1174 compiler::Node* is_jsarray_condition, Label* if_hole, | 1182 compiler::Node* is_jsarray_condition, Label* if_hole, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 } | 1287 } |
1280 #else | 1288 #else |
1281 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1289 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
1282 #endif | 1290 #endif |
1283 | 1291 |
1284 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1292 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1285 | 1293 |
1286 } // namespace internal | 1294 } // namespace internal |
1287 } // namespace v8 | 1295 } // namespace v8 |
1288 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1296 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |