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

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

Issue 10876100: Convert double interface into abstract class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/intermediate_language.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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 return HasResolvedTypeClass() && 864 return HasResolvedTypeClass() &&
865 Class::Handle(type_class()).IsObjectClass(); 865 Class::Handle(type_class()).IsObjectClass();
866 } 866 }
867 867
868 // Check if this type represents the 'bool' type. 868 // Check if this type represents the 'bool' type.
869 bool IsBoolType() const; 869 bool IsBoolType() const;
870 870
871 // Check if this type represents the 'int' interface. 871 // Check if this type represents the 'int' interface.
872 bool IsIntInterface() const; 872 bool IsIntInterface() const;
873 873
874 // Check if this type represents the 'double' interface. 874 // Check if this type represents the 'double' type.
875 bool IsDoubleInterface() const; 875 bool IsDoubleType() const;
876 876
877 // Check if this type represents the 'num' type. 877 // Check if this type represents the 'num' type.
878 bool IsNumberType() const; 878 bool IsNumberType() const;
879 879
880 // Check if this type represents the 'String' interface. 880 // Check if this type represents the 'String' interface.
881 bool IsStringInterface() const; 881 bool IsStringInterface() const;
882 882
883 // Check if this type represents the 'Function' type. 883 // Check if this type represents the 'Function' type.
884 bool IsFunctionType() const; 884 bool IsFunctionType() const;
885 885
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 988
989 // The 'int' interface type. 989 // The 'int' interface type.
990 static RawType* IntInterface(); 990 static RawType* IntInterface();
991 991
992 // The 'Smi' type. 992 // The 'Smi' type.
993 static RawType* SmiType(); 993 static RawType* SmiType();
994 994
995 // The 'Mint' type. 995 // The 'Mint' type.
996 static RawType* MintType(); 996 static RawType* MintType();
997 997
998 // The 'double' interface type. 998 // The 'double' type.
999 static RawType* DoubleInterface(); 999 static RawType* Double();
1000 1000
1001 // The 'num' interface type. 1001 // The 'num' interface type.
1002 static RawType* Number(); 1002 static RawType* Number();
1003 1003
1004 // The 'String' interface type. 1004 // The 'String' interface type.
1005 static RawType* StringInterface(); 1005 static RawType* StringInterface();
1006 1006
1007 // The 'Function' interface type. 1007 // The 'Function' interface type.
1008 static RawType* Function(); 1008 static RawType* Function();
1009 1009
(...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3354 } 3354 }
3355 3355
3356 static RawBigint* Allocate(intptr_t length, Heap::Space space = Heap::kNew); 3356 static RawBigint* Allocate(intptr_t length, Heap::Space space = Heap::kNew);
3357 3357
3358 HEAP_OBJECT_IMPLEMENTATION(Bigint, Integer); 3358 HEAP_OBJECT_IMPLEMENTATION(Bigint, Integer);
3359 friend class BigintOperations; 3359 friend class BigintOperations;
3360 friend class Class; 3360 friend class Class;
3361 }; 3361 };
3362 3362
3363 3363
3364 // Class Double represents class Double in corelib_impl, which implements
3365 // abstract class double in corelib.
3364 class Double : public Number { 3366 class Double : public Number {
3365 public: 3367 public:
3366 double value() const { 3368 double value() const {
3367 return raw_ptr()->value_; 3369 return raw_ptr()->value_;
3368 } 3370 }
3369 3371
3370 bool EqualsToDouble(double value) const; 3372 bool EqualsToDouble(double value) const;
3371 virtual bool Equals(const Instance& other) const; 3373 virtual bool Equals(const Instance& other) const;
3372 3374
3373 static RawDouble* New(double d, Heap::Space space = Heap::kNew); 3375 static RawDouble* New(double d, Heap::Space space = Heap::kNew);
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after
5545 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5547 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5546 return false; 5548 return false;
5547 } 5549 }
5548 } 5550 }
5549 return true; 5551 return true;
5550 } 5552 }
5551 5553
5552 } // namespace dart 5554 } // namespace dart
5553 5555
5554 #endif // VM_OBJECT_H_ 5556 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698