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

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

Issue 8375033: Fix wrong detection of duplicate definition of function types (issue 187). (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 | « no previous file | 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 bool IsVoidClass() const { return raw() == Object::void_class(); } 474 bool IsVoidClass() const { return raw() == Object::void_class(); }
475 475
476 // Check if this class represents the 'Object' class. 476 // Check if this class represents the 'Object' class.
477 bool IsObjectClass() const; 477 bool IsObjectClass() const;
478 478
479 // Check if this class represents a signature class. 479 // Check if this class represents a signature class.
480 bool IsSignatureClass() const { 480 bool IsSignatureClass() const {
481 return signature_function() != Object::null(); 481 return signature_function() != Object::null();
482 } 482 }
483 483
484 // Check if this class represents a canonical signature class, i.e. not an
485 // alias as defined in a typedef.
486 bool IsCanonicalSignatureClass() const;
487
484 // Check the "more specific than" relationship. 488 // Check the "more specific than" relationship.
485 bool IsMoreSpecificThan(const TypeArguments& type_arguments, 489 bool IsMoreSpecificThan(const TypeArguments& type_arguments,
486 const Class& other, 490 const Class& other,
487 const TypeArguments& other_type_arguments) const; 491 const TypeArguments& other_type_arguments) const;
488 492
489 // Check the subtype relationship. 493 // Check the subtype relationship.
490 bool IsSubtypeOf(const TypeArguments& type_arguments, 494 bool IsSubtypeOf(const TypeArguments& type_arguments,
491 const Class& other, 495 const Class& other,
492 const TypeArguments& other_type_arguments) const { 496 const TypeArguments& other_type_arguments) const {
493 return TestType(kIsSubtypeOf, 497 return TestType(kIsSubtypeOf,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 int num_fields); 586 int num_fields);
583 587
584 // Allocate a class representing a function signature described by 588 // Allocate a class representing a function signature described by
585 // signature_function, which must be a closure function or a signature 589 // signature_function, which must be a closure function or a signature
586 // function. 590 // function.
587 // The class may be type parameterized unless the signature_function is in a 591 // The class may be type parameterized unless the signature_function is in a
588 // static scope. In that case, the type parameters are copied from the owner 592 // static scope. In that case, the type parameters are copied from the owner
589 // class of signature_function. 593 // class of signature_function.
590 static RawClass* NewSignatureClass(const String& name, 594 static RawClass* NewSignatureClass(const String& name,
591 const Function& signature_function, 595 const Function& signature_function,
592 const Script& script, 596 const Script& script);
593 intptr_t token_index);
594 597
595 // Return a class object corresponding to the specified kind. If 598 // Return a class object corresponding to the specified kind. If
596 // a canonicalized version of it exists then that object is returned 599 // a canonicalized version of it exists then that object is returned
597 // otherwise a new object is allocated and returned. 600 // otherwise a new object is allocated and returned.
598 static RawClass* GetClass(ObjectKind kind); 601 static RawClass* GetClass(ObjectKind kind);
599 602
600 private: 603 private:
601 void set_name(const String& value) const; 604 void set_name(const String& value) const;
602 void set_script(const Script& value) const; 605 void set_script(const Script& value) const;
603 void set_signature_function(const Function& value) const; 606 void set_signature_function(const Function& value) const;
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 } 2960 }
2958 2961
2959 2962
2960 void Context::SetAt(intptr_t index, const Instance& value) const { 2963 void Context::SetAt(intptr_t index, const Instance& value) const {
2961 StorePointer(InstanceAddr(index), value.raw()); 2964 StorePointer(InstanceAddr(index), value.raw());
2962 } 2965 }
2963 2966
2964 } // namespace dart 2967 } // namespace dart
2965 2968
2966 #endif // VM_OBJECT_H_ 2969 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698