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

Side by Side Diff: packages/source_maps/lib/src/vlq.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « packages/source_maps/lib/src/utils.dart ('k') | packages/source_maps/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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 5
6 /// Utilities to encode and decode VLQ values used in source maps. 6 /// Utilities to encode and decode VLQ values used in source maps.
7 /// 7 ///
8 /// Sourcemaps are encoded with variable length numbers as base64 encoded 8 /// Sourcemaps are encoded with variable length numbers as base64 encoded
9 /// strings with the least significant digit coming first. Each base64 digit 9 /// strings with the least significant digit coming first. Each base64 digit
10 /// encodes a 5-bit value (0-31) and a continuation bit. Signed values can be 10 /// encodes a 5-bit value (0-31) and a continuation bit. Signed values can be
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 result = result >> 1; 94 result = result >> 1;
95 result = negate ? -result : result; 95 result = negate ? -result : result;
96 96
97 // TODO(sigmund): can we detect this earlier? 97 // TODO(sigmund): can we detect this earlier?
98 if (result < MIN_INT32 || result > MAX_INT32) { 98 if (result < MIN_INT32 || result > MAX_INT32) {
99 throw new FormatException( 99 throw new FormatException(
100 'expected an encoded 32 bit int, but we got: $result'); 100 'expected an encoded 32 bit int, but we got: $result');
101 } 101 }
102 return result; 102 return result;
103 } 103 }
OLDNEW
« no previous file with comments | « packages/source_maps/lib/src/utils.dart ('k') | packages/source_maps/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698