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

Issue 11412121: Fix dart2js hashCode implementations. (Closed)

Created:
8 years, 1 month ago by sra1
Modified:
8 years, 1 month ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix dart2js hashCode implementations. This fixes the following problems: 1. low 15 bits of string hash always zero. 2. [].hashCode crashes 3. hashCode of bool is not a SMI. Committed: https://code.google.com/p/dart/source/detail?r=15216

Patch Set 1 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -8 lines) Patch
M sdk/lib/_internal/compiler/implementation/lib/interceptors.dart View 1 chunk +5 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_array.dart View 1 chunk +1 line, -1 line 1 comment Download
M sdk/lib/_internal/compiler/implementation/lib/js_string.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M tests/compiler/dart2js_extra/hash_code_test.dart View 1 chunk +73 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sra1
8 years, 1 month ago (2012-11-21 00:46:37 UTC) #1
ngeoffray
8 years, 1 month ago (2012-11-21 08:30:08 UTC) #2
LGTM! Thanks Stephen.

https://codereview.chromium.org/11412121/diff/3001/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/lib/js_array.dart (right):

https://codereview.chromium.org/11412121/diff/3001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/lib/js_array.dart:168: int get
hashCode => Primitives.objectHashCode(this);
Untested code FTW!

Powered by Google App Engine
This is Rietveld 408576698