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

Issue 1876363003: - Ensure that we do not enter symbols twice: Set the canonical bit (Closed)

Created:
4 years, 8 months ago by Ivan Posva
Modified:
4 years, 8 months ago
Reviewers:
Florian Schneider
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

- Ensure that we do not enter symbols twice: Set the canonical bit on a String once we know it is canonical. - Bug fix in hash set implementation. BUG= Committed: https://github.com/dart-lang/sdk/commit/23a4e3da53800e052b4993cce071dedc3aef2bd9

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -14 lines) Patch
M runtime/vm/hash_table.h View 1 chunk +1 line, -1 line 1 comment Download
M runtime/vm/symbols.cc View 5 chunks +16 lines, -13 lines 4 comments Download

Messages

Total messages: 6 (2 generated)
Ivan Posva
4 years, 8 months ago (2016-04-12 04:57:17 UTC) #2
Ivan Posva
Committed patchset #1 (id:1) manually as 23a4e3da53800e052b4993cce071dedc3aef2bd9 (presubmit successful).
4 years, 8 months ago (2016-04-12 05:05:33 UTC) #4
Florian Schneider
lgtm https://codereview.chromium.org/1876363003/diff/1/runtime/vm/hash_table.h File runtime/vm/hash_table.h (left): https://codereview.chromium.org/1876363003/diff/1/runtime/vm/hash_table.h#oldcode639 runtime/vm/hash_table.h:639: return BaseIterTable::GetPayload(entry, 0); Oops. Good catch. https://codereview.chromium.org/1876363003/diff/1/runtime/vm/symbols.cc File ...
4 years, 8 months ago (2016-04-12 05:49:03 UTC) #5
Ivan Posva
4 years, 8 months ago (2016-04-12 05:52:10 UTC) #6
Message was sent while issue was closed.
Thanks!

-Ivan

https://codereview.chromium.org/1876363003/diff/1/runtime/vm/symbols.cc
File runtime/vm/symbols.cc (right):

https://codereview.chromium.org/1876363003/diff/1/runtime/vm/symbols.cc#newco...
runtime/vm/symbols.cc:220: RawString* entry =
reinterpret_cast<RawString*>(table.InsertOrGet(*str));
On 2016/04/12 05:49:03, Florian Schneider wrote:
> Shorter: *str ^= table.InsertOrGet(*str);

Done. Missed the right combination with * and ^ when trying. Will be in a
followup CL.

https://codereview.chromium.org/1876363003/diff/1/runtime/vm/symbols.cc#newco...
runtime/vm/symbols.cc:235: RawString* entry =
reinterpret_cast<RawString*>(table.InsertOrGet(*str));
On 2016/04/12 05:49:03, Florian Schneider wrote:
> Ditto.

Done.

Powered by Google App Engine
This is Rietveld 408576698