• 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...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...