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

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

Issue 16664003: Improvements to 53-bit overflow checking. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 3994 matching lines...) Expand 10 before | Expand all | Expand 10 after
4005 4005
4006 // Returns 0, -1 or 1. 4006 // Returns 0, -1 or 1.
4007 virtual int CompareWith(const Integer& other) const; 4007 virtual int CompareWith(const Integer& other) const;
4008 4008
4009 // Return the most compact presentation of an integer. 4009 // Return the most compact presentation of an integer.
4010 RawInteger* AsValidInteger() const; 4010 RawInteger* AsValidInteger() const;
4011 4011
4012 RawInteger* ArithmeticOp(Token::Kind operation, const Integer& other) const; 4012 RawInteger* ArithmeticOp(Token::Kind operation, const Integer& other) const;
4013 RawInteger* BitOp(Token::Kind operation, const Integer& other) const; 4013 RawInteger* BitOp(Token::Kind operation, const Integer& other) const;
4014 4014
4015 bool CheckFiftyThreeBitOverflow() const;
srdjan 2013/06/07 21:03:42 Add comment: returns true if overflow.
zra 2013/06/07 21:28:28 Done.
4016
4015 private: 4017 private:
4016 // Return an integer in the form of a RawBigint. 4018 // Return an integer in the form of a RawBigint.
4017 RawBigint* AsBigint() const; 4019 RawBigint* AsBigint() const;
4018 4020
4019 OBJECT_IMPLEMENTATION(Integer, Number); 4021 OBJECT_IMPLEMENTATION(Integer, Number);
4020 friend class Class; 4022 friend class Class;
4021 }; 4023 };
4022 4024
4023 4025
4024 class Smi : public Integer { 4026 class Smi : public Integer {
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after
5841 5843
5842 5844
5843 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5845 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5844 intptr_t index) { 5846 intptr_t index) {
5845 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5847 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5846 } 5848 }
5847 5849
5848 } // namespace dart 5850 } // namespace dart
5849 5851
5850 #endif // VM_OBJECT_H_ 5852 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698