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

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

Issue 499073003: Use Uint8List for byte lists in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/convert_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) 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 import "dart:typed_data"; 5 import "dart:typed_data";
6 6
7 // JSON conversion. 7 // JSON conversion.
8 8
9 patch _parseJson(String json, reviver(var key, var value)) { 9 patch _parseJson(String json, reviver(var key, var value)) {
10 _BuildJsonListener listener; 10 _BuildJsonListener listener;
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 } 568 }
569 569
570 static double _parseDouble(String source, int start, int end) 570 static double _parseDouble(String source, int start, int end)
571 native "Double_parse"; 571 native "Double_parse";
572 572
573 void fail(int position, [String message]) { 573 void fail(int position, [String message]) {
574 if (message == null) message = "Unexpected character"; 574 if (message == null) message = "Unexpected character";
575 throw new FormatException(message, source, position); 575 throw new FormatException(message, source, position);
576 } 576 }
577 } 577 }
578
579 // UTF-8 conversion.
580
581 patch class _Utf8Encoder {
582 /* patch */ static List<int> _createBuffer(int size) => new Uint8List(size);
583 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/convert_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698