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 VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 static const char* GetSingletonClassName(int index); | 303 static const char* GetSingletonClassName(int index); |
304 | 304 |
305 static RawClass* CreateAndRegisterInterface(const char* cname, | 305 static RawClass* CreateAndRegisterInterface(const char* cname, |
306 const Script& script, | 306 const Script& script, |
307 const Library& lib); | 307 const Library& lib); |
308 static void RegisterClass(const Class& cls, | 308 static void RegisterClass(const Class& cls, |
309 const char* cname, | 309 const char* cname, |
310 const Script& script, | 310 const Script& script, |
311 const Library& lib); | 311 const Library& lib); |
312 | 312 |
313 static RawError* Init(Isolate* isolate); | 313 static void Init(Isolate* isolate); |
314 static void InitFromSnapshot(Isolate* isolate); | 314 static void InitFromSnapshot(Isolate* isolate); |
315 static void InitOnce(); | 315 static void InitOnce(); |
316 | 316 |
317 static intptr_t InstanceSize() { | 317 static intptr_t InstanceSize() { |
318 return RoundedAllocationSize(sizeof(RawObject)); | 318 return RoundedAllocationSize(sizeof(RawObject)); |
319 } | 319 } |
320 | 320 |
321 static const ObjectKind kInstanceKind = kObject; | 321 static const ObjectKind kInstanceKind = kObject; |
322 | 322 |
323 enum TypeTestKind { | 323 enum TypeTestKind { |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1722 static RawString* CheckForDuplicateDefinition(); | 1722 static RawString* CheckForDuplicateDefinition(); |
1723 static bool IsKeyUsed(intptr_t key); | 1723 static bool IsKeyUsed(intptr_t key); |
1724 | 1724 |
1725 static void InitCoreLibrary(Isolate* isolate); | 1725 static void InitCoreLibrary(Isolate* isolate); |
1726 static RawLibrary* CoreLibrary(); | 1726 static RawLibrary* CoreLibrary(); |
1727 static RawLibrary* CoreImplLibrary(); | 1727 static RawLibrary* CoreImplLibrary(); |
1728 static void InitNativeWrappersLibrary(Isolate* isolate); | 1728 static void InitNativeWrappersLibrary(Isolate* isolate); |
1729 static RawLibrary* NativeWrappersLibrary(); | 1729 static RawLibrary* NativeWrappersLibrary(); |
1730 | 1730 |
1731 // Eagerly compile all classes and functions in the library. | 1731 // Eagerly compile all classes and functions in the library. |
1732 static RawError* CompileAll(); | 1732 static void CompileAll(); |
1733 | 1733 |
1734 private: | 1734 private: |
1735 static const int kInitialImportsCapacity = 4; | 1735 static const int kInitialImportsCapacity = 4; |
1736 static const int kImportsCapacityIncrement = 8; | 1736 static const int kImportsCapacityIncrement = 8; |
1737 static const int kInitialImportedIntoCapacity = 1; | 1737 static const int kInitialImportedIntoCapacity = 1; |
1738 static const int kImportedIntoCapacityIncrement = 2; | 1738 static const int kImportedIntoCapacityIncrement = 2; |
1739 static RawLibrary* New(); | 1739 static RawLibrary* New(); |
1740 | 1740 |
1741 intptr_t num_imports() const { return raw_ptr()->num_imports_; } | 1741 intptr_t num_imports() const { return raw_ptr()->num_imports_; } |
1742 void set_num_imports(intptr_t value) const { | 1742 void set_num_imports(intptr_t value) const { |
(...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3627 } | 3627 } |
3628 | 3628 |
3629 | 3629 |
3630 void Context::SetAt(intptr_t index, const Instance& value) const { | 3630 void Context::SetAt(intptr_t index, const Instance& value) const { |
3631 StorePointer(InstanceAddr(index), value.raw()); | 3631 StorePointer(InstanceAddr(index), value.raw()); |
3632 } | 3632 } |
3633 | 3633 |
3634 } // namespace dart | 3634 } // namespace dart |
3635 | 3635 |
3636 #endif // VM_OBJECT_H_ | 3636 #endif // VM_OBJECT_H_ |
OLD | NEW |