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

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
« no previous file with comments | « runtime/vm/intermediate_language_x64.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 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 // Returns true if the Integer does not fit in 53 bits.
4016 bool CheckFiftyThreeBitOverflow() const;
4017
4015 private: 4018 private:
4016 // Return an integer in the form of a RawBigint. 4019 // Return an integer in the form of a RawBigint.
4017 RawBigint* AsBigint() const; 4020 RawBigint* AsBigint() const;
4018 4021
4019 OBJECT_IMPLEMENTATION(Integer, Number); 4022 OBJECT_IMPLEMENTATION(Integer, Number);
4020 friend class Class; 4023 friend class Class;
4021 }; 4024 };
4022 4025
4023 4026
4024 class Smi : public Integer { 4027 class Smi : public Integer {
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after
5841 5844
5842 5845
5843 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5846 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5844 intptr_t index) { 5847 intptr_t index) {
5845 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5848 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5846 } 5849 }
5847 5850
5848 } // namespace dart 5851 } // namespace dart
5849 5852
5850 #endif // VM_OBJECT_H_ 5853 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698