| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library analyzer.src.summary.api_signature; | |
| 6 | |
| 7 import 'dart:convert'; | 5 import 'dart:convert'; |
| 8 import 'dart:typed_data'; | 6 import 'dart:typed_data'; |
| 9 | 7 |
| 10 import 'package:convert/convert.dart'; | 8 import 'package:convert/convert.dart'; |
| 11 import 'package:crypto/crypto.dart'; | 9 import 'package:crypto/crypto.dart'; |
| 12 | 10 |
| 13 /** | 11 /** |
| 14 * An instance of [ApiSignature] collects data in the form of primitive types | 12 * An instance of [ApiSignature] collects data in the form of primitive types |
| 15 * (strings, ints, bools, etc.) from a summary "builder" object, and uses them | 13 * (strings, ints, bools, etc.) from a summary "builder" object, and uses them |
| 16 * to generate an MD5 signature of a the non-informative parts of the summary | 14 * to generate an MD5 signature of a the non-informative parts of the summary |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 int oldLength = _data.lengthInBytes; | 142 int oldLength = _data.lengthInBytes; |
| 145 if (_offset + spaceNeeded > oldLength) { | 143 if (_offset + spaceNeeded > oldLength) { |
| 146 int newLength = 2 * (_offset + spaceNeeded); | 144 int newLength = 2 * (_offset + spaceNeeded); |
| 147 ByteData newData = new ByteData(newLength); | 145 ByteData newData = new ByteData(newLength); |
| 148 new Uint8List.view(newData.buffer) | 146 new Uint8List.view(newData.buffer) |
| 149 .setRange(0, oldLength, new Uint8List.view(_data.buffer)); | 147 .setRange(0, oldLength, new Uint8List.view(_data.buffer)); |
| 150 _data = newData; | 148 _data = newData; |
| 151 } | 149 } |
| 152 } | 150 } |
| 153 } | 151 } |
| OLD | NEW |