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

Side by Side Diff: runtime/lib/string_buffer_patch.dart

Issue 2705593002: Fix various nits in VM patch files. (Closed)
Patch Set: Address comments and issues found during testing. Created 3 years, 10 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 | « runtime/lib/mirrors_impl.dart ('k') | runtime/lib/string_patch.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) 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 import 'dart:typed_data' show Uint16List;
6
5 @patch class StringBuffer { 7 @patch class StringBuffer {
6 static const int _BUFFER_SIZE = 64; 8 static const int _BUFFER_SIZE = 64;
7 static const int _PARTS_TO_COMPACT = 128; 9 static const int _PARTS_TO_COMPACT = 128;
8 static const int _PARTS_TO_COMPACT_SIZE_LIMIT = _PARTS_TO_COMPACT * 8; 10 static const int _PARTS_TO_COMPACT_SIZE_LIMIT = _PARTS_TO_COMPACT * 8;
9 11
10 /** 12 /**
11 * When strings are written to the string buffer, we add them to a 13 * When strings are written to the string buffer, we add them to a
12 * list of string parts. 14 * list of string parts.
13 */ 15 */
14 List<String> _parts; 16 List<String> _parts;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 _partsCodeUnitsSinceCompaction = 0; 178 _partsCodeUnitsSinceCompaction = 0;
177 _partsCompactionIndex = _parts.length; 179 _partsCompactionIndex = _parts.length;
178 } 180 }
179 181
180 /** 182 /**
181 * Create a [String] from the UFT-16 code units in buffer. 183 * Create a [String] from the UFT-16 code units in buffer.
182 */ 184 */
183 static String _create(Uint16List buffer, int length, bool isLatin1) 185 static String _create(Uint16List buffer, int length, bool isLatin1)
184 native "StringBuffer_createStringFromUint16Array"; 186 native "StringBuffer_createStringFromUint16Array";
185 } 187 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | runtime/lib/string_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698