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

Issue 1211473002: Make int.gcd accept zero operands. (Closed)

Created:
5 years, 6 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 5 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make int.gcd accept zero as an operand, including both operands being zero. R=floitsch@google.com, regis@google.com, sgjesse@google.com Committed: https://github.com/dart-lang/sdk/commit/3c976019cc84f01fa03974bf628bb4f9b3f2e418

Patch Set 1 #

Total comments: 7

Patch Set 2 : Change to accept both operands being zero. #

Patch Set 3 : And comments. #

Total comments: 1

Patch Set 4 : Address comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -27 lines) Patch
M runtime/lib/bigint.dart View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M runtime/lib/integers.dart View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/js_number.dart View 1 2 1 chunk +3 lines, -7 lines 0 comments Download
M sdk/lib/core/int.dart View 1 1 chunk +10 lines, -3 lines 0 comments Download
M tests/corelib/big_integer_arith_vm_test.dart View 1 1 chunk +25 lines, -1 line 0 comments Download
M tests/corelib/int_modulo_arith_test.dart View 1 3 chunks +11 lines, -8 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
Lasse Reichstein Nielsen
There is no reason to restrict gcd from working when only one of the operands ...
5 years, 6 months ago (2015-06-24 08:52:00 UTC) #3
Søren Gjesse
lgtm
5 years, 6 months ago (2015-06-24 08:58:37 UTC) #4
floitsch
LGTM. https://codereview.chromium.org/1211473002/diff/1/runtime/lib/bigint.dart File runtime/lib/bigint.dart (right): https://codereview.chromium.org/1211473002/diff/1/runtime/lib/bigint.dart#newcode1563 runtime/lib/bigint.dart:1563: "at least one operand must not be zero"); ...
5 years, 6 months ago (2015-06-24 12:18:13 UTC) #5
Lasse Reichstein Nielsen
https://codereview.chromium.org/1211473002/diff/1/runtime/lib/bigint.dart File runtime/lib/bigint.dart (right): https://codereview.chromium.org/1211473002/diff/1/runtime/lib/bigint.dart#newcode1563 runtime/lib/bigint.dart:1563: "at least one operand must not be zero"); It's ...
5 years, 6 months ago (2015-06-24 12:44:10 UTC) #6
regis
lgtm https://codereview.chromium.org/1211473002/diff/1/runtime/lib/bigint.dart File runtime/lib/bigint.dart (right): https://codereview.chromium.org/1211473002/diff/1/runtime/lib/bigint.dart#newcode1811 runtime/lib/bigint.dart:1811: if (other == 0) { On 2015/06/24 12:44:10, ...
5 years, 6 months ago (2015-06-24 16:07:16 UTC) #7
Lasse Reichstein Nielsen
Changed to accept two zeros, PTAL
5 years, 5 months ago (2015-07-06 10:23:31 UTC) #8
Lasse Reichstein Nielsen
Changed to accept two zeros, PTAL
5 years, 5 months ago (2015-07-06 10:23:32 UTC) #9
Søren Gjesse
lgtm
5 years, 5 months ago (2015-07-06 11:25:07 UTC) #10
regis
lgtm after removing 2 lines. https://codereview.chromium.org/1211473002/diff/40001/runtime/lib/integers.dart File runtime/lib/integers.dart (right): https://codereview.chromium.org/1211473002/diff/40001/runtime/lib/integers.dart#newcode399 runtime/lib/integers.dart:399: if (other == 0) ...
5 years, 5 months ago (2015-07-06 15:08:12 UTC) #11
Lasse Reichstein Nielsen
5 years, 5 months ago (2015-07-07 07:51:19 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
3c976019cc84f01fa03974bf628bb4f9b3f2e418 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698