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

Issue 12810006: Change LookupForWrite to always do a full lookup and check the result. (Closed)

Created:
7 years, 9 months ago by Toon Verwaest
Modified:
7 years, 9 months ago
Reviewers:
rossberg
CC:
v8-dev
Visibility:
Public.

Description

Change LookupForWrite to always do a full lookup and check the result. If we find a property in the prototype-chain that we can overwrite, and we have a transition, keep the holder in the lookup-result as the actual holder. We will need it for the consistency-check in GenerateStoreField. By directly checking the entire chain we avoid having to lazily bail out to a copy of the miss stub while generating the Field Store IC. Currently this CL disallows a normal non-receiver holder, given that that would require a positive lookup + details verification to ensure the property did not become read-only. This fixes the regressions in the attached tests. Committed: https://code.google.com/p/v8/source/detail?r=14061

Patch Set 1 #

Patch Set 2 : Check callbacks in the prototype chain before looking for transitions. Fix !IsReadOnly #

Total comments: 10

Patch Set 3 : Addressed comments #

Total comments: 4

Patch Set 4 : Negative lookup test on last prototype if in slow mode #

Total comments: 2

Patch Set 5 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -158 lines) Patch
M src/arm/stub-cache-arm.cc View 1 2 3 4 6 chunks +22 lines, -15 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 4 6 chunks +23 lines, -15 lines 0 comments Download
M src/ic.cc View 1 2 7 chunks +43 lines, -41 lines 0 comments Download
M src/property.h View 1 chunk +6 lines, -2 lines 0 comments Download
M src/stub-cache.h View 4 chunks +4 lines, -4 lines 0 comments Download
M src/stub-cache.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 3 4 6 chunks +22 lines, -15 lines 0 comments Download
A + test/mjsunit/regress/negative_lookup.js View 1 2 3 4 1 chunk +37 lines, -4 lines 0 comments Download
A + test/mjsunit/regress/readonly1.js View 1 2 3 4 1 chunk +43 lines, -4 lines 0 comments Download
A + test/mjsunit/regress/readonly2.js View 1 2 3 4 1 chunk +28 lines, -21 lines 0 comments Download
A + test/mjsunit/regress/readonly3.js View 1 2 3 4 1 chunk +37 lines, -4 lines 0 comments Download
A + test/mjsunit/regress/readonly4.js View 1 2 3 4 1 chunk +46 lines, -23 lines 0 comments Download
A + test/mjsunit/regress/setter.js View 1 2 1 chunk +38 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Toon Verwaest
PTAL
7 years, 9 months ago (2013-03-21 15:25:07 UTC) #1
rossberg
LGTM, only nits. https://codereview.chromium.org/12810006/diff/3001/src/ic.cc File src/ic.cc (left): https://codereview.chromium.org/12810006/diff/3001/src/ic.cc#oldcode1591 src/ic.cc:1591: if (!holder.is_identical_to(receiver)) break; If that's an ...
7 years, 9 months ago (2013-03-22 14:07:44 UTC) #2
Toon Verwaest
Addressed comments, PTAL again. https://chromiumcodereview.appspot.com/12810006/diff/3001/src/ic.cc File src/ic.cc (left): https://chromiumcodereview.appspot.com/12810006/diff/3001/src/ic.cc#oldcode1591 src/ic.cc:1591: if (!holder.is_identical_to(receiver)) break; On 2013/03/22 ...
7 years, 9 months ago (2013-03-25 11:44:44 UTC) #3
rossberg
LGTM with comments https://codereview.chromium.org/12810006/diff/10001/src/arm/stub-cache-arm.cc File src/arm/stub-cache-arm.cc (right): https://codereview.chromium.org/12810006/diff/10001/src/arm/stub-cache-arm.cc#newcode467 src/arm/stub-cache-arm.cc:467: // prototype chain) is is slow ...
7 years, 9 months ago (2013-03-25 12:08:09 UTC) #4
Toon Verwaest
Addressed comments, landing. https://chromiumcodereview.appspot.com/12810006/diff/10001/src/arm/stub-cache-arm.cc File src/arm/stub-cache-arm.cc (right): https://chromiumcodereview.appspot.com/12810006/diff/10001/src/arm/stub-cache-arm.cc#newcode467 src/arm/stub-cache-arm.cc:467: // prototype chain) is is slow ...
7 years, 9 months ago (2013-03-25 12:36:21 UTC) #5
Toon Verwaest
7 years, 9 months ago (2013-03-25 12:55:46 UTC) #6
Message was sent while issue was closed.
Committed patchset #5 manually as r14061 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698