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

Side by Side Diff: src/objects-inl.h

Issue 2407423002: [modules] Implement @@iterator on namespace objects. (Closed)
Patch Set: Rename kSize to kHeadersize again. Created 4 years, 2 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/objects-debug.cc ('k') | src/objects-printer.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 TYPE_CHECKER(JSSetIterator, JS_SET_ITERATOR_TYPE) 695 TYPE_CHECKER(JSSetIterator, JS_SET_ITERATOR_TYPE)
696 TYPE_CHECKER(JSMapIterator, JS_MAP_ITERATOR_TYPE) 696 TYPE_CHECKER(JSMapIterator, JS_MAP_ITERATOR_TYPE)
697 TYPE_CHECKER(JSWeakMap, JS_WEAK_MAP_TYPE) 697 TYPE_CHECKER(JSWeakMap, JS_WEAK_MAP_TYPE)
698 TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE) 698 TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE)
699 TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE) 699 TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE)
700 TYPE_CHECKER(Map, MAP_TYPE) 700 TYPE_CHECKER(Map, MAP_TYPE)
701 TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE) 701 TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE)
702 TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE) 702 TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE)
703 TYPE_CHECKER(TransitionArray, TRANSITION_ARRAY_TYPE) 703 TYPE_CHECKER(TransitionArray, TRANSITION_ARRAY_TYPE)
704 TYPE_CHECKER(JSStringIterator, JS_STRING_ITERATOR_TYPE) 704 TYPE_CHECKER(JSStringIterator, JS_STRING_ITERATOR_TYPE)
705 TYPE_CHECKER(JSFixedArrayIterator, JS_FIXED_ARRAY_ITERATOR_TYPE)
705 706
706 bool HeapObject::IsJSWeakCollection() const { 707 bool HeapObject::IsJSWeakCollection() const {
707 return IsJSWeakMap() || IsJSWeakSet(); 708 return IsJSWeakMap() || IsJSWeakSet();
708 } 709 }
709 710
710 bool HeapObject::IsJSCollection() const { return IsJSMap() || IsJSSet(); } 711 bool HeapObject::IsJSCollection() const { return IsJSMap() || IsJSSet(); }
711 712
712 bool HeapObject::IsDescriptorArray() const { return IsFixedArray(); } 713 bool HeapObject::IsDescriptorArray() const { return IsFixedArray(); }
713 714
714 bool HeapObject::IsFrameArray() const { return IsFixedArray(); } 715 bool HeapObject::IsFrameArray() const { return IsFixedArray(); }
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: 2108 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
2108 return JSObject::kHeaderSize; 2109 return JSObject::kHeaderSize;
2109 case JS_MESSAGE_OBJECT_TYPE: 2110 case JS_MESSAGE_OBJECT_TYPE:
2110 return JSMessageObject::kSize; 2111 return JSMessageObject::kSize;
2111 case JS_ARGUMENTS_TYPE: 2112 case JS_ARGUMENTS_TYPE:
2112 return JSArgumentsObject::kHeaderSize; 2113 return JSArgumentsObject::kHeaderSize;
2113 case JS_ERROR_TYPE: 2114 case JS_ERROR_TYPE:
2114 return JSObject::kHeaderSize; 2115 return JSObject::kHeaderSize;
2115 case JS_STRING_ITERATOR_TYPE: 2116 case JS_STRING_ITERATOR_TYPE:
2116 return JSStringIterator::kSize; 2117 return JSStringIterator::kSize;
2118 case JS_FIXED_ARRAY_ITERATOR_TYPE:
2119 return JSFixedArrayIterator::kHeaderSize;
2117 default: 2120 default:
2118 UNREACHABLE(); 2121 UNREACHABLE();
2119 return 0; 2122 return 0;
2120 } 2123 }
2121 } 2124 }
2122 2125
2123 2126
2124 int JSObject::GetInternalFieldCount(Map* map) { 2127 int JSObject::GetInternalFieldCount(Map* map) {
2125 int instance_size = map->instance_size(); 2128 int instance_size = map->instance_size();
2126 if (instance_size == kVariableSizeSentinel) return 0; 2129 if (instance_size == kVariableSizeSentinel) return 0;
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3276 CAST_ACCESSOR(JSDataView) 3279 CAST_ACCESSOR(JSDataView)
3277 CAST_ACCESSOR(JSDate) 3280 CAST_ACCESSOR(JSDate)
3278 CAST_ACCESSOR(JSFunction) 3281 CAST_ACCESSOR(JSFunction)
3279 CAST_ACCESSOR(JSGeneratorObject) 3282 CAST_ACCESSOR(JSGeneratorObject)
3280 CAST_ACCESSOR(JSGlobalObject) 3283 CAST_ACCESSOR(JSGlobalObject)
3281 CAST_ACCESSOR(JSGlobalProxy) 3284 CAST_ACCESSOR(JSGlobalProxy)
3282 CAST_ACCESSOR(JSMap) 3285 CAST_ACCESSOR(JSMap)
3283 CAST_ACCESSOR(JSMapIterator) 3286 CAST_ACCESSOR(JSMapIterator)
3284 CAST_ACCESSOR(JSMessageObject) 3287 CAST_ACCESSOR(JSMessageObject)
3285 CAST_ACCESSOR(JSModuleNamespace) 3288 CAST_ACCESSOR(JSModuleNamespace)
3289 CAST_ACCESSOR(JSFixedArrayIterator)
3286 CAST_ACCESSOR(JSObject) 3290 CAST_ACCESSOR(JSObject)
3287 CAST_ACCESSOR(JSProxy) 3291 CAST_ACCESSOR(JSProxy)
3288 CAST_ACCESSOR(JSReceiver) 3292 CAST_ACCESSOR(JSReceiver)
3289 CAST_ACCESSOR(JSRegExp) 3293 CAST_ACCESSOR(JSRegExp)
3290 CAST_ACCESSOR(JSSet) 3294 CAST_ACCESSOR(JSSet)
3291 CAST_ACCESSOR(JSSetIterator) 3295 CAST_ACCESSOR(JSSetIterator)
3292 CAST_ACCESSOR(JSStringIterator) 3296 CAST_ACCESSOR(JSStringIterator)
3293 CAST_ACCESSOR(JSTypedArray) 3297 CAST_ACCESSOR(JSTypedArray)
3294 CAST_ACCESSOR(JSValue) 3298 CAST_ACCESSOR(JSValue)
3295 CAST_ACCESSOR(JSWeakCollection) 3299 CAST_ACCESSOR(JSWeakCollection)
(...skipping 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after
5718 SMI_ACCESSORS(PrototypeInfo, registry_slot, kRegistrySlotOffset) 5722 SMI_ACCESSORS(PrototypeInfo, registry_slot, kRegistrySlotOffset)
5719 ACCESSORS(PrototypeInfo, validity_cell, Object, kValidityCellOffset) 5723 ACCESSORS(PrototypeInfo, validity_cell, Object, kValidityCellOffset)
5720 SMI_ACCESSORS(PrototypeInfo, bit_field, kBitFieldOffset) 5724 SMI_ACCESSORS(PrototypeInfo, bit_field, kBitFieldOffset)
5721 BOOL_ACCESSORS(PrototypeInfo, bit_field, should_be_fast_map, kShouldBeFastBit) 5725 BOOL_ACCESSORS(PrototypeInfo, bit_field, should_be_fast_map, kShouldBeFastBit)
5722 5726
5723 ACCESSORS(ContextExtension, scope_info, ScopeInfo, kScopeInfoOffset) 5727 ACCESSORS(ContextExtension, scope_info, ScopeInfo, kScopeInfoOffset)
5724 ACCESSORS(ContextExtension, extension, Object, kExtensionOffset) 5728 ACCESSORS(ContextExtension, extension, Object, kExtensionOffset)
5725 5729
5726 ACCESSORS(JSModuleNamespace, module, Module, kModuleOffset) 5730 ACCESSORS(JSModuleNamespace, module, Module, kModuleOffset)
5727 5731
5732 ACCESSORS(JSFixedArrayIterator, array, FixedArray, kArrayOffset)
5733 SMI_ACCESSORS(JSFixedArrayIterator, index, kIndexOffset)
5734 ACCESSORS(JSFixedArrayIterator, initial_next, JSFunction, kNextOffset)
5735
5728 ACCESSORS(Module, code, Object, kCodeOffset) 5736 ACCESSORS(Module, code, Object, kCodeOffset)
5729 ACCESSORS(Module, exports, ObjectHashTable, kExportsOffset) 5737 ACCESSORS(Module, exports, ObjectHashTable, kExportsOffset)
5730 ACCESSORS(Module, module_namespace, HeapObject, kModuleNamespaceOffset) 5738 ACCESSORS(Module, module_namespace, HeapObject, kModuleNamespaceOffset)
5731 ACCESSORS(Module, requested_modules, FixedArray, kRequestedModulesOffset) 5739 ACCESSORS(Module, requested_modules, FixedArray, kRequestedModulesOffset)
5732 SMI_ACCESSORS(Module, flags, kFlagsOffset) 5740 SMI_ACCESSORS(Module, flags, kFlagsOffset)
5733 BOOL_ACCESSORS(Module, flags, evaluated, kEvaluatedBit) 5741 BOOL_ACCESSORS(Module, flags, evaluated, kEvaluatedBit)
5734 SMI_ACCESSORS(Module, hash, kHashOffset) 5742 SMI_ACCESSORS(Module, hash, kHashOffset)
5735 5743
5736 SharedFunctionInfo* Module::shared() const { 5744 SharedFunctionInfo* Module::shared() const {
5737 return code()->IsSharedFunctionInfo() ? SharedFunctionInfo::cast(code()) 5745 return code()->IsSharedFunctionInfo() ? SharedFunctionInfo::cast(code())
(...skipping 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after
8341 #undef WRITE_INT64_FIELD 8349 #undef WRITE_INT64_FIELD
8342 #undef READ_BYTE_FIELD 8350 #undef READ_BYTE_FIELD
8343 #undef WRITE_BYTE_FIELD 8351 #undef WRITE_BYTE_FIELD
8344 #undef NOBARRIER_READ_BYTE_FIELD 8352 #undef NOBARRIER_READ_BYTE_FIELD
8345 #undef NOBARRIER_WRITE_BYTE_FIELD 8353 #undef NOBARRIER_WRITE_BYTE_FIELD
8346 8354
8347 } // namespace internal 8355 } // namespace internal
8348 } // namespace v8 8356 } // namespace v8
8349 8357
8350 #endif // V8_OBJECTS_INL_H_ 8358 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698