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

Issue 10913271: Move parseInt parseDouble to int/double classes as a static method. (Closed)

Created:
8 years, 3 months ago by Lasse Reichstein Nielsen
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Move parseInt parseDouble to int/double classes as a static method. Remove math dependency from core/coreimpl in dart2js. The existing Math.parseInt and Math.parseDouble are kept *for now*, but simply redirect to the static methods. They will be removed in time (when library code is ready for it). Committed: https://code.google.com/p/dart/source/detail?r=12417

Patch Set 1 #

Total comments: 3

Patch Set 2 : Make int.parse directly native. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -96 lines) Patch
M lib/compiler/implementation/lib/core.dart View 1 chunk +0 lines, -2 lines 0 comments Download
M lib/compiler/implementation/lib/core_patch.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M lib/compiler/implementation/lib/coreimpl.dart View 1 chunk +0 lines, -1 line 0 comments Download
M lib/compiler/implementation/lib/js_helper.dart View 1 chunk +35 lines, -0 lines 0 comments Download
M lib/compiler/implementation/lib/math_patch.dart View 1 chunk +0 lines, -35 lines 0 comments Download
M lib/core/core.dart View 2 chunks +3 lines, -2 lines 0 comments Download
M lib/core/double.dart View 2 chunks +28 lines, -1 line 0 comments Download
M lib/core/expect.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M lib/core/int.dart View 1 chunk +16 lines, -0 lines 0 comments Download
M lib/coreimpl/coreimpl.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M lib/coreimpl/date.dart View 1 chunk +5 lines, -5 lines 0 comments Download
M lib/json/json.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M lib/math/base.dart View 1 chunk +4 lines, -12 lines 0 comments Download
M lib/uri/encode_decode.dart View 1 chunk +4 lines, -3 lines 0 comments Download
M lib/uri/uri.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/fixnum/int32.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/intl/lib/date_format_helpers.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/unittest/html_layout_config.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/unittest/interactive_html_config.dart View 5 chunks +5 lines, -5 lines 0 comments Download
A + runtime/lib/double_patch.dart View 1 1 chunk +5 lines, -6 lines 0 comments Download
A + runtime/lib/integers_patch.dart View 1 1 chunk +4 lines, -6 lines 0 comments Download
M runtime/lib/lib_sources.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/lib/math.dart View 1 2 chunks +0 lines, -4 lines 0 comments Download
M runtime/lib/math_patch.dart View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Lasse Reichstein Nielsen
https://codereview.chromium.org/10913271/diff/1/runtime/lib/double_patch.dart File runtime/lib/double_patch.dart (right): https://codereview.chromium.org/10913271/diff/1/runtime/lib/double_patch.dart#newcode10 runtime/lib/double_patch.dart:10: MathNatives.parseDouble(string); You might want to move the parse function ...
8 years, 3 months ago (2012-09-14 11:10:01 UTC) #1
Lasse Reichstein Nielsen
8 years, 3 months ago (2012-09-14 11:21:40 UTC) #2
hausner
LGTM w/comments https://codereview.chromium.org/10913271/diff/1/runtime/lib/double_patch.dart File runtime/lib/double_patch.dart (right): https://codereview.chromium.org/10913271/diff/1/runtime/lib/double_patch.dart#newcode10 runtime/lib/double_patch.dart:10: MathNatives.parseDouble(string); Or how about calling the native ...
8 years, 3 months ago (2012-09-14 15:40:54 UTC) #3
Lasse Reichstein Nielsen
The int.parse and double.parse functions are now native. It still calls the native "MathNatives_parseInt". That ...
8 years, 3 months ago (2012-09-17 07:20:34 UTC) #4
hausner
8 years, 3 months ago (2012-09-17 15:27:51 UTC) #5
Thanks :)

Powered by Google App Engine
This is Rietveld 408576698