Chromium Code Reviews| Index: src/code-stub-assembler.h |
| diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
| index 14cc99596c03bce21782c7a7fa183a6bad9dcd96..2ec1d904654d6b41f3d1b790b8ed627a968b178d 100644 |
| --- a/src/code-stub-assembler.h |
| +++ b/src/code-stub-assembler.h |
| @@ -1238,6 +1238,15 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
| void Print(const char* prefix, Node* tagged_value); |
| inline void Print(Node* tagged_value) { return Print(nullptr, tagged_value); } |
| + template <class... TArgs> |
| + Node* MakeTypeError(MessageTemplate::Template message, Node* context, |
| + TArgs... args) { |
| + Node* const make_type_error = LoadContextElement( |
| + LoadNativeContext(context), Context::MAKE_TYPE_ERROR_INDEX); |
| + 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
|
| + UndefinedConstant(), SmiConstant(message), args...); |
| + } |
| + |
| protected: |
| void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3, |
| Label* if_found, Variable* var_name_index, |