Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: src/code-stub-assembler.h

Issue 2645313003: [async-iteration] implement Async-from-Sync Iterator (Closed)
Patch Set: cleanmerge Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-async-iterator.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 05d11dca8eb99cc375c51fd24c35908be1dc7d40..52e85831c54b4070559f2df16a7bd95119b30dfe 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -692,6 +692,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* IsJSGlobalProxy(Node* object);
Node* IsJSReceiverInstanceType(Node* instance_type);
Node* IsJSReceiver(Node* object);
+ Node* IsJSReceiverMap(Node* map);
Node* IsMap(Node* object);
Node* IsCallableMap(Node* map);
Node* IsCallable(Node* object);
@@ -1003,6 +1004,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);
@@ -1258,6 +1264,16 @@ 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) {
+ STATIC_ASSERT(sizeof...(TArgs) <= 3);
+ 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,
« no previous file with comments | « src/builtins/builtins-async-iterator.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698