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 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2578 class Comments : public ZoneAllocated { | 2578 class Comments : public ZoneAllocated { |
2579 public: | 2579 public: |
2580 static Comments& New(intptr_t count); | 2580 static Comments& New(intptr_t count); |
2581 | 2581 |
2582 intptr_t Length() const; | 2582 intptr_t Length() const; |
2583 | 2583 |
2584 void SetPCOffsetAt(intptr_t idx, intptr_t pc_offset); | 2584 void SetPCOffsetAt(intptr_t idx, intptr_t pc_offset); |
2585 void SetCommentAt(intptr_t idx, const String& comment); | 2585 void SetCommentAt(intptr_t idx, const String& comment); |
2586 | 2586 |
2587 intptr_t PCOffsetAt(intptr_t idx) const; | 2587 intptr_t PCOffsetAt(intptr_t idx) const; |
2588 const String& CommentAt(intptr_t idx) const; | 2588 RawString* CommentAt(intptr_t idx) const; |
2589 | 2589 |
2590 private: | 2590 private: |
2591 explicit Comments(const Array& comments); | 2591 explicit Comments(const Array& comments); |
2592 | 2592 |
2593 // Layout of entries describing comments. | 2593 // Layout of entries describing comments. |
2594 enum { | 2594 enum { |
2595 kPCOffsetEntry = 0, // PC offset to a comment as a Smi. | 2595 kPCOffsetEntry = 0, // PC offset to a comment as a Smi. |
2596 kCommentEntry, // Comment text as a String. | 2596 kCommentEntry, // Comment text as a String. |
2597 kNumberOfEntries | 2597 kNumberOfEntries |
2598 }; | 2598 }; |
(...skipping 3640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6239 | 6239 |
6240 | 6240 |
6241 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6241 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6242 intptr_t index) { | 6242 intptr_t index) { |
6243 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6243 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6244 } | 6244 } |
6245 | 6245 |
6246 } // namespace dart | 6246 } // namespace dart |
6247 | 6247 |
6248 #endif // VM_OBJECT_H_ | 6248 #endif // VM_OBJECT_H_ |
OLD | NEW |