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" |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1231 Node* AllocatePromiseReactionJobInfo(Node* value, Node* tasks, | 1231 Node* AllocatePromiseReactionJobInfo(Node* value, Node* tasks, |
1232 Node* deferred_promise, | 1232 Node* deferred_promise, |
1233 Node* deferred_on_resolve, | 1233 Node* deferred_on_resolve, |
1234 Node* deferred_on_reject, Node* context); | 1234 Node* deferred_on_reject, Node* context); |
1235 | 1235 |
1236 // Support for printf-style debugging | 1236 // Support for printf-style debugging |
1237 void Print(const char* s); | 1237 void Print(const char* s); |
1238 void Print(const char* prefix, Node* tagged_value); | 1238 void Print(const char* prefix, Node* tagged_value); |
1239 inline void Print(Node* tagged_value) { return Print(nullptr, tagged_value); } | 1239 inline void Print(Node* tagged_value) { return Print(nullptr, tagged_value); } |
1240 | 1240 |
1241 template <class... TArgs> | |
1242 Node* MakeTypeError(MessageTemplate::Template message, Node* context, | |
1243 TArgs... args) { | |
1244 Node* const make_type_error = LoadContextElement( | |
1245 LoadNativeContext(context), Context::MAKE_TYPE_ERROR_INDEX); | |
1246 return CallJS(CodeFactory::Call(isolate()), context, make_type_error, | |
caitp
2017/02/15 22:18:01
Maybe it would make sense for MakeTypeError (and f
| |
1247 UndefinedConstant(), SmiConstant(message), args...); | |
1248 } | |
1249 | |
1241 protected: | 1250 protected: |
1242 void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3, | 1251 void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3, |
1243 Label* if_found, Variable* var_name_index, | 1252 Label* if_found, Variable* var_name_index, |
1244 Label* if_not_found); | 1253 Label* if_not_found); |
1245 void DescriptorLookupLinear(Node* unique_name, Node* descriptors, Node* nof, | 1254 void DescriptorLookupLinear(Node* unique_name, Node* descriptors, Node* nof, |
1246 Label* if_found, Variable* var_name_index, | 1255 Label* if_found, Variable* var_name_index, |
1247 Label* if_not_found); | 1256 Label* if_not_found); |
1248 void DescriptorLookupBinary(Node* unique_name, Node* descriptors, Node* nof, | 1257 void DescriptorLookupBinary(Node* unique_name, Node* descriptors, Node* nof, |
1249 Label* if_found, Variable* var_name_index, | 1258 Label* if_found, Variable* var_name_index, |
1250 Label* if_not_found); | 1259 Label* if_not_found); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1384 } | 1393 } |
1385 #else | 1394 #else |
1386 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1395 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
1387 #endif | 1396 #endif |
1388 | 1397 |
1389 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1398 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1390 | 1399 |
1391 } // namespace internal | 1400 } // namespace internal |
1392 } // namespace v8 | 1401 } // namespace v8 |
1393 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1402 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |