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

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

Issue 211283004: Support Types in instance-ref/instance-view (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 9 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/isolate.cc ('k') | runtime/vm/object.cc » ('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 4057 matching lines...) Expand 10 before | Expand all | Expand 10 after
4068 // length. 4068 // length.
4069 virtual const char* ToUserCString(intptr_t max_len = 40, 4069 virtual const char* ToUserCString(intptr_t max_len = 40,
4070 intptr_t nesting = 0) const; 4070 intptr_t nesting = 0) const;
4071 4071
4072 static intptr_t InstanceSize() { 4072 static intptr_t InstanceSize() {
4073 return RoundedAllocationSize(sizeof(RawInstance)); 4073 return RoundedAllocationSize(sizeof(RawInstance));
4074 } 4074 }
4075 4075
4076 static RawInstance* New(const Class& cls, Heap::Space space = Heap::kNew); 4076 static RawInstance* New(const Class& cls, Heap::Space space = Heap::kNew);
4077 4077
4078 protected:
4079 virtual void PrintSharedInstanceJSON(JSONObject* jsobj, bool ref) const;
4080
4078 private: 4081 private:
4079 RawObject** FieldAddrAtOffset(intptr_t offset) const { 4082 RawObject** FieldAddrAtOffset(intptr_t offset) const {
4080 ASSERT(IsValidFieldOffset(offset)); 4083 ASSERT(IsValidFieldOffset(offset));
4081 return reinterpret_cast<RawObject**>(raw_value() - kHeapObjectTag + offset); 4084 return reinterpret_cast<RawObject**>(raw_value() - kHeapObjectTag + offset);
4082 } 4085 }
4083 RawObject** FieldAddr(const Field& field) const { 4086 RawObject** FieldAddr(const Field& field) const {
4084 return FieldAddrAtOffset(field.Offset()); 4087 return FieldAddrAtOffset(field.Offset());
4085 } 4088 }
4086 RawObject** NativeFieldsAddr() const { 4089 RawObject** NativeFieldsAddr() const {
4087 return FieldAddrAtOffset(sizeof(RawObject)); 4090 return FieldAddrAtOffset(sizeof(RawObject));
(...skipping 2668 matching lines...) Expand 10 before | Expand all | Expand 10 after
6756 6759
6757 6760
6758 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6761 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6759 intptr_t index) { 6762 intptr_t index) {
6760 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6763 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6761 } 6764 }
6762 6765
6763 } // namespace dart 6766 } // namespace dart
6764 6767
6765 #endif // VM_OBJECT_H_ 6768 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698