OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3932 static RawLibrary* New(); | 3932 static RawLibrary* New(); |
3933 | 3933 |
3934 void set_num_imports(intptr_t value) const; | 3934 void set_num_imports(intptr_t value) const; |
3935 bool HasExports() const; | 3935 bool HasExports() const; |
3936 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } | 3936 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } |
3937 RawGrowableObjectArray* metadata() const { return raw_ptr()->metadata_; } | 3937 RawGrowableObjectArray* metadata() const { return raw_ptr()->metadata_; } |
3938 RawArray* dictionary() const { return raw_ptr()->dictionary_; } | 3938 RawArray* dictionary() const { return raw_ptr()->dictionary_; } |
3939 void InitClassDictionary() const; | 3939 void InitClassDictionary() const; |
3940 | 3940 |
3941 RawArray* resolved_names() const { return raw_ptr()->resolved_names_; } | 3941 RawArray* resolved_names() const { return raw_ptr()->resolved_names_; } |
3942 void InitResolvedNamesCache(intptr_t size) const; | |
3943 void AllocateExportedNamesCache() const; | |
3944 void InitExportedNamesCache() const; | |
3945 static void InvalidateExportedNamesCaches(); | |
3946 bool LookupResolvedNamesCache(const String& name, Object* obj) const; | 3942 bool LookupResolvedNamesCache(const String& name, Object* obj) const; |
3947 void AddToResolvedNamesCache(const String& name, const Object& obj) const; | 3943 void AddToResolvedNamesCache(const String& name, const Object& obj) const; |
| 3944 void InitResolvedNamesCache() const; |
| 3945 void ClearResolvedNamesCache() const; |
3948 void InvalidateResolvedName(const String& name) const; | 3946 void InvalidateResolvedName(const String& name) const; |
3949 void InvalidateResolvedNamesCache() const; | 3947 void InvalidateResolvedNamesCache() const; |
3950 | 3948 |
3951 RawArray* exported_names() const { return raw_ptr()->exported_names_; } | 3949 RawArray* exported_names() const { return raw_ptr()->exported_names_; } |
3952 bool LookupExportedNamesCache(const String& name, Object* obj) const; | 3950 bool LookupExportedNamesCache(const String& name, Object* obj) const; |
3953 void AddToExportedNamesCache(const String& name, const Object& obj) const; | 3951 void AddToExportedNamesCache(const String& name, const Object& obj) const; |
| 3952 void InitExportedNamesCache() const; |
| 3953 void ClearExportedNamesCache() const; |
| 3954 static void InvalidateExportedNamesCaches(); |
3954 | 3955 |
3955 | 3956 |
3956 void InitImportList() const; | 3957 void InitImportList() const; |
3957 void GrowDictionary(const Array& dict, intptr_t dict_size) const; | 3958 void GrowDictionary(const Array& dict, intptr_t dict_size) const; |
3958 static RawLibrary* NewLibraryHelper(const String& url, bool import_core_lib); | 3959 static RawLibrary* NewLibraryHelper(const String& url, bool import_core_lib); |
3959 RawObject* LookupEntry(const String& name, intptr_t* index) const; | 3960 RawObject* LookupEntry(const String& name, intptr_t* index) const; |
3960 | 3961 |
3961 void AllocatePrivateKey() const; | 3962 void AllocatePrivateKey() const; |
3962 | 3963 |
3963 RawString* MakeMetadataName(const Object& obj) const; | 3964 RawString* MakeMetadataName(const Object& obj) const; |
(...skipping 5005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8969 | 8970 |
8970 inline void TypeArguments::SetHash(intptr_t value) const { | 8971 inline void TypeArguments::SetHash(intptr_t value) const { |
8971 // This is only safe because we create a new Smi, which does not cause | 8972 // This is only safe because we create a new Smi, which does not cause |
8972 // heap allocation. | 8973 // heap allocation. |
8973 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8974 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8974 } | 8975 } |
8975 | 8976 |
8976 } // namespace dart | 8977 } // namespace dart |
8977 | 8978 |
8978 #endif // RUNTIME_VM_OBJECT_H_ | 8979 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |