Chromium Code Reviews| Index: src/code-stub-assembler.h |
| diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
| index c68ff947ff7eaf2393f02b80f0eee27a09280ced..a59b25b610dcac6e12d000d4ce7e5d7282788188 100644 |
| --- a/src/code-stub-assembler.h |
| +++ b/src/code-stub-assembler.h |
| @@ -992,6 +992,11 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
| Label* if_found, Variable* var_value, |
| Label* if_not_found, Label* if_bailout); |
| + Node* GetProperty(Node* context, Node* receiver, Handle<Name> name) { |
| + return CallStub(CodeFactory::GetProperty(isolate()), context, receiver, |
| + HeapConstant(name)); |
| + } |
| + |
| void LoadPropertyFromFastObject(Node* object, Node* map, Node* descriptors, |
| Node* name_index, Variable* var_details, |
| Variable* var_value); |
| @@ -1241,6 +1246,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, |
|
jgruber
2017/02/17 12:28:23
Great to have this and the above. We should update
|
| + TArgs... args) { |
|
jgruber
2017/02/17 12:28:23
The MakeTypeError builtin can only handle up to 3
caitp
2017/02/17 14:56:10
Done.
|
| + Node* const make_type_error = LoadContextElement( |
| + LoadNativeContext(context), Context::MAKE_TYPE_ERROR_INDEX); |
| + return CallJS(CodeFactory::Call(isolate()), context, make_type_error, |
| + UndefinedConstant(), SmiConstant(message), args...); |
| + } |
| + |
| protected: |
| void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3, |
| Label* if_found, Variable* var_name_index, |