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 4201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4212 | 4212 |
4213 // New is a private method as RawInstruction and RawCode objects should | 4213 // New is a private method as RawInstruction and RawCode objects should |
4214 // only be created using the Code::FinalizeCode method. This method creates | 4214 // only be created using the Code::FinalizeCode method. This method creates |
4215 // the RawInstruction and RawCode objects, sets up the pointer offsets | 4215 // the RawInstruction and RawCode objects, sets up the pointer offsets |
4216 // and links the two in a GC safe manner. | 4216 // and links the two in a GC safe manner. |
4217 static RawInstructions* New(intptr_t size, bool has_single_entry_point); | 4217 static RawInstructions* New(intptr_t size, bool has_single_entry_point); |
4218 | 4218 |
4219 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); | 4219 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); |
4220 friend class Class; | 4220 friend class Class; |
4221 friend class Code; | 4221 friend class Code; |
4222 friend class AssemblyInstructionsWriter; | 4222 friend class AssemblyImageWriter; |
4223 friend class BlobInstructionsWriter; | 4223 friend class BlobImageWriter; |
4224 }; | 4224 }; |
4225 | 4225 |
4226 | 4226 |
4227 class LocalVarDescriptors : public Object { | 4227 class LocalVarDescriptors : public Object { |
4228 public: | 4228 public: |
4229 intptr_t Length() const; | 4229 intptr_t Length() const; |
4230 | 4230 |
4231 RawString* GetName(intptr_t var_index) const; | 4231 RawString* GetName(intptr_t var_index) const; |
4232 | 4232 |
4233 void SetVar(intptr_t var_index, | 4233 void SetVar(intptr_t var_index, |
(...skipping 4715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8949 | 8949 |
8950 inline void TypeArguments::SetHash(intptr_t value) const { | 8950 inline void TypeArguments::SetHash(intptr_t value) const { |
8951 // This is only safe because we create a new Smi, which does not cause | 8951 // This is only safe because we create a new Smi, which does not cause |
8952 // heap allocation. | 8952 // heap allocation. |
8953 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8953 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8954 } | 8954 } |
8955 | 8955 |
8956 } // namespace dart | 8956 } // namespace dart |
8957 | 8957 |
8958 #endif // RUNTIME_VM_OBJECT_H_ | 8958 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |