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 4033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4044 private: | 4044 private: |
4045 static const int kInitialImportsCapacity = 4; | 4045 static const int kInitialImportsCapacity = 4; |
4046 static const int kImportsCapacityIncrement = 8; | 4046 static const int kImportsCapacityIncrement = 8; |
4047 | 4047 |
4048 static RawLibrary* New(); | 4048 static RawLibrary* New(); |
4049 | 4049 |
4050 void set_num_imports(intptr_t value) const; | 4050 void set_num_imports(intptr_t value) const; |
4051 bool HasExports() const; | 4051 bool HasExports() const; |
4052 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } | 4052 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } |
4053 RawGrowableObjectArray* metadata() const { return raw_ptr()->metadata_; } | 4053 RawGrowableObjectArray* metadata() const { return raw_ptr()->metadata_; } |
| 4054 void set_metadata(const GrowableObjectArray& value) const; |
4054 RawArray* dictionary() const { return raw_ptr()->dictionary_; } | 4055 RawArray* dictionary() const { return raw_ptr()->dictionary_; } |
4055 void InitClassDictionary() const; | 4056 void InitClassDictionary() const; |
4056 | 4057 |
4057 RawArray* resolved_names() const { return raw_ptr()->resolved_names_; } | 4058 RawArray* resolved_names() const { return raw_ptr()->resolved_names_; } |
4058 bool LookupResolvedNamesCache(const String& name, Object* obj) const; | 4059 bool LookupResolvedNamesCache(const String& name, Object* obj) const; |
4059 void AddToResolvedNamesCache(const String& name, const Object& obj) const; | 4060 void AddToResolvedNamesCache(const String& name, const Object& obj) const; |
4060 void InitResolvedNamesCache() const; | 4061 void InitResolvedNamesCache() const; |
4061 void ClearResolvedNamesCache() const; | 4062 void ClearResolvedNamesCache() const; |
4062 void InvalidateResolvedName(const String& name) const; | 4063 void InvalidateResolvedName(const String& name) const; |
4063 void InvalidateResolvedNamesCache() const; | 4064 void InvalidateResolvedNamesCache() const; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4121 const Array& hide_names); | 4122 const Array& hide_names); |
4122 | 4123 |
4123 private: | 4124 private: |
4124 static RawNamespace* New(); | 4125 static RawNamespace* New(); |
4125 | 4126 |
4126 RawField* metadata_field() const { return raw_ptr()->metadata_field_; } | 4127 RawField* metadata_field() const { return raw_ptr()->metadata_field_; } |
4127 void set_metadata_field(const Field& value) const; | 4128 void set_metadata_field(const Field& value) const; |
4128 | 4129 |
4129 FINAL_HEAP_OBJECT_IMPLEMENTATION(Namespace, Object); | 4130 FINAL_HEAP_OBJECT_IMPLEMENTATION(Namespace, Object); |
4130 friend class Class; | 4131 friend class Class; |
| 4132 friend class Precompiler; |
4131 }; | 4133 }; |
4132 | 4134 |
4133 // ObjectPool contains constants, immediates and addresses embedded in code | 4135 // ObjectPool contains constants, immediates and addresses embedded in code |
4134 // and deoptimization infos. Each entry has an type-info associated with it | 4136 // and deoptimization infos. Each entry has an type-info associated with it |
4135 // which is stored in a typed data array (info_array). | 4137 // which is stored in a typed data array (info_array). |
4136 class ObjectPool : public Object { | 4138 class ObjectPool : public Object { |
4137 public: | 4139 public: |
4138 enum EntryType { | 4140 enum EntryType { |
4139 kTaggedObject, | 4141 kTaggedObject, |
4140 kImmediate, | 4142 kImmediate, |
(...skipping 4856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8997 | 8999 |
8998 inline void TypeArguments::SetHash(intptr_t value) const { | 9000 inline void TypeArguments::SetHash(intptr_t value) const { |
8999 // This is only safe because we create a new Smi, which does not cause | 9001 // This is only safe because we create a new Smi, which does not cause |
9000 // heap allocation. | 9002 // heap allocation. |
9001 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 9003 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
9002 } | 9004 } |
9003 | 9005 |
9004 } // namespace dart | 9006 } // namespace dart |
9005 | 9007 |
9006 #endif // RUNTIME_VM_OBJECT_H_ | 9008 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |