| 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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 compiler::Node* handler, Variable* var_holder, | 1139 compiler::Node* handler, Variable* var_holder, |
| 1139 Variable* var_smi_handler, | 1140 Variable* var_smi_handler, |
| 1140 Label* if_smi_handler, Label* miss); | 1141 Label* if_smi_handler, Label* miss); |
| 1141 | 1142 |
| 1142 void CheckPrototype(compiler::Node* prototype_cell, compiler::Node* name, | 1143 void CheckPrototype(compiler::Node* prototype_cell, compiler::Node* name, |
| 1143 Label* miss); | 1144 Label* miss); |
| 1144 | 1145 |
| 1145 void NameDictionaryNegativeLookup(compiler::Node* object, | 1146 void NameDictionaryNegativeLookup(compiler::Node* object, |
| 1146 compiler::Node* name, Label* miss); | 1147 compiler::Node* name, Label* miss); |
| 1147 | 1148 |
| 1149 // If |transition| is nullptr then the normal field store is generated or |
| 1150 // transitioning store otherwise. |
| 1148 void HandleStoreFieldAndReturn(compiler::Node* handler_word, | 1151 void HandleStoreFieldAndReturn(compiler::Node* handler_word, |
| 1149 compiler::Node* holder, | 1152 compiler::Node* holder, |
| 1150 Representation representation, | 1153 Representation representation, |
| 1151 compiler::Node* value, | 1154 compiler::Node* value, |
| 1152 bool transition_to_field, Label* miss); | 1155 compiler::Node* transition, Label* miss); |
| 1153 | 1156 |
| 1157 // If |transition| is nullptr then the normal field store is generated or |
| 1158 // transitioning store otherwise. |
| 1154 void HandleStoreICSmiHandlerCase(compiler::Node* handler_word, | 1159 void HandleStoreICSmiHandlerCase(compiler::Node* handler_word, |
| 1155 compiler::Node* holder, | 1160 compiler::Node* holder, |
| 1156 compiler::Node* value, | 1161 compiler::Node* value, |
| 1157 bool transition_to_field, Label* miss); | 1162 compiler::Node* transition, Label* miss); |
| 1163 |
| 1164 void HandleStoreICProtoHandler(const StoreICParameters* p, |
| 1165 compiler::Node* handler, Label* miss); |
| 1158 | 1166 |
| 1159 compiler::Node* TryToIntptr(compiler::Node* key, Label* miss); | 1167 compiler::Node* TryToIntptr(compiler::Node* key, Label* miss); |
| 1160 void EmitFastElementsBoundsCheck(compiler::Node* object, | 1168 void EmitFastElementsBoundsCheck(compiler::Node* object, |
| 1161 compiler::Node* elements, | 1169 compiler::Node* elements, |
| 1162 compiler::Node* intptr_index, | 1170 compiler::Node* intptr_index, |
| 1163 compiler::Node* is_jsarray_condition, | 1171 compiler::Node* is_jsarray_condition, |
| 1164 Label* miss); | 1172 Label* miss); |
| 1165 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, | 1173 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, |
| 1166 compiler::Node* elements_kind, compiler::Node* key, | 1174 compiler::Node* elements_kind, compiler::Node* key, |
| 1167 compiler::Node* is_jsarray_condition, Label* if_hole, | 1175 compiler::Node* is_jsarray_condition, Label* if_hole, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1266 } | 1274 } |
| 1267 #else | 1275 #else |
| 1268 #define CSA_SLOW_ASSERT(x) | 1276 #define CSA_SLOW_ASSERT(x) |
| 1269 #endif | 1277 #endif |
| 1270 | 1278 |
| 1271 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1279 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 1272 | 1280 |
| 1273 } // namespace internal | 1281 } // namespace internal |
| 1274 } // namespace v8 | 1282 } // namespace v8 |
| 1275 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1283 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |