Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: runtime/vm/object.h

Issue 10452006: Implement a heap profiler for the Dart managed heap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address final review comments Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/heap_profiler_test.cc ('k') | runtime/vm/pages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 static intptr_t InstanceSize() { return 0; } 2808 static intptr_t InstanceSize() { return 0; }
2809 2809
2810 static RawSmi* New(intptr_t value) { 2810 static RawSmi* New(intptr_t value) {
2811 word raw_smi = (value << kSmiTagShift) | kSmiTag; 2811 word raw_smi = (value << kSmiTagShift) | kSmiTag;
2812 ASSERT(ValueFromRaw(raw_smi) == value); 2812 ASSERT(ValueFromRaw(raw_smi) == value);
2813 return reinterpret_cast<RawSmi*>(raw_smi); 2813 return reinterpret_cast<RawSmi*>(raw_smi);
2814 } 2814 }
2815 2815
2816 static RawClass* Class(); 2816 static RawClass* Class();
2817 2817
2818 static intptr_t Value(RawSmi* raw_smi) { 2818 static intptr_t Value(const RawSmi* raw_smi) {
2819 return ValueFromRaw(reinterpret_cast<uword>(raw_smi)); 2819 return ValueFromRaw(reinterpret_cast<uword>(raw_smi));
2820 } 2820 }
2821 2821
2822 static intptr_t RawValue(intptr_t value) { 2822 static intptr_t RawValue(intptr_t value) {
2823 return reinterpret_cast<intptr_t>(New(value)); 2823 return reinterpret_cast<intptr_t>(New(value));
2824 } 2824 }
2825 2825
2826 static bool IsValid(intptr_t value) { 2826 static bool IsValid(intptr_t value) {
2827 return (value >= kMinValue) && (value <= kMaxValue); 2827 return (value >= kMinValue) && (value <= kMaxValue);
2828 } 2828 }
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after
4975 } 4975 }
4976 4976
4977 4977
4978 intptr_t Stackmap::SizeInBits() const { 4978 intptr_t Stackmap::SizeInBits() const {
4979 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 4979 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
4980 } 4980 }
4981 4981
4982 } // namespace dart 4982 } // namespace dart
4983 4983
4984 #endif // VM_OBJECT_H_ 4984 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/heap_profiler_test.cc ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698