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

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

Issue 564843002: Initial steps towards cleaning up integer arithmetic IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 5127 matching lines...) Expand 10 before | Expand all | Expand 10 after
5138 } 5138 }
5139 virtual bool Equals(const Instance& other) const; 5139 virtual bool Equals(const Instance& other) const;
5140 5140
5141 virtual RawObject* HashCode() const { return raw(); } 5141 virtual RawObject* HashCode() const { return raw(); }
5142 5142
5143 virtual bool IsZero() const; 5143 virtual bool IsZero() const;
5144 virtual bool IsNegative() const; 5144 virtual bool IsNegative() const;
5145 5145
5146 virtual double AsDoubleValue() const; 5146 virtual double AsDoubleValue() const;
5147 virtual int64_t AsInt64Value() const; 5147 virtual int64_t AsInt64Value() const;
5148 virtual int64_t AsTruncatedInt64Value() const {
5149 return AsInt64Value();
5150 }
5148 virtual uint32_t AsTruncatedUint32Value() const; 5151 virtual uint32_t AsTruncatedUint32Value() const;
5149 5152
5150 virtual bool FitsIntoSmi() const; 5153 virtual bool FitsIntoSmi() const;
5151 5154
5152 // Returns 0, -1 or 1. 5155 // Returns 0, -1 or 1.
5153 virtual int CompareWith(const Integer& other) const; 5156 virtual int CompareWith(const Integer& other) const;
5154 5157
5155 // Return the most compact presentation of an integer. 5158 // Return the most compact presentation of an integer.
5156 RawInteger* AsValidInteger() const; 5159 RawInteger* AsValidInteger() const;
5157 5160
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
5303 5306
5304 5307
5305 class Bigint : public Integer { 5308 class Bigint : public Integer {
5306 public: 5309 public:
5307 virtual bool IsZero() const { return Used() == 0;} 5310 virtual bool IsZero() const { return Used() == 0;}
5308 virtual bool IsNegative() const { return Neg(); } 5311 virtual bool IsNegative() const { return Neg(); }
5309 virtual bool Equals(const Instance& other) const; 5312 virtual bool Equals(const Instance& other) const;
5310 5313
5311 virtual double AsDoubleValue() const; 5314 virtual double AsDoubleValue() const;
5312 virtual int64_t AsInt64Value() const; 5315 virtual int64_t AsInt64Value() const;
5316 virtual int64_t AsTruncatedInt64Value() const;
5313 virtual uint32_t AsTruncatedUint32Value() const; 5317 virtual uint32_t AsTruncatedUint32Value() const;
5314 5318
5315 virtual int CompareWith(const Integer& other) const; 5319 virtual int CompareWith(const Integer& other) const;
5316 5320
5317 virtual bool CheckAndCanonicalizeFields(const char** error_str) const; 5321 virtual bool CheckAndCanonicalizeFields(const char** error_str) const;
5318 5322
5319 virtual bool FitsIntoSmi() const; 5323 virtual bool FitsIntoSmi() const;
5320 bool FitsIntoInt64() const; 5324 bool FitsIntoInt64() const;
5321 bool FitsIntoUint64() const; 5325 bool FitsIntoUint64() const;
5322 uint64_t AsUint64Value() const; 5326 uint64_t AsUint64Value() const;
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
7452 7456
7453 7457
7454 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7458 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7455 intptr_t index) { 7459 intptr_t index) {
7456 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7460 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7457 } 7461 }
7458 7462
7459 } // namespace dart 7463 } // namespace dart
7460 7464
7461 #endif // VM_OBJECT_H_ 7465 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698