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 17 matching lines...) Expand all Loading... |
28 #undef DEFINE_FORWARD_DECLARATION | 28 #undef DEFINE_FORWARD_DECLARATION |
29 class Api; | 29 class Api; |
30 class ArgumentsDescriptor; | 30 class ArgumentsDescriptor; |
31 class Assembler; | 31 class Assembler; |
32 class Closure; | 32 class Closure; |
33 class Code; | 33 class Code; |
34 class DeoptInstr; | 34 class DeoptInstr; |
35 class FinalizablePersistentHandle; | 35 class FinalizablePersistentHandle; |
36 class LocalScope; | 36 class LocalScope; |
37 class ReusableHandleScope; | 37 class ReusableHandleScope; |
| 38 class ReusableObjectHandleScope; |
38 class Symbols; | 39 class Symbols; |
39 | 40 |
40 #if defined(DEBUG) | 41 #if defined(DEBUG) |
41 #define CHECK_HANDLE() CheckHandle(); | 42 #define CHECK_HANDLE() CheckHandle(); |
42 #else | 43 #else |
43 #define CHECK_HANDLE() | 44 #define CHECK_HANDLE() |
44 #endif | 45 #endif |
45 | 46 |
46 #define BASE_OBJECT_IMPLEMENTATION(object, super) \ | 47 #define BASE_OBJECT_IMPLEMENTATION(object, super) \ |
47 public: /* NOLINT */ \ | 48 public: /* NOLINT */ \ |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 friend void ClassTable::Register(const Class& cls); | 617 friend void ClassTable::Register(const Class& cls); |
617 friend void RawObject::Validate(Isolate* isolate) const; | 618 friend void RawObject::Validate(Isolate* isolate) const; |
618 friend class Closure; | 619 friend class Closure; |
619 friend class SnapshotReader; | 620 friend class SnapshotReader; |
620 friend class OneByteString; | 621 friend class OneByteString; |
621 friend class TwoByteString; | 622 friend class TwoByteString; |
622 friend class ExternalOneByteString; | 623 friend class ExternalOneByteString; |
623 friend class ExternalTwoByteString; | 624 friend class ExternalTwoByteString; |
624 friend class Isolate; | 625 friend class Isolate; |
625 friend class ReusableHandleScope; | 626 friend class ReusableHandleScope; |
| 627 friend class ReusableObjectHandleScope; |
626 | 628 |
627 DISALLOW_ALLOCATION(); | 629 DISALLOW_ALLOCATION(); |
628 DISALLOW_COPY_AND_ASSIGN(Object); | 630 DISALLOW_COPY_AND_ASSIGN(Object); |
629 }; | 631 }; |
630 | 632 |
631 | 633 |
632 class Class : public Object { | 634 class Class : public Object { |
633 public: | 635 public: |
634 intptr_t instance_size() const { | 636 intptr_t instance_size() const { |
635 ASSERT(is_finalized() || is_prefinalized()); | 637 ASSERT(is_finalized() || is_prefinalized()); |
(...skipping 5420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6056 | 6058 |
6057 | 6059 |
6058 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6060 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6059 intptr_t index) { | 6061 intptr_t index) { |
6060 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6062 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6061 } | 6063 } |
6062 | 6064 |
6063 } // namespace dart | 6065 } // namespace dart |
6064 | 6066 |
6065 #endif // VM_OBJECT_H_ | 6067 #endif // VM_OBJECT_H_ |
OLD | NEW |