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

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: Created 8 years, 7 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
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 2783 matching lines...) Expand 10 before | Expand all | Expand 10 after
2794 static intptr_t InstanceSize() { return 0; } 2794 static intptr_t InstanceSize() { return 0; }
2795 2795
2796 static RawSmi* New(intptr_t value) { 2796 static RawSmi* New(intptr_t value) {
2797 word raw_smi = (value << kSmiTagShift) | kSmiTag; 2797 word raw_smi = (value << kSmiTagShift) | kSmiTag;
2798 ASSERT(ValueFromRaw(raw_smi) == value); 2798 ASSERT(ValueFromRaw(raw_smi) == value);
2799 return reinterpret_cast<RawSmi*>(raw_smi); 2799 return reinterpret_cast<RawSmi*>(raw_smi);
2800 } 2800 }
2801 2801
2802 static RawClass* Class(); 2802 static RawClass* Class();
2803 2803
2804 static intptr_t Value(RawSmi* raw_smi) { 2804 static intptr_t Value(const RawSmi* raw_smi) {
2805 return ValueFromRaw(reinterpret_cast<uword>(raw_smi)); 2805 return ValueFromRaw(reinterpret_cast<uword>(raw_smi));
2806 } 2806 }
2807 2807
2808 static intptr_t RawValue(intptr_t value) { 2808 static intptr_t RawValue(intptr_t value) {
2809 return reinterpret_cast<intptr_t>(New(value)); 2809 return reinterpret_cast<intptr_t>(New(value));
2810 } 2810 }
2811 2811
2812 static bool IsValid(intptr_t value) { 2812 static bool IsValid(intptr_t value) {
2813 return (value >= kMinValue) && (value <= kMaxValue); 2813 return (value >= kMinValue) && (value <= kMaxValue);
2814 } 2814 }
(...skipping 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after
4949 } 4949 }
4950 4950
4951 4951
4952 intptr_t Stackmap::SizeInBits() const { 4952 intptr_t Stackmap::SizeInBits() const {
4953 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 4953 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
4954 } 4954 }
4955 4955
4956 } // namespace dart 4956 } // namespace dart
4957 4957
4958 #endif // VM_OBJECT_H_ 4958 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698