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

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

Issue 184653003: Support displaying of types in the observatory (back-end only for now): (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 RawFunction* LookupSetterFunction(const String& name) const; 927 RawFunction* LookupSetterFunction(const String& name) const;
928 RawFunction* LookupFunctionAtToken(intptr_t token_pos) const; 928 RawFunction* LookupFunctionAtToken(intptr_t token_pos) const;
929 RawField* LookupInstanceField(const String& name) const; 929 RawField* LookupInstanceField(const String& name) const;
930 RawField* LookupStaticField(const String& name) const; 930 RawField* LookupStaticField(const String& name) const;
931 RawField* LookupField(const String& name) const; 931 RawField* LookupField(const String& name) const;
932 932
933 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const; 933 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const;
934 934
935 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const; 935 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const;
936 936
937 intptr_t NumCanonicalTypes() const;
938 intptr_t FindCanonicalTypeIndex(const Type& needle) const;
939 RawType* CanonicalTypeFromIndex(intptr_t idx) const;
940
937 static intptr_t InstanceSize() { 941 static intptr_t InstanceSize() {
938 return RoundedAllocationSize(sizeof(RawClass)); 942 return RoundedAllocationSize(sizeof(RawClass));
939 } 943 }
940 944
941 bool is_implemented() const { 945 bool is_implemented() const {
942 return ImplementedBit::decode(raw_ptr()->state_bits_); 946 return ImplementedBit::decode(raw_ptr()->state_bits_);
943 } 947 }
944 void set_is_implemented() const; 948 void set_is_implemented() const;
945 949
946 bool is_abstract() const { 950 bool is_abstract() const {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 const TypeArguments& instantiator_type_arguments, 1325 const TypeArguments& instantiator_type_arguments,
1322 Error* bound_error, 1326 Error* bound_error,
1323 GrowableObjectArray* trail = NULL) const; 1327 GrowableObjectArray* trail = NULL) const;
1324 1328
1325 // Runtime instantiation with canonicalization. Not to be used during type 1329 // Runtime instantiation with canonicalization. Not to be used during type
1326 // finalization at compile time. 1330 // finalization at compile time.
1327 RawTypeArguments* InstantiateAndCanonicalizeFrom( 1331 RawTypeArguments* InstantiateAndCanonicalizeFrom(
1328 const TypeArguments& instantiator_type_arguments, 1332 const TypeArguments& instantiator_type_arguments,
1329 Error* bound_error) const; 1333 Error* bound_error) const;
1330 1334
1335 // Return true if this type argument vector has cached instantiations.
1336 bool HasInstantiations() const;
1337
1338 // Return the number of cached instantiations for this type argument vector.
1339 intptr_t NumInstantiations() const;
1340
1331 static intptr_t instantiations_offset() { 1341 static intptr_t instantiations_offset() {
1332 return OFFSET_OF(RawTypeArguments, instantiations_); 1342 return OFFSET_OF(RawTypeArguments, instantiations_);
1333 } 1343 }
1334 1344
1335 static const intptr_t kBytesPerElement = kWordSize; 1345 static const intptr_t kBytesPerElement = kWordSize;
1336 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; 1346 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
1337 1347
1338 static intptr_t length_offset() { 1348 static intptr_t length_offset() {
1339 return OFFSET_OF(RawTypeArguments, length_); 1349 return OFFSET_OF(RawTypeArguments, length_);
1340 } 1350 }
(...skipping 5339 matching lines...) Expand 10 before | Expand all | Expand 10 after
6680 6690
6681 6691
6682 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6692 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6683 intptr_t index) { 6693 intptr_t index) {
6684 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6694 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6685 } 6695 }
6686 6696
6687 } // namespace dart 6697 } // namespace dart
6688 6698
6689 #endif // VM_OBJECT_H_ 6699 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698