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

Issue 1825983002: Avoid calling ByteData.setUint64. (Closed)

Created:
4 years, 9 months ago by nweiz
Modified:
4 years, 9 months ago
Reviewers:
kevmoo, sra1
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/crypto.git@master
Target Ref:
refs/heads/0.9.x
Visibility:
Public.

Description

Avoid calling ByteData.setUint64. Closes #31

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -5 lines) Patch
M CHANGELOG.md View 1 chunk +4 lines, -0 lines 0 comments Download
M lib/src/hash_sink.dart View 1 chunk +14 lines, -1 line 2 comments Download
M pubspec.yaml View 1 chunk +1 line, -1 line 0 comments Download
M test/utils.dart View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
nweiz
I'm branching this off of 0.9.2, and I'll merge it into 1.0.0 once that releases.
4 years, 9 months ago (2016-03-23 20:18:14 UTC) #2
kevmoo
lgtm
4 years, 9 months ago (2016-03-23 20:19:18 UTC) #3
nweiz
Manually landed as https://github.com/dart-lang/crypto/commit/8882b9d8bbb9df91d119c53f827ecf8968d014df
4 years, 9 months ago (2016-03-23 20:23:32 UTC) #4
sra1
https://codereview.chromium.org/1825983002/diff/1/lib/src/hash_sink.dart File lib/src/hash_sink.dart (right): https://codereview.chromium.org/1825983002/diff/1/lib/src/hash_sink.dart#newcode136 lib/src/hash_sink.dart:136: var highBits = lengthInBits >> 32; This won't actually ...
4 years, 9 months ago (2016-03-23 22:15:50 UTC) #7
nweiz
4 years, 9 months ago (2016-03-23 22:21:26 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1825983002/diff/1/lib/src/hash_sink.dart
File lib/src/hash_sink.dart (right):

https://codereview.chromium.org/1825983002/diff/1/lib/src/hash_sink.dart#newc...
lib/src/hash_sink.dart:136: var highBits = lengthInBits >> 32;
On 2016/03/23 22:15:50, sra1 wrote:
> This won't actually do what you want in dart2js.
> dart2js bit operations assume the inputs are 32 bit unsigned values.
> The result will always be zero.  It is probably always zero in practice.
> 
> You could use
>  
>    lengthInBits ~/ 4294967296
> 
> if you want it to work in JS for data of size 0.5GB.

Presumably in dart2js, lengthInBits can't be higher than 2^32 anyway, right?

Powered by Google App Engine
This is Rietveld 408576698