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

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/convert_patch.dart

Issue 689043002: Make JSON.fuse(UTF8) be more efficient by not creating intermediate string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 1 month 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 | « runtime/lib/convert_patch.dart ('k') | sdk/lib/convert/json.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 // Patch file for dart:convert library. 5 // Patch file for dart:convert library.
6 6
7 import 'dart:_js_helper' show patch; 7 import 'dart:_js_helper' show patch;
8 import 'dart:_foreign_helper' show JS; 8 import 'dart:_foreign_helper' show JS;
9 import 'dart:_interceptors' show JSExtendableArray; 9 import 'dart:_interceptors' show JSExtendableArray;
10 import 'dart:_internal' show MappedIterable; 10 import 'dart:_internal' show MappedIterable;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 void close() { 362 void close() {
363 super.close(); 363 super.close();
364 StringBuffer buffer = _stringSink; 364 StringBuffer buffer = _stringSink;
365 String accumulated = buffer.toString(); 365 String accumulated = buffer.toString();
366 buffer.clear(); 366 buffer.clear();
367 Object decoded = _parseJson(accumulated, _reviver); 367 Object decoded = _parseJson(accumulated, _reviver);
368 _sink.add(decoded); 368 _sink.add(decoded);
369 _sink.close(); 369 _sink.close();
370 } 370 }
371 } 371 }
372
373 @patch class Utf8Decoder {
374 @patch
375 Converter<List<int>,dynamic> fuse(Converter<String, dynamic> next) {
376 return super.fuse(next);
377 }
378 }
OLDNEW
« no previous file with comments | « runtime/lib/convert_patch.dart ('k') | sdk/lib/convert/json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698