OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_KERNEL_H_ | 5 #ifndef RUNTIME_VM_KERNEL_H_ |
6 #define RUNTIME_VM_KERNEL_H_ | 6 #define RUNTIME_VM_KERNEL_H_ |
7 | 7 |
8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 M(ClassVisitor) \ | 118 M(ClassVisitor) \ |
119 M(InitializerVisitor) \ | 119 M(InitializerVisitor) \ |
120 M(DartTypeVisitor) \ | 120 M(DartTypeVisitor) \ |
121 M(ClassReferenceVisitor) \ | 121 M(ClassReferenceVisitor) \ |
122 M(MemberReferenceVisitor) \ | 122 M(MemberReferenceVisitor) \ |
123 M(TreeVisitor) \ | 123 M(TreeVisitor) \ |
124 M(Visitor) | 124 M(Visitor) |
125 | 125 |
126 namespace dart { | 126 namespace dart { |
127 | 127 |
| 128 class Field; |
| 129 class ParsedFunction; |
| 130 class Zone; |
| 131 |
128 namespace kernel { | 132 namespace kernel { |
129 | 133 |
130 | 134 |
131 class Reader; | 135 class Reader; |
132 class TreeNode; | 136 class TreeNode; |
133 class TypeParameter; | 137 class TypeParameter; |
134 class Writer; | 138 class Writer; |
135 | 139 |
136 // Boxes a value of type `T*` and `delete`s it on destruction. | 140 // Boxes a value of type `T*` and `delete`s it on destruction. |
137 template <typename T> | 141 template <typename T> |
(...skipping 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3218 T* member = array_[index]; | 3222 T* member = array_[index]; |
3219 if (member == NULL) { | 3223 if (member == NULL) { |
3220 member = array_[index] = new IT(); | 3224 member = array_[index] = new IT(); |
3221 member->parent_ = parent; | 3225 member->parent_ = parent; |
3222 } else { | 3226 } else { |
3223 ASSERT(member->parent_ == parent); | 3227 ASSERT(member->parent_ == parent); |
3224 } | 3228 } |
3225 return IT::Cast(member); | 3229 return IT::Cast(member); |
3226 } | 3230 } |
3227 | 3231 |
| 3232 ParsedFunction* ParseStaticFieldInitializer(Zone* zone, |
| 3233 const dart::Field& field); |
| 3234 |
3228 } // namespace kernel | 3235 } // namespace kernel |
3229 | 3236 |
3230 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 3237 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
3231 intptr_t buffer_length); | 3238 intptr_t buffer_length); |
3232 | 3239 |
3233 class ByteWriter { | 3240 class ByteWriter { |
3234 public: | 3241 public: |
3235 virtual ~ByteWriter(); | 3242 virtual ~ByteWriter(); |
3236 | 3243 |
3237 virtual void WriteByte(uint8_t byte) = 0; | 3244 virtual void WriteByte(uint8_t byte) = 0; |
3238 | 3245 |
3239 virtual void WriteBytes(uint8_t* buffer, int count) = 0; | 3246 virtual void WriteBytes(uint8_t* buffer, int count) = 0; |
3240 }; | 3247 }; |
3241 | 3248 |
3242 | 3249 |
3243 void WritePrecompiledKernel(ByteWriter* out, kernel::Program* program); | 3250 void WritePrecompiledKernel(ByteWriter* out, kernel::Program* program); |
3244 | 3251 |
3245 | 3252 |
3246 } // namespace dart | 3253 } // namespace dart |
3247 | 3254 |
3248 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3255 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
3249 #endif // RUNTIME_VM_KERNEL_H_ | 3256 #endif // RUNTIME_VM_KERNEL_H_ |
OLD | NEW |