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

Issue 336863008: Make the JSON decoder (parser) create Dart maps lazily (Closed)

Created:
6 years, 5 months ago by kasperl
Modified:
6 years, 5 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make the JSON decoder (parser) create Dart maps lazily when no reviver is provided (common case). R=floitsch@google.com, lrn@google.com BUG=http://dartbug.com/19649 Committed: https://code.google.com/p/dart/source/detail?r=37858

Patch Set 1 #

Total comments: 12

Patch Set 2 : Improve testing and fix bugs. #

Patch Set 3 : More tests and cleanup. #

Patch Set 4 : Fix long lines in test. #

Total comments: 1

Patch Set 5 : Fix another bug. #

Patch Set 6 : Add another test case. #

Total comments: 12

Patch Set 7 : Address review feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+580 lines, -9 lines) Patch
M runtime/lib/collection_patch.dart View 1 3 chunks +12 lines, -6 lines 0 comments Download
M sdk/lib/_internal/lib/convert_patch.dart View 1 2 3 4 5 6 5 chunks +235 lines, -3 lines 0 comments Download
A tests/corelib/json_map_test.dart View 1 2 3 4 5 1 chunk +324 lines, -0 lines 0 comments Download
M tests/corelib/map_test.dart View 1 7 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
kasperl
6 years, 5 months ago (2014-06-30 13:56:03 UTC) #1
kasperl
https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart File sdk/lib/_internal/lib/convert_patch.dart (right): https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart#newcode138 sdk/lib/_internal/lib/convert_patch.dart:138: class _JsonMap implements Map<String, dynamic> { Should this be ...
6 years, 5 months ago (2014-06-30 13:59:26 UTC) #2
kasperl
https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart File sdk/lib/_internal/lib/convert_patch.dart (right): https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart#newcode161 sdk/lib/_internal/lib/convert_patch.dart:161: Map<String, dynamic> _convertToMutableMap() { We should make sure this ...
6 years, 5 months ago (2014-06-30 14:33:01 UTC) #3
floitsch
LGTM with more comments. https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart File sdk/lib/_internal/lib/convert_patch.dart (right): https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart#newcode121 sdk/lib/_internal/lib/convert_patch.dart:121: var list = JS('JSExtendableArray', '#', ...
6 years, 5 months ago (2014-06-30 14:49:44 UTC) #4
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart File sdk/lib/_internal/lib/convert_patch.dart (right): https://codereview.chromium.org/336863008/diff/1/sdk/lib/_internal/lib/convert_patch.dart#newcode113 sdk/lib/_internal/lib/convert_patch.dart:113: if (JS('bool', 'typeof # != "object"', object)) { ...
6 years, 5 months ago (2014-06-30 16:44:15 UTC) #5
kasperl
I've extended the test coverage and fixed a bunch of issues. This is now ready ...
6 years, 5 months ago (2014-07-01 08:49:25 UTC) #6
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/336863008/diff/100001/sdk/lib/_internal/lib/convert_patch.dart File sdk/lib/_internal/lib/convert_patch.dart (right): https://codereview.chromium.org/336863008/diff/100001/sdk/lib/_internal/lib/convert_patch.dart#newcode42 sdk/lib/_internal/lib/convert_patch.dart:42: if (reviver == null) return _convertJsonToDartLazy(parsed); Use braces ...
6 years, 5 months ago (2014-07-01 09:43:34 UTC) #7
floitsch
LGTM. https://codereview.chromium.org/336863008/diff/60001/sdk/lib/_internal/lib/convert_patch.dart File sdk/lib/_internal/lib/convert_patch.dart (right): https://codereview.chromium.org/336863008/diff/60001/sdk/lib/_internal/lib/convert_patch.dart#newcode43 sdk/lib/_internal/lib/convert_patch.dart:43: else return _convertJsonToDart(parsed, reviver); Nit: we generally don't ...
6 years, 5 months ago (2014-07-01 09:51:28 UTC) #8
kasperl
https://codereview.chromium.org/336863008/diff/100001/sdk/lib/_internal/lib/convert_patch.dart File sdk/lib/_internal/lib/convert_patch.dart (right): https://codereview.chromium.org/336863008/diff/100001/sdk/lib/_internal/lib/convert_patch.dart#newcode42 sdk/lib/_internal/lib/convert_patch.dart:42: if (reviver == null) return _convertJsonToDartLazy(parsed); On 2014/07/01 09:43:33, ...
6 years, 5 months ago (2014-07-01 09:52:39 UTC) #9
kasperl
6 years, 5 months ago (2014-07-01 09:53:34 UTC) #10
Message was sent while issue was closed.
Committed patchset #7 manually as r37858 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698