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

Side by Side Diff: src/code-stub-assembler.h

Issue 2645313003: [async-iteration] implement Async-from-Sync Iterator (Closed)
Patch Set: [async-iteration] implement Async-from-Sync Iterator 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 unified diff | Download patch
OLDNEW
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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 Label* if_not_found, Label* if_bailout); 982 Label* if_not_found, Label* if_bailout);
983 983
984 // Tries to get {object}'s own {unique_name} property value. If the property 984 // Tries to get {object}'s own {unique_name} property value. If the property
985 // is an accessor then it also calls a getter. If the property is a double 985 // is an accessor then it also calls a getter. If the property is a double
986 // field it re-wraps value in an immutable heap number. 986 // field it re-wraps value in an immutable heap number.
987 void TryGetOwnProperty(Node* context, Node* receiver, Node* object, Node* map, 987 void TryGetOwnProperty(Node* context, Node* receiver, Node* object, Node* map,
988 Node* instance_type, Node* unique_name, 988 Node* instance_type, Node* unique_name,
989 Label* if_found, Variable* var_value, 989 Label* if_found, Variable* var_value,
990 Label* if_not_found, Label* if_bailout); 990 Label* if_not_found, Label* if_bailout);
991 991
992 Node* GetProperty(Node* context, Node* receiver, Handle<Name> name) {
993 return CallStub(CodeFactory::GetProperty(isolate()), context, receiver,
994 HeapConstant(name));
995 }
996
992 void LoadPropertyFromFastObject(Node* object, Node* map, Node* descriptors, 997 void LoadPropertyFromFastObject(Node* object, Node* map, Node* descriptors,
993 Node* name_index, Variable* var_details, 998 Node* name_index, Variable* var_details,
994 Variable* var_value); 999 Variable* var_value);
995 1000
996 void LoadPropertyFromNameDictionary(Node* dictionary, Node* entry, 1001 void LoadPropertyFromNameDictionary(Node* dictionary, Node* entry,
997 Variable* var_details, 1002 Variable* var_details,
998 Variable* var_value); 1003 Variable* var_value);
999 1004
1000 void LoadPropertyFromGlobalDictionary(Node* dictionary, Node* entry, 1005 void LoadPropertyFromGlobalDictionary(Node* dictionary, Node* entry,
1001 Variable* var_details, 1006 Variable* var_details,
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 Node* AllocatePromiseReactionJobInfo(Node* value, Node* tasks, 1236 Node* AllocatePromiseReactionJobInfo(Node* value, Node* tasks,
1232 Node* deferred_promise, 1237 Node* deferred_promise,
1233 Node* deferred_on_resolve, 1238 Node* deferred_on_resolve,
1234 Node* deferred_on_reject, Node* context); 1239 Node* deferred_on_reject, Node* context);
1235 1240
1236 // Support for printf-style debugging 1241 // Support for printf-style debugging
1237 void Print(const char* s); 1242 void Print(const char* s);
1238 void Print(const char* prefix, Node* tagged_value); 1243 void Print(const char* prefix, Node* tagged_value);
1239 inline void Print(Node* tagged_value) { return Print(nullptr, tagged_value); } 1244 inline void Print(Node* tagged_value) { return Print(nullptr, tagged_value); }
1240 1245
1246 template <class... TArgs>
1247 Node* MakeTypeError(MessageTemplate::Template message, Node* context,
1248 TArgs... args) {
1249 Node* const make_type_error = LoadContextElement(
1250 LoadNativeContext(context), Context::MAKE_TYPE_ERROR_INDEX);
1251 return CallJS(CodeFactory::Call(isolate()), context, make_type_error,
1252 UndefinedConstant(), SmiConstant(message), args...);
1253 }
1254
1241 protected: 1255 protected:
1242 void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3, 1256 void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3,
1243 Label* if_found, Variable* var_name_index, 1257 Label* if_found, Variable* var_name_index,
1244 Label* if_not_found); 1258 Label* if_not_found);
1245 void DescriptorLookupLinear(Node* unique_name, Node* descriptors, Node* nof, 1259 void DescriptorLookupLinear(Node* unique_name, Node* descriptors, Node* nof,
1246 Label* if_found, Variable* var_name_index, 1260 Label* if_found, Variable* var_name_index,
1247 Label* if_not_found); 1261 Label* if_not_found);
1248 void DescriptorLookupBinary(Node* unique_name, Node* descriptors, Node* nof, 1262 void DescriptorLookupBinary(Node* unique_name, Node* descriptors, Node* nof,
1249 Label* if_found, Variable* var_name_index, 1263 Label* if_found, Variable* var_name_index,
1250 Label* if_not_found); 1264 Label* if_not_found);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 } 1398 }
1385 #else 1399 #else
1386 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1400 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1387 #endif 1401 #endif
1388 1402
1389 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1403 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1390 1404
1391 } // namespace internal 1405 } // namespace internal
1392 } // namespace v8 1406 } // namespace v8
1393 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1407 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698