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

Side by Side Diff: pkg/front_end/lib/src/base/api_signature.dart

Issue 2875373002: Move flat_buffer and api_signature into front_end. (Closed)
Patch Set: Update summary format generator. Created 3 years, 7 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 | « pkg/analyzer/tool/summary/generate.dart ('k') | pkg/front_end/lib/src/base/flat_buffers.dart » ('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) 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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/tool/summary/generate.dart ('k') | pkg/front_end/lib/src/base/flat_buffers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698