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

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

Issue 12183014: Resubmit reverted r17962, but, for now, only report error about unfinalized (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/class_finalizer.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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // parameter types of the signature. 589 // parameter types of the signature.
590 RawFunction* signature_function() const { 590 RawFunction* signature_function() const {
591 return raw_ptr()->signature_function_; 591 return raw_ptr()->signature_function_;
592 } 592 }
593 static intptr_t signature_function_offset() { 593 static intptr_t signature_function_offset() {
594 return OFFSET_OF(RawClass, signature_function_); 594 return OFFSET_OF(RawClass, signature_function_);
595 } 595 }
596 596
597 // Return the signature type of this signature class. 597 // Return the signature type of this signature class.
598 // For example, if this class represents a signature of the form 598 // For example, if this class represents a signature of the form
599 // '<T, R>(T, [b: B, c: C]) => R', then its signature type is a parameterized 599 // 'F<T, R>(T, [b: B, c: C]) => R', then its signature type is a parameterized
600 // type with this class as the type class and type parameters 'T' and 'R' 600 // type with this class as the type class and type parameters 'T' and 'R'
601 // as its type argument vector. 601 // as its type argument vector.
602 RawType* SignatureType() const; 602 RawType* SignatureType() const;
603 603
604 RawLibrary* library() const { return raw_ptr()->library_; } 604 RawLibrary* library() const { return raw_ptr()->library_; }
605 void set_library(const Library& value) const; 605 void set_library(const Library& value) const;
606 606
607 // The type parameters (and their bounds) are specified as an array of 607 // The type parameters (and their bounds) are specified as an array of
608 // TypeParameter. 608 // TypeParameter.
609 RawTypeArguments* type_parameters() const { 609 RawTypeArguments* type_parameters() const {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 // Allocate the raw string classes. 827 // Allocate the raw string classes.
828 static RawClass* NewStringClass(intptr_t class_id); 828 static RawClass* NewStringClass(intptr_t class_id);
829 829
830 // Allocate a class representing a function signature described by 830 // Allocate a class representing a function signature described by
831 // signature_function, which must be a closure function or a signature 831 // signature_function, which must be a closure function or a signature
832 // function. 832 // function.
833 // The class may be type parameterized unless the signature_function is in a 833 // The class may be type parameterized unless the signature_function is in a
834 // static scope. In that case, the type parameters are copied from the owner 834 // static scope. In that case, the type parameters are copied from the owner
835 // class of signature_function. 835 // class of signature_function.
836 // A null signature function may be passed in and patched later. See below.
836 static RawClass* NewSignatureClass(const String& name, 837 static RawClass* NewSignatureClass(const String& name,
837 const Function& signature_function, 838 const Function& signature_function,
838 const Script& script); 839 const Script& script,
840 intptr_t token_pos);
841
842 // Patch the signature function of a signature class allocated without it.
843 void PatchSignatureFunction(const Function& signature_function) const;
839 844
840 // Return a class object corresponding to the specified kind. If 845 // Return a class object corresponding to the specified kind. If
841 // a canonicalized version of it exists then that object is returned 846 // a canonicalized version of it exists then that object is returned
842 // otherwise a new object is allocated and returned. 847 // otherwise a new object is allocated and returned.
843 static RawClass* GetClass(intptr_t class_id, bool is_signature_class); 848 static RawClass* GetClass(intptr_t class_id, bool is_signature_class);
844 849
845 private: 850 private:
846 enum { 851 enum {
847 kConstBit = 1, 852 kConstBit = 1,
848 kImplementedBit = 2, 853 kImplementedBit = 2,
(...skipping 5482 matching lines...) Expand 10 before | Expand all | Expand 10 after
6331 6336
6332 6337
6333 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6338 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6334 intptr_t index) { 6339 intptr_t index) {
6335 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6340 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6336 } 6341 }
6337 6342
6338 } // namespace dart 6343 } // namespace dart
6339 6344
6340 #endif // VM_OBJECT_H_ 6345 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698