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

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

Issue 21301003: Fixes javascript integer overflow check. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 4119 matching lines...) Expand 10 before | Expand all | Expand 10 after
4130 4130
4131 // Returns 0, -1 or 1. 4131 // Returns 0, -1 or 1.
4132 virtual int CompareWith(const Integer& other) const; 4132 virtual int CompareWith(const Integer& other) const;
4133 4133
4134 // Return the most compact presentation of an integer. 4134 // Return the most compact presentation of an integer.
4135 RawInteger* AsValidInteger() const; 4135 RawInteger* AsValidInteger() const;
4136 4136
4137 RawInteger* ArithmeticOp(Token::Kind operation, const Integer& other) const; 4137 RawInteger* ArithmeticOp(Token::Kind operation, const Integer& other) const;
4138 RawInteger* BitOp(Token::Kind operation, const Integer& other) const; 4138 RawInteger* BitOp(Token::Kind operation, const Integer& other) const;
4139 4139
4140 // Returns true if the Integer does not fit in 53 bits. 4140 // Returns true if the Integer does not fit in 54 bits.
4141 bool CheckFiftyThreeBitOverflow() const; 4141 bool CheckFiftyFourBitOverflow() const;
4142 4142
4143 private: 4143 private:
4144 // Return an integer in the form of a RawBigint. 4144 // Return an integer in the form of a RawBigint.
4145 RawBigint* AsBigint() const; 4145 RawBigint* AsBigint() const;
4146 4146
4147 OBJECT_IMPLEMENTATION(Integer, Number); 4147 OBJECT_IMPLEMENTATION(Integer, Number);
4148 friend class Class; 4148 friend class Class;
4149 }; 4149 };
4150 4150
4151 4151
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
6031 6031
6032 6032
6033 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6033 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6034 intptr_t index) { 6034 intptr_t index) {
6035 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6035 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6036 } 6036 }
6037 6037
6038 } // namespace dart 6038 } // namespace dart
6039 6039
6040 #endif // VM_OBJECT_H_ 6040 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698