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

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

Issue 15741019: Ensures that Bigints returned to Dart are all checked by Integer::AsValidInteger. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/lib/typed_data.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 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after
3912 return false; 3912 return false;
3913 } 3913 }
3914 OBJECT_IMPLEMENTATION(Number, Instance); 3914 OBJECT_IMPLEMENTATION(Number, Instance);
3915 friend class Class; 3915 friend class Class;
3916 }; 3916 };
3917 3917
3918 3918
3919 class Integer : public Number { 3919 class Integer : public Number {
3920 public: 3920 public:
3921 static RawInteger* New(const String& str, Heap::Space space = Heap::kNew); 3921 static RawInteger* New(const String& str, Heap::Space space = Heap::kNew);
3922 static RawInteger* NewFromUint64(
3923 uint64_t value, Heap::Space space = Heap::kNew);
3922 3924
3923 // Returns a canonical Integer object allocated in the old gen space. 3925 // Returns a canonical Integer object allocated in the old gen space.
3924 static RawInteger* NewCanonical(const String& str); 3926 static RawInteger* NewCanonical(const String& str);
3925 3927
3926 static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew); 3928 static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew);
3927 3929
3928 virtual double AsDoubleValue() const; 3930 virtual double AsDoubleValue() const;
3929 virtual int64_t AsInt64Value() const; 3931 virtual int64_t AsInt64Value() const;
3930 3932
3931 // Returns 0, -1 or 1. 3933 // Returns 0, -1 or 1.
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
5766 5768
5767 5769
5768 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5770 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5769 intptr_t index) { 5771 intptr_t index) {
5770 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5772 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5771 } 5773 }
5772 5774
5773 } // namespace dart 5775 } // namespace dart
5774 5776
5775 #endif // VM_OBJECT_H_ 5777 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/lib/typed_data.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698