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

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

Issue 2645313003: [async-iteration] implement Async-from-Sync Iterator (Closed)
Patch Set: cleanmerge Created 3 years, 9 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
« no previous file with comments | « src/builtins/builtins-async-iterator.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 // JSProxy or an object with interceptors. 685 // JSProxy or an object with interceptors.
686 Node* InstanceTypeEqual(Node* instance_type, int type); 686 Node* InstanceTypeEqual(Node* instance_type, int type);
687 Node* IsSpecialReceiverMap(Node* map); 687 Node* IsSpecialReceiverMap(Node* map);
688 Node* IsSpecialReceiverInstanceType(Node* instance_type); 688 Node* IsSpecialReceiverInstanceType(Node* instance_type);
689 Node* IsStringInstanceType(Node* instance_type); 689 Node* IsStringInstanceType(Node* instance_type);
690 Node* IsString(Node* object); 690 Node* IsString(Node* object);
691 Node* IsJSObject(Node* object); 691 Node* IsJSObject(Node* object);
692 Node* IsJSGlobalProxy(Node* object); 692 Node* IsJSGlobalProxy(Node* object);
693 Node* IsJSReceiverInstanceType(Node* instance_type); 693 Node* IsJSReceiverInstanceType(Node* instance_type);
694 Node* IsJSReceiver(Node* object); 694 Node* IsJSReceiver(Node* object);
695 Node* IsJSReceiverMap(Node* map);
695 Node* IsMap(Node* object); 696 Node* IsMap(Node* object);
696 Node* IsCallableMap(Node* map); 697 Node* IsCallableMap(Node* map);
697 Node* IsCallable(Node* object); 698 Node* IsCallable(Node* object);
698 Node* IsBoolean(Node* object); 699 Node* IsBoolean(Node* object);
699 Node* IsHeapNumber(Node* object); 700 Node* IsHeapNumber(Node* object);
700 Node* IsName(Node* object); 701 Node* IsName(Node* object);
701 Node* IsSymbol(Node* object); 702 Node* IsSymbol(Node* object);
702 Node* IsPrivateSymbol(Node* object); 703 Node* IsPrivateSymbol(Node* object);
703 Node* IsJSValue(Node* object); 704 Node* IsJSValue(Node* object);
704 Node* IsJSArray(Node* object); 705 Node* IsJSArray(Node* object);
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 Label* if_not_found, Label* if_bailout); 997 Label* if_not_found, Label* if_bailout);
997 998
998 // Tries to get {object}'s own {unique_name} property value. If the property 999 // Tries to get {object}'s own {unique_name} property value. If the property
999 // is an accessor then it also calls a getter. If the property is a double 1000 // is an accessor then it also calls a getter. If the property is a double
1000 // field it re-wraps value in an immutable heap number. 1001 // field it re-wraps value in an immutable heap number.
1001 void TryGetOwnProperty(Node* context, Node* receiver, Node* object, Node* map, 1002 void TryGetOwnProperty(Node* context, Node* receiver, Node* object, Node* map,
1002 Node* instance_type, Node* unique_name, 1003 Node* instance_type, Node* unique_name,
1003 Label* if_found, Variable* var_value, 1004 Label* if_found, Variable* var_value,
1004 Label* if_not_found, Label* if_bailout); 1005 Label* if_not_found, Label* if_bailout);
1005 1006
1007 Node* GetProperty(Node* context, Node* receiver, Handle<Name> name) {
1008 return CallStub(CodeFactory::GetProperty(isolate()), context, receiver,
1009 HeapConstant(name));
1010 }
1011
1006 void LoadPropertyFromFastObject(Node* object, Node* map, Node* descriptors, 1012 void LoadPropertyFromFastObject(Node* object, Node* map, Node* descriptors,
1007 Node* name_index, Variable* var_details, 1013 Node* name_index, Variable* var_details,
1008 Variable* var_value); 1014 Variable* var_value);
1009 1015
1010 void LoadPropertyFromNameDictionary(Node* dictionary, Node* entry, 1016 void LoadPropertyFromNameDictionary(Node* dictionary, Node* entry,
1011 Variable* var_details, 1017 Variable* var_details,
1012 Variable* var_value); 1018 Variable* var_value);
1013 1019
1014 void LoadPropertyFromGlobalDictionary(Node* dictionary, Node* entry, 1020 void LoadPropertyFromGlobalDictionary(Node* dictionary, Node* entry,
1015 Variable* var_details, 1021 Variable* var_details,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 Node* MarkerIsFrameType(Node* marker_or_function, 1257 Node* MarkerIsFrameType(Node* marker_or_function,
1252 StackFrame::Type frame_type); 1258 StackFrame::Type frame_type);
1253 Node* MarkerIsNotFrameType(Node* marker_or_function, 1259 Node* MarkerIsNotFrameType(Node* marker_or_function,
1254 StackFrame::Type frame_type); 1260 StackFrame::Type frame_type);
1255 1261
1256 // Support for printf-style debugging 1262 // Support for printf-style debugging
1257 void Print(const char* s); 1263 void Print(const char* s);
1258 void Print(const char* prefix, Node* tagged_value); 1264 void Print(const char* prefix, Node* tagged_value);
1259 inline void Print(Node* tagged_value) { return Print(nullptr, tagged_value); } 1265 inline void Print(Node* tagged_value) { return Print(nullptr, tagged_value); }
1260 1266
1267 template <class... TArgs>
1268 Node* MakeTypeError(MessageTemplate::Template message, Node* context,
1269 TArgs... args) {
1270 STATIC_ASSERT(sizeof...(TArgs) <= 3);
1271 Node* const make_type_error = LoadContextElement(
1272 LoadNativeContext(context), Context::MAKE_TYPE_ERROR_INDEX);
1273 return CallJS(CodeFactory::Call(isolate()), context, make_type_error,
1274 UndefinedConstant(), SmiConstant(message), args...);
1275 }
1276
1261 protected: 1277 protected:
1262 void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3, 1278 void DescriptorLookup(Node* unique_name, Node* descriptors, Node* bitfield3,
1263 Label* if_found, Variable* var_name_index, 1279 Label* if_found, Variable* var_name_index,
1264 Label* if_not_found); 1280 Label* if_not_found);
1265 void DescriptorLookupLinear(Node* unique_name, Node* descriptors, Node* nof, 1281 void DescriptorLookupLinear(Node* unique_name, Node* descriptors, Node* nof,
1266 Label* if_found, Variable* var_name_index, 1282 Label* if_found, Variable* var_name_index,
1267 Label* if_not_found); 1283 Label* if_not_found);
1268 void DescriptorLookupBinary(Node* unique_name, Node* descriptors, Node* nof, 1284 void DescriptorLookupBinary(Node* unique_name, Node* descriptors, Node* nof,
1269 Label* if_found, Variable* var_name_index, 1285 Label* if_found, Variable* var_name_index,
1270 Label* if_not_found); 1286 Label* if_not_found);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 } 1420 }
1405 #else 1421 #else
1406 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1422 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1407 #endif 1423 #endif
1408 1424
1409 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1425 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1410 1426
1411 } // namespace internal 1427 } // namespace internal
1412 } // namespace v8 1428 } // namespace v8
1413 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1429 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« 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