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 12 matching lines...) Expand all Loading... |
23 #include "src/handles-inl.h" | 23 #include "src/handles-inl.h" |
24 #include "src/heap/heap-inl.h" | 24 #include "src/heap/heap-inl.h" |
25 #include "src/heap/heap.h" | 25 #include "src/heap/heap.h" |
26 #include "src/isolate-inl.h" | 26 #include "src/isolate-inl.h" |
27 #include "src/isolate.h" | 27 #include "src/isolate.h" |
28 #include "src/keys.h" | 28 #include "src/keys.h" |
29 #include "src/layout-descriptor-inl.h" | 29 #include "src/layout-descriptor-inl.h" |
30 #include "src/lookup-cache-inl.h" | 30 #include "src/lookup-cache-inl.h" |
31 #include "src/lookup.h" | 31 #include "src/lookup.h" |
32 #include "src/objects.h" | 32 #include "src/objects.h" |
| 33 #include "src/objects/module-info.h" |
33 #include "src/objects/scope-info.h" | 34 #include "src/objects/scope-info.h" |
34 #include "src/property.h" | 35 #include "src/property.h" |
35 #include "src/prototype.h" | 36 #include "src/prototype.h" |
36 #include "src/transitions-inl.h" | 37 #include "src/transitions-inl.h" |
37 #include "src/type-feedback-vector-inl.h" | 38 #include "src/type-feedback-vector-inl.h" |
38 #include "src/v8memory.h" | 39 #include "src/v8memory.h" |
39 | 40 |
40 namespace v8 { | 41 namespace v8 { |
41 namespace internal { | 42 namespace internal { |
42 | 43 |
(...skipping 8053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8096 | 8097 |
8097 | 8098 |
8098 ACCESSORS(ModuleInfoEntry, export_name, Object, kExportNameOffset) | 8099 ACCESSORS(ModuleInfoEntry, export_name, Object, kExportNameOffset) |
8099 ACCESSORS(ModuleInfoEntry, local_name, Object, kLocalNameOffset) | 8100 ACCESSORS(ModuleInfoEntry, local_name, Object, kLocalNameOffset) |
8100 ACCESSORS(ModuleInfoEntry, import_name, Object, kImportNameOffset) | 8101 ACCESSORS(ModuleInfoEntry, import_name, Object, kImportNameOffset) |
8101 SMI_ACCESSORS(ModuleInfoEntry, module_request, kModuleRequestOffset) | 8102 SMI_ACCESSORS(ModuleInfoEntry, module_request, kModuleRequestOffset) |
8102 SMI_ACCESSORS(ModuleInfoEntry, cell_index, kCellIndexOffset) | 8103 SMI_ACCESSORS(ModuleInfoEntry, cell_index, kCellIndexOffset) |
8103 SMI_ACCESSORS(ModuleInfoEntry, beg_pos, kBegPosOffset) | 8104 SMI_ACCESSORS(ModuleInfoEntry, beg_pos, kBegPosOffset) |
8104 SMI_ACCESSORS(ModuleInfoEntry, end_pos, kEndPosOffset) | 8105 SMI_ACCESSORS(ModuleInfoEntry, end_pos, kEndPosOffset) |
8105 | 8106 |
8106 FixedArray* ModuleInfo::module_requests() const { | |
8107 return FixedArray::cast(get(kModuleRequestsIndex)); | |
8108 } | |
8109 | |
8110 FixedArray* ModuleInfo::special_exports() const { | |
8111 return FixedArray::cast(get(kSpecialExportsIndex)); | |
8112 } | |
8113 | |
8114 FixedArray* ModuleInfo::regular_exports() const { | |
8115 return FixedArray::cast(get(kRegularExportsIndex)); | |
8116 } | |
8117 | |
8118 FixedArray* ModuleInfo::regular_imports() const { | |
8119 return FixedArray::cast(get(kRegularImportsIndex)); | |
8120 } | |
8121 | |
8122 FixedArray* ModuleInfo::namespace_imports() const { | |
8123 return FixedArray::cast(get(kNamespaceImportsIndex)); | |
8124 } | |
8125 | |
8126 #ifdef DEBUG | |
8127 bool ModuleInfo::Equals(ModuleInfo* other) const { | |
8128 return regular_exports() == other->regular_exports() && | |
8129 regular_imports() == other->regular_imports() && | |
8130 special_exports() == other->special_exports() && | |
8131 namespace_imports() == other->namespace_imports(); | |
8132 } | |
8133 #endif | |
8134 | |
8135 void Map::ClearCodeCache(Heap* heap) { | 8107 void Map::ClearCodeCache(Heap* heap) { |
8136 // No write barrier is needed since empty_fixed_array is not in new space. | 8108 // No write barrier is needed since empty_fixed_array is not in new space. |
8137 // Please note this function is used during marking: | 8109 // Please note this function is used during marking: |
8138 // - MarkCompactCollector::MarkUnmarkedObject | 8110 // - MarkCompactCollector::MarkUnmarkedObject |
8139 // - IncrementalMarking::Step | 8111 // - IncrementalMarking::Step |
8140 WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array()); | 8112 WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array()); |
8141 } | 8113 } |
8142 | 8114 |
8143 | 8115 |
8144 int Map::SlackForArraySize(int old_size, int size_limit) { | 8116 int Map::SlackForArraySize(int old_size, int size_limit) { |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8472 #undef WRITE_INT64_FIELD | 8444 #undef WRITE_INT64_FIELD |
8473 #undef READ_BYTE_FIELD | 8445 #undef READ_BYTE_FIELD |
8474 #undef WRITE_BYTE_FIELD | 8446 #undef WRITE_BYTE_FIELD |
8475 #undef NOBARRIER_READ_BYTE_FIELD | 8447 #undef NOBARRIER_READ_BYTE_FIELD |
8476 #undef NOBARRIER_WRITE_BYTE_FIELD | 8448 #undef NOBARRIER_WRITE_BYTE_FIELD |
8477 | 8449 |
8478 } // namespace internal | 8450 } // namespace internal |
8479 } // namespace v8 | 8451 } // namespace v8 |
8480 | 8452 |
8481 #endif // V8_OBJECTS_INL_H_ | 8453 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |