OLD | NEW |
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 5698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5709 | 5709 |
5710 ACCESSORS(JSModuleNamespace, module, Module, kModuleOffset) | 5710 ACCESSORS(JSModuleNamespace, module, Module, kModuleOffset) |
5711 | 5711 |
5712 ACCESSORS(Module, code, Object, kCodeOffset) | 5712 ACCESSORS(Module, code, Object, kCodeOffset) |
5713 ACCESSORS(Module, exports, ObjectHashTable, kExportsOffset) | 5713 ACCESSORS(Module, exports, ObjectHashTable, kExportsOffset) |
5714 ACCESSORS(Module, module_namespace, HeapObject, kModuleNamespaceOffset) | 5714 ACCESSORS(Module, module_namespace, HeapObject, kModuleNamespaceOffset) |
5715 ACCESSORS(Module, requested_modules, FixedArray, kRequestedModulesOffset) | 5715 ACCESSORS(Module, requested_modules, FixedArray, kRequestedModulesOffset) |
5716 SMI_ACCESSORS(Module, flags, kFlagsOffset) | 5716 SMI_ACCESSORS(Module, flags, kFlagsOffset) |
5717 BOOL_ACCESSORS(Module, flags, evaluated, kEvaluatedBit) | 5717 BOOL_ACCESSORS(Module, flags, evaluated, kEvaluatedBit) |
5718 ACCESSORS(Module, embedder_data, Object, kEmbedderDataOffset) | 5718 ACCESSORS(Module, embedder_data, Object, kEmbedderDataOffset) |
| 5719 SMI_ACCESSORS(Module, hash, kHashOffset) |
5719 | 5720 |
5720 SharedFunctionInfo* Module::shared() const { | 5721 SharedFunctionInfo* Module::shared() const { |
5721 return code()->IsSharedFunctionInfo() ? SharedFunctionInfo::cast(code()) | 5722 return code()->IsSharedFunctionInfo() ? SharedFunctionInfo::cast(code()) |
5722 : JSFunction::cast(code())->shared(); | 5723 : JSFunction::cast(code())->shared(); |
5723 } | 5724 } |
5724 | 5725 |
5725 ModuleInfo* Module::info() const { | 5726 ModuleInfo* Module::info() const { |
5726 return shared()->scope_info()->ModuleDescriptorInfo(); | 5727 return shared()->scope_info()->ModuleDescriptorInfo(); |
5727 } | 5728 } |
5728 | 5729 |
5729 uint32_t Module::Hash() const { return Symbol::cast(shared()->name())->Hash(); } | |
5730 | |
5731 ACCESSORS(AccessorPair, getter, Object, kGetterOffset) | 5730 ACCESSORS(AccessorPair, getter, Object, kGetterOffset) |
5732 ACCESSORS(AccessorPair, setter, Object, kSetterOffset) | 5731 ACCESSORS(AccessorPair, setter, Object, kSetterOffset) |
5733 | 5732 |
5734 ACCESSORS(AccessCheckInfo, callback, Object, kCallbackOffset) | 5733 ACCESSORS(AccessCheckInfo, callback, Object, kCallbackOffset) |
5735 ACCESSORS(AccessCheckInfo, named_interceptor, Object, kNamedInterceptorOffset) | 5734 ACCESSORS(AccessCheckInfo, named_interceptor, Object, kNamedInterceptorOffset) |
5736 ACCESSORS(AccessCheckInfo, indexed_interceptor, Object, | 5735 ACCESSORS(AccessCheckInfo, indexed_interceptor, Object, |
5737 kIndexedInterceptorOffset) | 5736 kIndexedInterceptorOffset) |
5738 ACCESSORS(AccessCheckInfo, data, Object, kDataOffset) | 5737 ACCESSORS(AccessCheckInfo, data, Object, kDataOffset) |
5739 | 5738 |
5740 ACCESSORS(InterceptorInfo, getter, Object, kGetterOffset) | 5739 ACCESSORS(InterceptorInfo, getter, Object, kGetterOffset) |
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8315 #undef WRITE_INT64_FIELD | 8314 #undef WRITE_INT64_FIELD |
8316 #undef READ_BYTE_FIELD | 8315 #undef READ_BYTE_FIELD |
8317 #undef WRITE_BYTE_FIELD | 8316 #undef WRITE_BYTE_FIELD |
8318 #undef NOBARRIER_READ_BYTE_FIELD | 8317 #undef NOBARRIER_READ_BYTE_FIELD |
8319 #undef NOBARRIER_WRITE_BYTE_FIELD | 8318 #undef NOBARRIER_WRITE_BYTE_FIELD |
8320 | 8319 |
8321 } // namespace internal | 8320 } // namespace internal |
8322 } // namespace v8 | 8321 } // namespace v8 |
8323 | 8322 |
8324 #endif // V8_OBJECTS_INL_H_ | 8323 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |