Commit Graph

7 Commits

Author SHA1 Message Date
Jakob Kummerow
0445fa2971 [lookup] Refactor LookupIterator "property or element" creation
This CL factors out the decision-making logic whether a property key should
be treated as a "property" or "element" into LookupIterator::Key, which can
be constructed on its own, allowing use sites to take this distinction into
account before constructing a LookupIterator from the Key, without needing
to duplicate the logic.
This also makes the assortment of LookupIterator constructors more uniform.

Bug: chromium:1031175
Change-Id: I81d7b11ab7e4915f5c05668138e6e0c51ae11821
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1962272
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65672}
2020-01-09 18:39:11 +00:00
Jakob Kummerow
c8ed19ac49 Yet more size_t-index fixes
CSA::TryLookupElement must check the upper bound for dictionary-mode
indices.
The "stable map + accessor" branch of FastGetOwnValuesOrEntries must
construct its LookupIterator such that it handles the named/indexed
distinction correctly.

Bug: chromium:1029338,chromium:1029369
Change-Id: I17e74ed24c260c5cfc20c61616e75db7d347f7a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1943164
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65301}
2019-12-02 17:49:37 +00:00
Jakob Kummerow
c6f16db2d6 One more LookupIterator indexed/named mode fix
Reported at comment #18 of the linked bug.

Bug: chromium:1027461
Change-Id: I64fb4c4edd4df07ddf86c508dfecec7f509efc9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1940262
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65263}
2019-11-29 12:46:09 +00:00
Jakob Kummerow
3ac7a3e5d4 More LookupIterator fixes after r65078
(1) One more place in ic.cc must guard against "lookup->name()" calls
when the LookupIterator might be in indexed mode.

(2) Rather than burdening LookupIterator users with specifying
"kGuaranteedNoTypedArray", we can do the corresponding calculation in
the LookupIterator itself, which makes it robust towards any callers
that haven't been updated (specifically, in Object.values).

Bug: chromium:1027461,chromium:1028213
Change-Id: I76b5d08e309fc2a694955b537adbeb5a30e681f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1936474
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65177}
2019-11-26 15:45:11 +00:00
Jakob Kummerow
2b0b80d286 Reland "Fixes for size_t LookupIterator"
This is a reland of e1ad9b899b

Original change's description:
> Fixes for size_t LookupIterator
>
> Fixing some fallout from c968607e12
> aka r65078
>
> Bug: chromium:1026729,chromium:1026856,chromium:1026909,chromium:1026974
> Change-Id: I98a4466595fbf1635af403ab58842977882c0453
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1930907
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#65158}

Tbr: verwaest@chromium.org,mstarzinger@chromium.org
Bug: chromium:1026729, chromium:1026856, chromium:1026909, chromium:1026974
Change-Id: I66695f05c4910c46f3c75209e14135075721f2cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1932839
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65162}
2019-11-25 22:58:40 +00:00
Shu-yu Guo
5f14396489 Revert "Fixes for size_t LookupIterator"
This reverts commit e1ad9b899b.

Reason for revert: Landed test that fails with GC stress

Original change's description:
> Fixes for size_t LookupIterator
> 
> Fixing some fallout from c968607e12
> aka r65078
> 
> Bug: chromium:1026729,chromium:1026856,chromium:1026909,chromium:1026974
> Change-Id: I98a4466595fbf1635af403ab58842977882c0453
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1930907
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#65158}

TBR=jkummerow@chromium.org,mstarzinger@chromium.org,verwaest@chromium.org

Change-Id: I1f1e95d37b033e53330adae08071cbe34e1d9488
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1026729, chromium:1026856, chromium:1026909, chromium:1026974
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1933599
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65159}
2019-11-25 18:46:50 +00:00
Jakob Kummerow
e1ad9b899b Fixes for size_t LookupIterator
Fixing some fallout from c968607e12
aka r65078

Bug: chromium:1026729,chromium:1026856,chromium:1026909,chromium:1026974
Change-Id: I98a4466595fbf1635af403ab58842977882c0453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1930907
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65158}
2019-11-25 17:11:18 +00:00