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

Issue 1209523002: Make modInv throw Exception on incompatible 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 modInv throw Exception on incompatible operands. Also update errors to be more descriptive accross the integer methods. I'm still considering whether a more precise "NotCoPrimeException" would be better. R=regis@google.com, sgjesse@google.com Committed: https://github.com/dart-lang/sdk/commit/ede6cb71a5f6f974d2937aec3d2d319b179d0943

Patch Set 1 #

Total comments: 27

Patch Set 2 : Address comments. #

Patch Set 3 : Update int.parse documentation #

Patch Set 4 : Merge to head, make tests run. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -72 lines) Patch
M runtime/lib/bigint.dart View 1 2 3 8 chunks +28 lines, -13 lines 0 comments Download
M runtime/lib/integers.dart View 1 7 chunks +40 lines, -21 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/js_number.dart View 1 2 3 7 chunks +29 lines, -14 lines 2 comments Download
M sdk/lib/core/exceptions.dart View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M sdk/lib/core/int.dart View 1 2 4 chunks +17 lines, -14 lines 0 comments Download
M tests/corelib/big_integer_arith_vm_test.dart View 1 2 3 6 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
Lasse Reichstein Nielsen
5 years, 6 months ago (2015-06-24 08:17:16 UTC) #3
Søren Gjesse
lgtm
5 years, 6 months ago (2015-06-24 08:24:12 UTC) #4
Lasse Reichstein Nielsen
5 years, 6 months ago (2015-06-24 08:47:08 UTC) #6
regis
lgtm with a few comments https://codereview.chromium.org/1209523002/diff/1/runtime/lib/bigint.dart File runtime/lib/bigint.dart (right): https://codereview.chromium.org/1209523002/diff/1/runtime/lib/bigint.dart#newcode1400 runtime/lib/bigint.dart:1400: if (e is! int) ...
5 years, 6 months ago (2015-06-24 15:40:44 UTC) #7
Lasse Reichstein Nielsen
https://codereview.chromium.org/1209523002/diff/1/runtime/lib/bigint.dart File runtime/lib/bigint.dart (right): https://codereview.chromium.org/1209523002/diff/1/runtime/lib/bigint.dart#newcode1562 runtime/lib/bigint.dart:1562: throw new ArgumentError.value(0, "first operand", "must not be zero"); ...
5 years, 6 months ago (2015-06-25 07:22:21 UTC) #8
regis
lgtm with comments https://codereview.chromium.org/1209523002/diff/1/runtime/lib/integers.dart File runtime/lib/integers.dart (right): https://codereview.chromium.org/1209523002/diff/1/runtime/lib/integers.dart#newcode222 runtime/lib/integers.dart:222: throw new RangeError.range(radix, 2, 36, "radix"); ...
5 years, 6 months ago (2015-06-25 16:51:46 UTC) #9
sra1
https://codereview.chromium.org/1209523002/diff/1/runtime/lib/integers.dart File runtime/lib/integers.dart (right): https://codereview.chromium.org/1209523002/diff/1/runtime/lib/integers.dart#newcode222 runtime/lib/integers.dart:222: throw new RangeError.range(radix, 2, 36, "radix"); On 2015/06/25 16:51:45, ...
5 years, 6 months ago (2015-06-25 21:28:48 UTC) #11
Lasse Reichstein Nielsen
Addressed cmments. PTAL https://codereview.chromium.org/1209523002/diff/1/runtime/lib/bigint.dart File runtime/lib/bigint.dart (right): https://codereview.chromium.org/1209523002/diff/1/runtime/lib/bigint.dart#newcode1400 runtime/lib/bigint.dart:1400: if (e is! int) throw new ...
5 years, 5 months ago (2015-06-30 05:50:48 UTC) #12
Søren Gjesse
lgtm
5 years, 5 months ago (2015-06-30 08:18:25 UTC) #13
Lasse Reichstein Nielsen
Committed patchset #4 (id:60001) manually as ede6cb71a5f6f974d2937aec3d2d319b179d0943 (presubmit successful).
5 years, 5 months ago (2015-06-30 12:46:31 UTC) #14
regis
5 years, 5 months ago (2015-06-30 16:56:54 UTC) #15
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/1209523002/diff/60001/sdk/lib/_internal/js_ru...
File sdk/lib/_internal/js_runtime/lib/js_number.dart (right):

https://codereview.chromium.org/1209523002/diff/60001/sdk/lib/_internal/js_ru...
sdk/lib/_internal/js_runtime/lib/js_number.dart:512: throw new
ArgumentError.value(this, "first operand", "must not be zero");
'this'

https://codereview.chromium.org/1209523002/diff/60001/sdk/lib/_internal/js_ru...
sdk/lib/_internal/js_runtime/lib/js_number.dart:515: throw new
ArgumentError.value(this, "second operand", "must not be zero");
'other'

Powered by Google App Engine
This is Rietveld 408576698