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

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

Issue 2362083002: [modules] Do basic linking. (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
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 7943 matching lines...) Expand 10 before | Expand all | Expand 10 after
7954 Object* ModuleInfoEntry::export_name() const { return get(kExportNameIndex); } 7954 Object* ModuleInfoEntry::export_name() const { return get(kExportNameIndex); }
7955 7955
7956 Object* ModuleInfoEntry::local_name() const { return get(kLocalNameIndex); } 7956 Object* ModuleInfoEntry::local_name() const { return get(kLocalNameIndex); }
7957 7957
7958 Object* ModuleInfoEntry::import_name() const { return get(kImportNameIndex); } 7958 Object* ModuleInfoEntry::import_name() const { return get(kImportNameIndex); }
7959 7959
7960 Object* ModuleInfoEntry::module_request() const { 7960 Object* ModuleInfoEntry::module_request() const {
7961 return get(kModuleRequestIndex); 7961 return get(kModuleRequestIndex);
7962 } 7962 }
7963 7963
7964 ModuleInfo* Module::info() const {
7965 DisallowHeapAllocation no_gc;
7966 SharedFunctionInfo* shared;
7967 if (code()->IsSharedFunctionInfo()) {
7968 shared = SharedFunctionInfo::cast(code());
7969 } else {
7970 shared = JSFunction::cast(code())->shared();
7971 }
7972 return shared->scope_info()->ModuleDescriptorInfo();
7973 }
7974
7964 FixedArray* ModuleInfo::module_requests() const { 7975 FixedArray* ModuleInfo::module_requests() const {
7965 return FixedArray::cast(get(kModuleRequestsIndex)); 7976 return FixedArray::cast(get(kModuleRequestsIndex));
7966 } 7977 }
7967 7978
7968 FixedArray* ModuleInfo::special_exports() const { 7979 FixedArray* ModuleInfo::special_exports() const {
7969 return FixedArray::cast(get(kSpecialExportsIndex)); 7980 return FixedArray::cast(get(kSpecialExportsIndex));
7970 } 7981 }
7971 7982
7972 FixedArray* ModuleInfo::regular_exports() const { 7983 FixedArray* ModuleInfo::regular_exports() const {
7973 return FixedArray::cast(get(kRegularExportsIndex)); 7984 return FixedArray::cast(get(kRegularExportsIndex));
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
8324 #undef WRITE_INT64_FIELD 8335 #undef WRITE_INT64_FIELD
8325 #undef READ_BYTE_FIELD 8336 #undef READ_BYTE_FIELD
8326 #undef WRITE_BYTE_FIELD 8337 #undef WRITE_BYTE_FIELD
8327 #undef NOBARRIER_READ_BYTE_FIELD 8338 #undef NOBARRIER_READ_BYTE_FIELD
8328 #undef NOBARRIER_WRITE_BYTE_FIELD 8339 #undef NOBARRIER_WRITE_BYTE_FIELD
8329 8340
8330 } // namespace internal 8341 } // namespace internal
8331 } // namespace v8 8342 } // namespace v8
8332 8343
8333 #endif // V8_OBJECTS_INL_H_ 8344 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698