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

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

Issue 2368613002: [modules] Simplify treatment of empty imports. (Closed)
Patch Set: 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.h ('k') | src/parsing/parser.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 7967 matching lines...) Expand 10 before | Expand all | Expand 10 after
7978 } 7978 }
7979 7979
7980 FixedArray* ModuleInfo::regular_exports() const { 7980 FixedArray* ModuleInfo::regular_exports() const {
7981 return FixedArray::cast(get(kRegularExportsIndex)); 7981 return FixedArray::cast(get(kRegularExportsIndex));
7982 } 7982 }
7983 7983
7984 FixedArray* ModuleInfo::regular_imports() const { 7984 FixedArray* ModuleInfo::regular_imports() const {
7985 return FixedArray::cast(get(kRegularImportsIndex)); 7985 return FixedArray::cast(get(kRegularImportsIndex));
7986 } 7986 }
7987 7987
7988 FixedArray* ModuleInfo::special_imports() const { 7988 FixedArray* ModuleInfo::namespace_imports() const {
7989 return FixedArray::cast(get(kSpecialImportsIndex)); 7989 return FixedArray::cast(get(kNamespaceImportsIndex));
7990 } 7990 }
7991 7991
7992 #ifdef DEBUG 7992 #ifdef DEBUG
7993 bool ModuleInfo::Equals(ModuleInfo* other) const { 7993 bool ModuleInfo::Equals(ModuleInfo* other) const {
7994 return regular_exports() == other->regular_exports() && 7994 return regular_exports() == other->regular_exports() &&
7995 regular_imports() == other->regular_imports() && 7995 regular_imports() == other->regular_imports() &&
7996 special_exports() == other->special_exports() && 7996 special_exports() == other->special_exports() &&
7997 special_imports() == other->special_imports(); 7997 namespace_imports() == other->namespace_imports();
7998 } 7998 }
7999 #endif 7999 #endif
8000 8000
8001 void Map::ClearCodeCache(Heap* heap) { 8001 void Map::ClearCodeCache(Heap* heap) {
8002 // No write barrier is needed since empty_fixed_array is not in new space. 8002 // No write barrier is needed since empty_fixed_array is not in new space.
8003 // Please note this function is used during marking: 8003 // Please note this function is used during marking:
8004 // - MarkCompactCollector::MarkUnmarkedObject 8004 // - MarkCompactCollector::MarkUnmarkedObject
8005 // - IncrementalMarking::Step 8005 // - IncrementalMarking::Step
8006 WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array()); 8006 WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array());
8007 } 8007 }
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
8332 #undef WRITE_INT64_FIELD 8332 #undef WRITE_INT64_FIELD
8333 #undef READ_BYTE_FIELD 8333 #undef READ_BYTE_FIELD
8334 #undef WRITE_BYTE_FIELD 8334 #undef WRITE_BYTE_FIELD
8335 #undef NOBARRIER_READ_BYTE_FIELD 8335 #undef NOBARRIER_READ_BYTE_FIELD
8336 #undef NOBARRIER_WRITE_BYTE_FIELD 8336 #undef NOBARRIER_WRITE_BYTE_FIELD
8337 8337
8338 } // namespace internal 8338 } // namespace internal
8339 } // namespace v8 8339 } // namespace v8
8340 8340
8341 #endif // V8_OBJECTS_INL_H_ 8341 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698