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

Side by Side Diff: pkg/fixnum/lib/src/int64.dart

Issue 38113004: Eliminate deprecated Int32/Int64.fromInt() constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « pkg/fixnum/lib/src/int32.dart ('k') | pkg/fixnum/pubspec.yaml » ('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 part of fixnum; 5 part of fixnum;
6 6
7 /** 7 /**
8 * An immutable 64-bit signed integer, in the range [-2^63, 2^63 - 1]. 8 * An immutable 64-bit signed integer, in the range [-2^63, 2^63 - 1].
9 * Arithmetic operations may overflow in order to maintain this range. 9 * Arithmetic operations may overflow in order to maintain this range.
10 */ 10 */
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 if (negative) { 143 if (negative) {
144 v0 = _MASK & ~v0; 144 v0 = _MASK & ~v0;
145 v1 = _MASK & ~v1; 145 v1 = _MASK & ~v1;
146 v2 = _MASK2 & ~v2; 146 v2 = _MASK2 & ~v2;
147 } 147 }
148 return new Int64._bits(v0, v1, v2); 148 return new Int64._bits(v0, v1, v2);
149 } 149 }
150 150
151 /**
152 * Constructs an [Int64] with a given [int] value.
153 */
154 @deprecated
155 factory Int64.fromInt(int value) => new Int64(value);
156
157 factory Int64.fromBytes(List<int> bytes) { 151 factory Int64.fromBytes(List<int> bytes) {
158 int top = bytes[7] & 0xff; 152 int top = bytes[7] & 0xff;
159 top <<= 8; 153 top <<= 8;
160 top |= bytes[6] & 0xff; 154 top |= bytes[6] & 0xff;
161 top <<= 8; 155 top <<= 8;
162 top |= bytes[5] & 0xff; 156 top |= bytes[5] & 0xff;
163 top <<= 8; 157 top <<= 8;
164 top |= bytes[4] & 0xff; 158 top |= bytes[4] & 0xff;
165 159
166 int bottom = bytes[3] & 0xff; 160 int bottom = bytes[3] & 0xff;
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 if (r0 == 0 && r1 == 0 && r2 == 0) { 1033 if (r0 == 0 && r1 == 0 && r2 == 0) {
1040 return ZERO; 1034 return ZERO;
1041 } else { 1035 } else {
1042 return _sub(b0, b1, b2, r0, r1, r2); 1036 return _sub(b0, b1, b2, r0, r1, r2);
1043 } 1037 }
1044 } else { 1038 } else {
1045 return _negate(r0, r1, r2); 1039 return _negate(r0, r1, r2);
1046 } 1040 }
1047 } 1041 }
1048 } 1042 }
OLDNEW
« no previous file with comments | « pkg/fixnum/lib/src/int32.dart ('k') | pkg/fixnum/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698