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 7909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7920 #undef SCOPE_INFO_FIELD_ACCESSORS | 7920 #undef SCOPE_INFO_FIELD_ACCESSORS |
7921 | 7921 |
7922 FixedArray* ModuleInfo::special_exports() const { | 7922 FixedArray* ModuleInfo::special_exports() const { |
7923 return FixedArray::cast(get(kSpecialExportsIndex)); | 7923 return FixedArray::cast(get(kSpecialExportsIndex)); |
7924 } | 7924 } |
7925 | 7925 |
7926 FixedArray* ModuleInfo::regular_exports() const { | 7926 FixedArray* ModuleInfo::regular_exports() const { |
7927 return FixedArray::cast(get(kRegularExportsIndex)); | 7927 return FixedArray::cast(get(kRegularExportsIndex)); |
7928 } | 7928 } |
7929 | 7929 |
| 7930 #ifdef DEBUG |
| 7931 bool ModuleInfo::Equals(ModuleInfo* other) const { |
| 7932 return get(kSpecialExportsIndex) == other->get(kSpecialExportsIndex) && |
| 7933 get(kRegularExportsIndex) == other->get(kRegularExportsIndex); |
| 7934 } |
| 7935 #endif |
| 7936 |
7930 void Map::ClearCodeCache(Heap* heap) { | 7937 void Map::ClearCodeCache(Heap* heap) { |
7931 // No write barrier is needed since empty_fixed_array is not in new space. | 7938 // No write barrier is needed since empty_fixed_array is not in new space. |
7932 // Please note this function is used during marking: | 7939 // Please note this function is used during marking: |
7933 // - MarkCompactCollector::MarkUnmarkedObject | 7940 // - MarkCompactCollector::MarkUnmarkedObject |
7934 // - IncrementalMarking::Step | 7941 // - IncrementalMarking::Step |
7935 WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array()); | 7942 WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array()); |
7936 } | 7943 } |
7937 | 7944 |
7938 | 7945 |
7939 int Map::SlackForArraySize(int old_size, int size_limit) { | 7946 int Map::SlackForArraySize(int old_size, int size_limit) { |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8255 #undef WRITE_INT64_FIELD | 8262 #undef WRITE_INT64_FIELD |
8256 #undef READ_BYTE_FIELD | 8263 #undef READ_BYTE_FIELD |
8257 #undef WRITE_BYTE_FIELD | 8264 #undef WRITE_BYTE_FIELD |
8258 #undef NOBARRIER_READ_BYTE_FIELD | 8265 #undef NOBARRIER_READ_BYTE_FIELD |
8259 #undef NOBARRIER_WRITE_BYTE_FIELD | 8266 #undef NOBARRIER_WRITE_BYTE_FIELD |
8260 | 8267 |
8261 } // namespace internal | 8268 } // namespace internal |
8262 } // namespace v8 | 8269 } // namespace v8 |
8263 | 8270 |
8264 #endif // V8_OBJECTS_INL_H_ | 8271 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |