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

Issue 149007: Don't do a second lookup as we have it already. (Closed)

Created:
11 years, 6 months ago by antonm
Modified:
9 years, 4 months ago
Visibility:
Public.

Description

Don't do a second lookup as we have it already. Committed: http://code.google.com/p/v8/source/detail?r=2306

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -9 lines) Patch
M src/ic.cc View 1 2 chunks +4 lines, -9 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
antonm
11 years, 6 months ago (2009-06-25 15:08:07 UTC) #1
Mads Ager (chromium)
LGTM
11 years, 6 months ago (2009-06-25 16:52:55 UTC) #2
Lasse Reichstein
http://codereview.chromium.org/149007/diff/1/2 File src/ic.cc (right): http://codereview.chromium.org/149007/diff/1/2#newcode333 Line 333: result = object->GetProperty(*object, &lookup, *name, &attr); You still ...
11 years, 6 months ago (2009-06-26 06:24:29 UTC) #3
antonm
11 years, 6 months ago (2009-06-26 19:05:35 UTC) #4
Lasse,

thanks a lot for review!

Somehow I didn't get any email from you and only by pure chance noticed your
comments via codereview.chromium.org.  Is it normal?  Am I misseted up (awful
English)

http://codereview.chromium.org/149007/diff/1/2
File src/ic.cc (right):

http://codereview.chromium.org/149007/diff/1/2#newcode333
Line 333: result = object->GetProperty(*object, &lookup, *name, &attr);
On 2009/06/26 06:24:29, Lasse Reichstein wrote:
> You still do object->lookup(...) above, so you don't really save anything by
> moving this out of the conditional branches. Could you move the GetProperty
call
> up and replace the LookUp? (Not a rethorical question, I'm not sure what the
> lookup call does exactly).
> Further, this call seems more complex than the ones in the branches (passing
> &lookup and &attr suggests that some assignment will happen that wouldn't in
> both branches).

Lasse, please, double check that I understand it correctly.  The main point of
this CL is to reuse LookupResult already filled up by Lookup method above.  Now
GetProperty accepts LookupResult and doesn't invoke Lookup anymore (compare to
previous state of affairs: GetProperty(String*) would invoke
GetProperty(String*, PropertyAttributes*) which would invoke
GetPropertyWithReceiver which would do lookup and invoke GetProperty(JSObject*,
LookupResult*, String*, PropertyAttributes*).  I'm trying to get rid of those
intermediate calls and esp. ::Lookup.  Do I miss something?

Powered by Google App Engine
This is Rietveld 408576698