| 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 void Init(Isolate* isolate); | 313 static RawError* 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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1657 static RawString* CheckForDuplicateDefinition(); | 1657 static RawString* CheckForDuplicateDefinition(); |
| 1658 static bool IsKeyUsed(intptr_t key); | 1658 static bool IsKeyUsed(intptr_t key); |
| 1659 | 1659 |
| 1660 static void InitCoreLibrary(Isolate* isolate); | 1660 static void InitCoreLibrary(Isolate* isolate); |
| 1661 static RawLibrary* CoreLibrary(); | 1661 static RawLibrary* CoreLibrary(); |
| 1662 static RawLibrary* CoreImplLibrary(); | 1662 static RawLibrary* CoreImplLibrary(); |
| 1663 static void InitNativeWrappersLibrary(Isolate* isolate); | 1663 static void InitNativeWrappersLibrary(Isolate* isolate); |
| 1664 static RawLibrary* NativeWrappersLibrary(); | 1664 static RawLibrary* NativeWrappersLibrary(); |
| 1665 | 1665 |
| 1666 // Eagerly compile all classes and functions in the library. | 1666 // Eagerly compile all classes and functions in the library. |
| 1667 static void CompileAll(); | 1667 static RawError* CompileAll(); |
| 1668 | 1668 |
| 1669 private: | 1669 private: |
| 1670 static const int kInitialImportsCapacity = 4; | 1670 static const int kInitialImportsCapacity = 4; |
| 1671 static const int kImportsCapacityIncrement = 8; | 1671 static const int kImportsCapacityIncrement = 8; |
| 1672 static const int kInitialImportedIntoCapacity = 1; | 1672 static const int kInitialImportedIntoCapacity = 1; |
| 1673 static const int kImportedIntoCapacityIncrement = 2; | 1673 static const int kImportedIntoCapacityIncrement = 2; |
| 1674 static RawLibrary* New(); | 1674 static RawLibrary* New(); |
| 1675 | 1675 |
| 1676 intptr_t num_imports() const { return raw_ptr()->num_imports_; } | 1676 intptr_t num_imports() const { return raw_ptr()->num_imports_; } |
| 1677 void set_num_imports(intptr_t value) const { | 1677 void set_num_imports(intptr_t value) const { |
| (...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3449 } | 3449 } |
| 3450 | 3450 |
| 3451 | 3451 |
| 3452 void Context::SetAt(intptr_t index, const Instance& value) const { | 3452 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 3453 StorePointer(InstanceAddr(index), value.raw()); | 3453 StorePointer(InstanceAddr(index), value.raw()); |
| 3454 } | 3454 } |
| 3455 | 3455 |
| 3456 } // namespace dart | 3456 } // namespace dart |
| 3457 | 3457 |
| 3458 #endif // VM_OBJECT_H_ | 3458 #endif // VM_OBJECT_H_ |
| OLD | NEW |