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

Issue 8343056: Fix Harmony sets and maps to allow null as key. (Closed)

Created:
9 years, 1 month ago by Michael Starzinger
Modified:
9 years, 1 month ago
CC:
v8-dev, arv (Not doing code reviews)
Visibility:
Public.

Description

Fix Harmony sets and maps to allow null as key. This changes the internal convention for marking deleted entries in hash tables from null_value to the_hole_value, which is consistent with other usages of the_hole. R=rossberg@chromium.org,kmillikin@chromium.org BUG=v8:1622 TEST=mjsunit/harmony/collections Committed: http://code.google.com/p/v8/source/detail?r=9871

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -43 lines) Patch
M src/heap.cc View 3 chunks +7 lines, -3 lines 0 comments Download
M src/heap-inl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/mark-compact.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M src/objects.h View 4 chunks +5 lines, -6 lines 0 comments Download
M src/objects.cc View 12 chunks +25 lines, -15 lines 0 comments Download
M src/objects-inl.h View 4 chunks +1 line, -8 lines 4 comments Download
M test/mjsunit/harmony/collections.js View 4 chunks +5 lines, -3 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
PTAL.
9 years, 1 month ago (2011-10-28 11:33:43 UTC) #1
rossberg
lgtm http://codereview.chromium.org/8343056/diff/1/src/objects-inl.h File src/objects-inl.h (left): http://codereview.chromium.org/8343056/diff/1/src/objects-inl.h#oldcode4437 src/objects-inl.h:4437: ASSERT(!key->IsUndefined() && !key->IsNull()); Don't you still need the ...
9 years, 1 month ago (2011-11-02 15:17:37 UTC) #2
Michael Starzinger
9 years, 1 month ago (2011-11-02 15:52:26 UTC) #3
http://codereview.chromium.org/8343056/diff/1/src/objects-inl.h
File src/objects-inl.h (left):

http://codereview.chromium.org/8343056/diff/1/src/objects-inl.h#oldcode4437
src/objects-inl.h:4437: ASSERT(!key->IsUndefined() && !key->IsNull());
On 2011/11/02 15:17:37, rossberg wrote:
> Don't you still need the IsUndefined part of the assertion, at least for now?

This assertion is now covered by ASSERT(IsKey(key)) in the objects.cc functions.
I moved it there because it catches misuse of keys earlier and even for cases
where hash values are not even generated.

http://codereview.chromium.org/8343056/diff/1/src/objects-inl.h#oldcode4446
src/objects-inl.h:4446: ASSERT(!other->IsUndefined() && !other->IsNull());
On 2011/11/02 15:17:37, rossberg wrote:
> Same here.

Likewise.

Powered by Google App Engine
This is Rietveld 408576698