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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 | 1549 |
1550 static RawUnresolvedClass* New(); | 1550 static RawUnresolvedClass* New(); |
1551 | 1551 |
1552 FINAL_HEAP_OBJECT_IMPLEMENTATION(UnresolvedClass, Object); | 1552 FINAL_HEAP_OBJECT_IMPLEMENTATION(UnresolvedClass, Object); |
1553 friend class Class; | 1553 friend class Class; |
1554 }; | 1554 }; |
1555 | 1555 |
1556 | 1556 |
1557 // Classification of type genericity according to type parameter owners. | 1557 // Classification of type genericity according to type parameter owners. |
1558 enum Genericity { | 1558 enum Genericity { |
1559 kAny, // Consider type params of class and functions. | 1559 kAny, // Consider type params of current class and functions. |
1560 kClass, // Consider type params of class only. | 1560 kCurrentClass, // Consider type params of current class only. |
1561 kFunctions, // Consider type params of current and parent functions. | 1561 kFunctions, // Consider type params of current and parent functions. |
1562 kCurrentFunction, // Consider type params of current function only. | 1562 kCurrentFunction, // Consider type params of current function only. |
1563 kParentFunctions // Consider type params of parent functions only. | 1563 kParentFunctions // Consider type params of parent functions only. |
1564 }; | 1564 }; |
1565 | 1565 |
1566 | 1566 |
1567 // A TypeArguments is an array of AbstractType. | 1567 // A TypeArguments is an array of AbstractType. |
1568 class TypeArguments : public Object { | 1568 class TypeArguments : public Object { |
1569 public: | 1569 public: |
1570 // We use 30 bits for the hash code so hashes in a snapshot taken on a | 1570 // We use 30 bits for the hash code so hashes in a snapshot taken on a |
(...skipping 7398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8969 | 8969 |
8970 inline void TypeArguments::SetHash(intptr_t value) const { | 8970 inline void TypeArguments::SetHash(intptr_t value) const { |
8971 // This is only safe because we create a new Smi, which does not cause | 8971 // This is only safe because we create a new Smi, which does not cause |
8972 // heap allocation. | 8972 // heap allocation. |
8973 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8973 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8974 } | 8974 } |
8975 | 8975 |
8976 } // namespace dart | 8976 } // namespace dart |
8977 | 8977 |
8978 #endif // RUNTIME_VM_OBJECT_H_ | 8978 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |