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

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
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' interface. 868 // Check if this type represents the 'bool' interface.
869 bool IsBoolInterface() const; 869 bool IsBoolInterface() 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 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3347 } 3347 }
3348 3348
3349 static RawBigint* Allocate(intptr_t length, Heap::Space space = Heap::kNew); 3349 static RawBigint* Allocate(intptr_t length, Heap::Space space = Heap::kNew);
3350 3350
3351 HEAP_OBJECT_IMPLEMENTATION(Bigint, Integer); 3351 HEAP_OBJECT_IMPLEMENTATION(Bigint, Integer);
3352 friend class BigintOperations; 3352 friend class BigintOperations;
3353 friend class Class; 3353 friend class Class;
3354 }; 3354 };
3355 3355
3356 3356
3357 // Class Double represents class Double in corelib_impl, which implements
3358 // abstract class double in corelib.
3357 class Double : public Number { 3359 class Double : public Number {
3358 public: 3360 public:
3359 double value() const { 3361 double value() const {
3360 return raw_ptr()->value_; 3362 return raw_ptr()->value_;
3361 } 3363 }
3362 3364
3363 bool EqualsToDouble(double value) const; 3365 bool EqualsToDouble(double value) const;
3364 virtual bool Equals(const Instance& other) const; 3366 virtual bool Equals(const Instance& other) const;
3365 3367
3366 static RawDouble* New(double d, Heap::Space space = Heap::kNew); 3368 static RawDouble* New(double d, Heap::Space space = Heap::kNew);
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after
5536 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5538 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5537 return false; 5539 return false;
5538 } 5540 }
5539 } 5541 }
5540 return true; 5542 return true;
5541 } 5543 }
5542 5544
5543 } // namespace dart 5545 } // namespace dart
5544 5546
5545 #endif // VM_OBJECT_H_ 5547 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698