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

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed)

Created:
7 years, 11 months ago by floitsch
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org, Anders Johnsen
Visibility:
Public.

Description

Make ~/, round, ceil, floor, truncate return ints. Remove toInt.

Patch Set 1 #

Patch Set 2 : Checked mode fixes. #

Total comments: 36
Unified diffs Side-by-side diffs Delta from patch set Stats (+315 lines, -242 lines) Patch
M pkg/fixnum/test/int_64_vm_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/intl/lib/number_format.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/intl/lib/src/date_format_field.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/date_patch.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/double.cc View 3 chunks +66 lines, -23 lines 4 comments Download
M runtime/lib/double.dart View 1 5 chunks +8 lines, -9 lines 0 comments Download
M runtime/lib/integers.dart View 3 chunks +2 lines, -3 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/intrinsifier.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/snapshot_test.dart View 1 chunk +1 line, -1 line 1 comment Download
M samples/chat/chat_server_lib.dart View 1 chunk +1 line, -1 line 1 comment Download
M samples/clock/clock.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/logo/logo.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/solar/solar.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/solar3d/web/solar.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/spirodraw/ColorPicker.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/spirodraw/Spirodraw.dart View 4 chunks +7 lines, -7 lines 2 comments Download
M samples/swarm/Decoder.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/Views.dart View 4 chunks +8 lines, -9 lines 1 comment Download
M samples/swarm/swarm_ui_lib/layout/GridLayout.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M samples/swarm/swarm_ui_lib/layout/GridTracks.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/swarm_ui_lib/layout/ViewLayout.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/swarm_ui_lib/touch/Momentum.dart View 1 chunk +2 lines, -3 lines 0 comments Download
M samples/swarm/swarm_ui_lib/touch/Scrollbar.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M samples/swarm/swarm_ui_lib/touch/Scroller.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M samples/swarm/swarm_ui_lib/view/ConveyorView.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/swarm_ui_lib/view/MeasureText.dart View 2 chunks +2 lines, -2 lines 2 comments Download
M samples/swarm/swarm_ui_lib/view/PagedViews.dart View 4 chunks +4 lines, -4 lines 1 comment Download
M samples/third_party/dromaeo/Dromaeo.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M samples/third_party/dromaeo/common/BenchUtil.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/third_party/dromaeo/common/Math2.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M samples/third_party/dromaeo/tests/dom-modify-html.dart View 1 chunk +1 line, -1 line 1 comment Download
M samples/third_party/dromaeo/tests/dom-modify-htmlidiomatic.dart View 1 chunk +1 line, -1 line 1 comment Download
M sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart View 1 chunk +1 line, -1 line 1 comment Download
M sdk/lib/_internal/compiler/implementation/lib/js_number.dart View 2 chunks +21 lines, -15 lines 7 comments Download
M sdk/lib/_internal/compiler/implementation/tools/mini_parser.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/samples/leap/leap_leg.dart View 1 chunk +3 lines, -3 lines 1 comment Download
M sdk/lib/core/date.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/core/double.dart View 2 chunks +17 lines, -10 lines 1 comment Download
M sdk/lib/core/num.dart View 3 chunks +17 lines, -13 lines 3 comments Download
M tests/co19/co19-runtime.status View 1 2 chunks +27 lines, -0 lines 0 comments Download
M tests/corelib/collection_to_string_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/corelib/compare_to2_test.dart View 1 chunk +3 lines, -3 lines 1 comment Download
M tests/language/arithmetic_test.dart View 1 9 chunks +77 lines, -86 lines 0 comments Download
M tests/standalone/double_to_int_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/testing/dart/test_progress.dart View 3 chunks +3 lines, -3 lines 1 comment Download
M utils/tests/string_encoding/benchmark_runner.dart View 4 chunks +7 lines, -7 lines 7 comments Download

Messages

Total messages: 4 (0 generated)
floitsch
https://codereview.chromium.org/11748016/diff/2001/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/11748016/diff/2001/runtime/lib/double.cc#newcode83 runtime/lib/double.cc:83: if (isinf(result) || isnan(result)) { From here on same ...
7 years, 11 months ago (2013-01-03 18:23:17 UTC) #1
srdjan
I am opposed to this change as it is a Dart VM performance killer: switching ...
7 years, 11 months ago (2013-01-03 19:08:17 UTC) #2
Lasse Reichstein Nielsen
LGTM https://codereview.chromium.org/11748016/diff/2001/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/11748016/diff/2001/runtime/lib/double.cc#newcode87 runtime/lib/double.cc:87: Exceptions::ThrowByType(Exceptions::kFormat, args); Consider using UnsupportedError instead of FormatException. ...
7 years, 11 months ago (2013-01-04 10:29:42 UTC) #3
floitsch
7 years, 9 months ago (2013-03-11 13:39:15 UTC) #4
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/11748016/diff/2001/samples/spirodraw/S...
File samples/spirodraw/Spirodraw.dart (right):

https://chromiumcodereview.appspot.com/11748016/diff/2001/samples/spirodraw/S...
samples/spirodraw/Spirodraw.dart:160: int nTurns = (rad / PI2).truncate();
On 2013/01/04 10:29:42, Lasse Reichstein Nielsen wrote:
> / -> ~/ ?

done in different CL.

https://chromiumcodereview.appspot.com/11748016/diff/2001/samples/swarm/swarm...
File samples/swarm/swarm_ui_lib/view/MeasureText.dart (right):

https://chromiumcodereview.appspot.com/11748016/diff/2001/samples/swarm/swarm...
samples/swarm/swarm_ui_lib/view/MeasureText.dart:48: int targetLength =
(lineWidth * maxLines / _typicalCharLength).truncate();
On 2013/01/04 10:29:42, Lasse Reichstein Nielsen wrote:
> ~/

Done in a different CL.

https://chromiumcodereview.appspot.com/11748016/diff/2001/samples/swarm/swarm...
File samples/swarm/swarm_ui_lib/view/PagedViews.dart (right):

https://chromiumcodereview.appspot.com/11748016/diff/2001/samples/swarm/swarm...
samples/swarm/swarm_ui_lib/view/PagedViews.dart:249: pageNumber = pageNumber;
Remove line.

https://chromiumcodereview.appspot.com/11748016/diff/2001/utils/tests/string_...
File utils/tests/string_encoding/benchmark_runner.dart (right):

https://chromiumcodereview.appspot.com/11748016/diff/2001/utils/tests/string_...
utils/tests/string_encoding/benchmark_runner.dart:108:
BlockSample._totalCount(results));
On 2013/01/04 10:29:42, Lasse Reichstein Nielsen wrote:
> Indent by 1 more, or put on same line if possible.

Done in a different CL.

Powered by Google App Engine
This is Rietveld 408576698