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

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

Issue 8585004: Support correct factory syntax in the VM as decribed in the spec. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/dart.h" 9 #include "vm/dart.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 raw_ptr()->type_arguments_instance_field_offset_ = value; 444 raw_ptr()->type_arguments_instance_field_offset_ = value;
445 } 445 }
446 446
447 // The super type of this class, Object type if not explicitly specified. 447 // The super type of this class, Object type if not explicitly specified.
448 RawType* super_type() const { return raw_ptr()->super_type_; } 448 RawType* super_type() const { return raw_ptr()->super_type_; }
449 void set_super_type(const Type& value) const; 449 void set_super_type(const Type& value) const;
450 450
451 // Asserts that the class of the super type has been resolved. 451 // Asserts that the class of the super type has been resolved.
452 RawClass* SuperClass() const; 452 RawClass* SuperClass() const;
453 453
454 // The factory type of this interface, null if not specified. 454 // Return true if this interface has a factory class.
455 RawType* factory_type() const { return raw_ptr()->factory_type_; } 455 bool HasFactoryClass() const;
456 void set_factory_type(const Type& value) const;
457 456
458 // Asserts that the class of the factory type has been resolved. 457 // Return true if the factory class of this interface is resolved.
458 bool HasResolvedFactoryClass() const;
459
460 // Return the resolved factory class of this interface.
459 RawClass* FactoryClass() const; 461 RawClass* FactoryClass() const;
460 462
463 // Return the unresolved factory class of this interface.
464 RawUnresolvedClass* UnresolvedFactoryClass() const;
465
466 // Set the resolved or unresolved factory class of this interface.
467 void set_factory_class(const Object& value) const;
468
461 // Interfaces is an array of Types. 469 // Interfaces is an array of Types.
462 RawArray* interfaces() const { return raw_ptr()->interfaces_; } 470 RawArray* interfaces() const { return raw_ptr()->interfaces_; }
463 void set_interfaces(const Array& value) const; 471 void set_interfaces(const Array& value) const;
464 472
465 RawArray* functions_cache() const { return raw_ptr()->functions_cache_; } 473 RawArray* functions_cache() const { return raw_ptr()->functions_cache_; }
466 void set_functions_cache(const Array& value) const; 474 void set_functions_cache(const Array& value) const;
467 475
468 static intptr_t functions_cache_offset() { 476 static intptr_t functions_cache_offset() {
469 return OFFSET_OF(RawClass, functions_cache_); 477 return OFFSET_OF(RawClass, functions_cache_);
470 } 478 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 645
638 646
639 // Unresolved class is used for storing unresolved names which will be resolved 647 // Unresolved class is used for storing unresolved names which will be resolved
640 // to a class after all classes have been loaded and finalized. 648 // to a class after all classes have been loaded and finalized.
641 class UnresolvedClass : public Object { 649 class UnresolvedClass : public Object {
642 public: 650 public:
643 RawString* qualifier() const { return raw_ptr()->qualifier_; } 651 RawString* qualifier() const { return raw_ptr()->qualifier_; }
644 RawString* ident() const { return raw_ptr()->ident_; } 652 RawString* ident() const { return raw_ptr()->ident_; }
645 intptr_t token_index() const { return raw_ptr()->token_index_; } 653 intptr_t token_index() const { return raw_ptr()->token_index_; }
646 654
655 RawClass* factory_signature_class() const {
656 return raw_ptr()->factory_signature_class_;
657 }
658 void set_factory_signature_class(const Class& value) const;
659
647 RawString* Name() const; 660 RawString* Name() const;
648 661
649 static intptr_t InstanceSize() { 662 static intptr_t InstanceSize() {
650 return RoundedAllocationSize(sizeof(RawUnresolvedClass)); 663 return RoundedAllocationSize(sizeof(RawUnresolvedClass));
651 } 664 }
652 static RawUnresolvedClass* New(intptr_t token_index, 665 static RawUnresolvedClass* New(intptr_t token_index,
653 const String& qualifier, 666 const String& qualifier,
654 const String& ident); 667 const String& ident);
655 668
656 private: 669 private:
(...skipping 2355 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 } 3025 }
3013 3026
3014 3027
3015 void Context::SetAt(intptr_t index, const Instance& value) const { 3028 void Context::SetAt(intptr_t index, const Instance& value) const {
3016 StorePointer(InstanceAddr(index), value.raw()); 3029 StorePointer(InstanceAddr(index), value.raw());
3017 } 3030 }
3018 3031
3019 } // namespace dart 3032 } // namespace dart
3020 3033
3021 #endif // VM_OBJECT_H_ 3034 #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