| 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 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2220 FINAL_HEAP_OBJECT_IMPLEMENTATION(Namespace, Object); | 2220 FINAL_HEAP_OBJECT_IMPLEMENTATION(Namespace, Object); |
| 2221 friend class Class; | 2221 friend class Class; |
| 2222 }; | 2222 }; |
| 2223 | 2223 |
| 2224 | 2224 |
| 2225 class Instructions : public Object { | 2225 class Instructions : public Object { |
| 2226 public: | 2226 public: |
| 2227 intptr_t size() const { return raw_ptr()->size_; } // Excludes HeaderSize(). | 2227 intptr_t size() const { return raw_ptr()->size_; } // Excludes HeaderSize(). |
| 2228 RawCode* code() const { return raw_ptr()->code_; } | 2228 RawCode* code() const { return raw_ptr()->code_; } |
| 2229 RawArray* object_pool() const { return raw_ptr()->object_pool_; } | 2229 RawArray* object_pool() const { return raw_ptr()->object_pool_; } |
| 2230 static intptr_t object_pool_offset() { |
| 2231 return OFFSET_OF(RawInstructions, object_pool_); |
| 2232 } |
| 2230 | 2233 |
| 2231 uword EntryPoint() const { | 2234 uword EntryPoint() const { |
| 2232 return reinterpret_cast<uword>(raw_ptr()) + HeaderSize(); | 2235 return reinterpret_cast<uword>(raw_ptr()) + HeaderSize(); |
| 2233 } | 2236 } |
| 2234 | 2237 |
| 2235 static const intptr_t kMaxElements = (kIntptrMax - | 2238 static const intptr_t kMaxElements = (kIntptrMax - |
| 2236 (sizeof(RawInstructions) + | 2239 (sizeof(RawInstructions) + |
| 2237 sizeof(RawObject) + | 2240 sizeof(RawObject) + |
| 2238 (2 * OS::kMaxPreferredCodeAlignment))); | 2241 (2 * OS::kMaxPreferredCodeAlignment))); |
| 2239 | 2242 |
| (...skipping 4314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6554 | 6557 |
| 6555 | 6558 |
| 6556 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6559 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6557 intptr_t index) { | 6560 intptr_t index) { |
| 6558 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6561 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6559 } | 6562 } |
| 6560 | 6563 |
| 6561 } // namespace dart | 6564 } // namespace dart |
| 6562 | 6565 |
| 6563 #endif // VM_OBJECT_H_ | 6566 #endif // VM_OBJECT_H_ |
| OLD | NEW |