| 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 <limits> | 8 #include <limits> |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3028 static void PrintHeaderString(); | 3028 static void PrintHeaderString(); |
| 3029 | 3029 |
| 3030 void PrintToJSONObject(JSONObject* jsobj) const; | 3030 void PrintToJSONObject(JSONObject* jsobj) const; |
| 3031 | 3031 |
| 3032 // We would have a VisitPointers function here to traverse the | 3032 // We would have a VisitPointers function here to traverse the |
| 3033 // pc descriptors table to visit objects if any in the table. | 3033 // pc descriptors table to visit objects if any in the table. |
| 3034 | 3034 |
| 3035 class Iterator : ValueObject { | 3035 class Iterator : ValueObject { |
| 3036 public: | 3036 public: |
| 3037 explicit Iterator(const PcDescriptors& descriptors) | 3037 explicit Iterator(const PcDescriptors& descriptors) |
| 3038 : ValueObject(), descriptors_(descriptors), current_ix_(0) {} | 3038 : descriptors_(descriptors), current_ix_(0) {} |
| 3039 | 3039 |
| 3040 // For nested iterations, starting at element after. | 3040 // For nested iterations, starting at element after. |
| 3041 explicit Iterator(const Iterator& iter) | 3041 explicit Iterator(const Iterator& iter) |
| 3042 : descriptors_(iter.descriptors_), current_ix_(iter.current_ix_) {} | 3042 : ValueObject(), |
| 3043 descriptors_(iter.descriptors_), |
| 3044 current_ix_(iter.current_ix_) {} |
| 3043 | 3045 |
| 3044 bool HasNext() { return current_ix_ < descriptors_.Length(); } | 3046 bool HasNext() { return current_ix_ < descriptors_.Length(); } |
| 3045 | 3047 |
| 3046 const RawPcDescriptors::PcDescriptorRec& Next() { | 3048 const RawPcDescriptors::PcDescriptorRec& Next() { |
| 3047 ASSERT(HasNext()); | 3049 ASSERT(HasNext()); |
| 3048 return *descriptors_.recAt(current_ix_++); | 3050 return *descriptors_.recAt(current_ix_++); |
| 3049 } | 3051 } |
| 3050 | 3052 |
| 3051 private: | 3053 private: |
| 3052 const PcDescriptors& descriptors_; | 3054 const PcDescriptors& descriptors_; |
| (...skipping 4093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7146 | 7148 |
| 7147 | 7149 |
| 7148 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7150 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7149 intptr_t index) { | 7151 intptr_t index) { |
| 7150 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7152 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7151 } | 7153 } |
| 7152 | 7154 |
| 7153 } // namespace dart | 7155 } // namespace dart |
| 7154 | 7156 |
| 7155 #endif // VM_OBJECT_H_ | 7157 #endif // VM_OBJECT_H_ |
| OLD | NEW |