• Benedikt Meurer's avatar
    [cleanup] Remove the `Map::IsDictionaryMap()` method. · 5b46f573
    Benedikt Meurer authored
    There's a `Map::IsDictionaryMap()` method in addition to the
    `Map::is_dictionary_map()`, which apparently do very different things:
    The former checks whether the instance type of the Map is in a certain
    range (FIRST_DICTIONARY_TYPE to LAST_DICTIONARY_TYPE), while the latter
    checks the `is_dictionary_map` bit (which means that the backing store
    for the properties of a JSObject is in slow mode). To make matters worse
    there's also `CodeStubAssembler::IsDictionaryMap()`, which does the bit
    check similar to `Map::is_dictionary_map()`. And to make matters even
    worse the FIRST_DICTIONARY_TYPE to LAST_DICTIONARY_TYPE range also
    contains instance types for classes that aren't subclass of `Dictionary`
    (despite a comment stating the opposite).
    
    So in conclusion it's best to remove the confusing
    `Map::IsDictionaryMap()` method, which is anyways wrong, and just test
    explicitly for `NameDictionary`, `NumberDictionary` or
    `GlobalDictionary` in the appropriate places.
    
    Bug: v8:9183
    Change-Id: If35f73261e3cc96938ebf499bf32be3ec725288b
    Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627330
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#61770}
    5b46f573
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...