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

Issue 23645003: Esoteric bit operations. (Closed)

Created:
7 years, 3 months ago by sra1
Modified:
7 years, 3 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Florian Schneider
Visibility:
Public.

Description

Esoteric bit operations. - bit length - truncate to signed fixed width integer - truncate to unsigned fixed width integer This change is motivated by a program that spends 20-30% of its time here: // TODO(5828): Replace this with a bit-length method on int when available. int n_bitLength = this.n.toRadixString(2).length; See Also https://code.google.com/p/dart/issues/detail?id=5828#c3 https://code.google.com/p/dart/issues/detail?id=6486#c2 https://code.google.com/p/dart/issues/detail?id=5798#c5 https://code.google.com/p/dart/issues/detail?id=12008 R=lrn@google.com, srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=27269

Patch Set 1 : #

Total comments: 24

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+519 lines, -1 line) Patch
M runtime/lib/integers.cc View 1 4 chunks +37 lines, -0 lines 0 comments Download
M runtime/lib/integers.dart View 1 4 chunks +18 lines, -0 lines 0 comments Download
M runtime/vm/assembler_ia32.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/assembler_ia32.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/vm/assembler_ia32_test.cc View 1 1 chunk +21 lines, -0 lines 0 comments Download
M runtime/vm/bigint_operations.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/bigint_operations.cc View 1 chunk +28 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/intrinsifier_arm.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_mips.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M sdk/lib/_internal/lib/js_number.dart View 1 chunk +59 lines, -0 lines 0 comments Download
M sdk/lib/core/int.dart View 1 1 chunk +72 lines, -0 lines 0 comments Download
A tests/corelib/bit_twiddling_bigint_test.dart View 1 1 chunk +61 lines, -0 lines 0 comments Download
A tests/corelib/bit_twiddling_test.dart View 1 1 chunk +175 lines, -0 lines 0 comments Download
M tests/corelib/corelib.status View 1 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
sra1
7 years, 3 months ago (2013-09-06 06:56:15 UTC) #1
Lasse Reichstein Nielsen
LGTM https://codereview.chromium.org/23645003/diff/15001/runtime/lib/integers.dart File runtime/lib/integers.dart (right): https://codereview.chromium.org/23645003/diff/15001/runtime/lib/integers.dart#newcode104 runtime/lib/integers.dart:104: return (this & (signMask - 1)) - (this ...
7 years, 3 months ago (2013-09-06 12:40:11 UTC) #2
srdjan
LGTM with comments https://codereview.chromium.org/23645003/diff/15001/runtime/lib/integers.cc File runtime/lib/integers.cc (right): https://codereview.chromium.org/23645003/diff/15001/runtime/lib/integers.cc#newcode38 runtime/lib/integers.cc:38: static int bitLength(uint64_t value) { s/bitLength/BitLength/ ...
7 years, 3 months ago (2013-09-06 15:35:34 UTC) #3
sra1
https://codereview.chromium.org/23645003/diff/15001/runtime/lib/integers.cc File runtime/lib/integers.cc (right): https://codereview.chromium.org/23645003/diff/15001/runtime/lib/integers.cc#newcode38 runtime/lib/integers.cc:38: static int bitLength(uint64_t value) { On 2013/09/06 15:35:34, srdjan ...
7 years, 3 months ago (2013-09-06 22:11:57 UTC) #4
sra1
7 years, 3 months ago (2013-09-06 22:22:33 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r27269 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698