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 2975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2986 Error* bound_error, | 2986 Error* bound_error, |
2987 Heap::Space space) const; | 2987 Heap::Space space) const; |
2988 | 2988 |
2989 FINAL_HEAP_OBJECT_IMPLEMENTATION(Function, Object); | 2989 FINAL_HEAP_OBJECT_IMPLEMENTATION(Function, Object); |
2990 friend class Class; | 2990 friend class Class; |
2991 friend class SnapshotWriter; | 2991 friend class SnapshotWriter; |
2992 friend class Parser; // For set_eval_script. | 2992 friend class Parser; // For set_eval_script. |
2993 // RawFunction::VisitFunctionPointers accesses the private constructor of | 2993 // RawFunction::VisitFunctionPointers accesses the private constructor of |
2994 // Function. | 2994 // Function. |
2995 friend class RawFunction; | 2995 friend class RawFunction; |
2996 friend class ClassFinalizer; // To reset parent_function. | |
2997 }; | 2996 }; |
2998 | 2997 |
2999 | 2998 |
3000 class ClosureData : public Object { | 2999 class ClosureData : public Object { |
3001 public: | 3000 public: |
3002 static intptr_t InstanceSize() { | 3001 static intptr_t InstanceSize() { |
3003 return RoundedAllocationSize(sizeof(RawClosureData)); | 3002 return RoundedAllocationSize(sizeof(RawClosureData)); |
3004 } | 3003 } |
3005 | 3004 |
3006 private: | 3005 private: |
(...skipping 5929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8936 | 8935 |
8937 inline void TypeArguments::SetHash(intptr_t value) const { | 8936 inline void TypeArguments::SetHash(intptr_t value) const { |
8938 // This is only safe because we create a new Smi, which does not cause | 8937 // This is only safe because we create a new Smi, which does not cause |
8939 // heap allocation. | 8938 // heap allocation. |
8940 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8939 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8941 } | 8940 } |
8942 | 8941 |
8943 } // namespace dart | 8942 } // namespace dart |
8944 | 8943 |
8945 #endif // RUNTIME_VM_OBJECT_H_ | 8944 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |