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

Issue 10825384: Fix accessor lookup in crankshaft. (Closed)

Created:
8 years, 4 months ago by Sven Panne
Modified:
8 years, 4 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Fix accessor lookup in crankshaft. Seeing monomorphic type feedback plus an AccessorPair does not necessarily imply that the corresponding getter/setter is really there, so we have to check for this explictly. TEST=mjsunit/object-define-property Committed: https://code.google.com/p/v8/source/detail?r=12317

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed review feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -87 lines) Patch
M src/hydrogen.h View 3 chunks +2 lines, -11 lines 0 comments Download
M src/hydrogen.cc View 1 10 chunks +100 lines, -76 lines 0 comments Download
M test/mjsunit/object-define-property.js View 1 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Sven Panne
8 years, 4 months ago (2012-08-16 09:45:31 UTC) #1
Michael Starzinger
LGTM (with a few nits). https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc#newcode4723 src/hydrogen.cc:4723: (*accessors)->getter()->IsJSFunction()) { No need ...
8 years, 4 months ago (2012-08-16 09:55:58 UTC) #2
Sven Panne
8 years, 4 months ago (2012-08-16 10:47:40 UTC) #3
https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:4723: (*accessors)->getter()->IsJSFunction()) {
On 2012/08/16 09:55:58, Michael Starzinger wrote:
> No need to do open the handle here, that will be done implicitly, just use ...
> 
> accessors->getter()->IsJSFunction()

Done.

https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:4724: *getter =
Handle<JSFunction>(JSFunction::cast((*accessors)->getter()));
On 2012/08/16 09:55:58, Michael Starzinger wrote:
> Likewise.

Done.

https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:4737: (*accessors)->setter()->IsJSFunction()) {
On 2012/08/16 09:55:58, Michael Starzinger wrote:
> Likewise.

Done.

https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:4738: *setter =
Handle<JSFunction>(JSFunction::cast((*accessors)->setter()));
On 2012/08/16 09:55:58, Michael Starzinger wrote:
> Likewise.

Done.

https://chromiumcodereview.appspot.com/10825384/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:7920: // Because we re-use the load type feedback, there might
be no setter.
On 2012/08/16 09:55:58, Michael Starzinger wrote:
> We should remove this comment, because there might be no setter for other
> reasons as well. This is misleading.

Done.

https://chromiumcodereview.appspot.com/10825384/diff/1/test/mjsunit/object-de...
File test/mjsunit/object-define-property.js (right):

https://chromiumcodereview.appspot.com/10825384/diff/1/test/mjsunit/object-de...
test/mjsunit/object-define-property.js:1176: // Test assignment to a getter-only
property on the prototype chain.
On 2012/08/16 09:55:58, Michael Starzinger wrote:
> Can we extend this comment to say that it actually tests that Crankshaft
doesn't
> solely rely on type-feedback but rechecks assumptions.

Done.

Powered by Google App Engine
This is Rietveld 408576698