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

Issue 1558040: Faster comparison of identical objects. (Closed)

Created:
10 years, 8 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Faster comparison of identical objects. Committed: http://code.google.com/p/v8/source/detail?r=4391

Patch Set 1 #

Total comments: 13

Patch Set 2 : Addressing comments #

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

Messages

Total messages: 4 (0 generated)
antonm
Mads, Vitaly, may you have a look?
10 years, 8 months ago (2010-04-12 07:17:33 UTC) #1
Vitaly Repeshko
LGTM. Before submitting please double-check we have all interesting cases covered by our tests. -- ...
10 years, 8 months ago (2010-04-12 07:37:45 UTC) #2
Mads Ager (chromium)
LGTM http://codereview.chromium.org/1558040/diff/1/2 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/1558040/diff/1/2#newcode11060 src/ia32/codegen-ia32.cc:11060: static int NanComparisionResult(Condition cc) { It seems you ...
10 years, 8 months ago (2010-04-12 10:25:36 UTC) #3
antonm
10 years, 8 months ago (2010-04-12 15:00:03 UTC) #4
Thanks a lot, gentlemen.

@Vitaly: yes, we have: test/mjsunit/regress/regress-503.js and
t/m/compare-nan.js.  Plus I hope Sputnik would catch any harm I might have
produced.

http://codereview.chromium.org/1558040/diff/1/2
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/1558040/diff/1/2#newcode11060
src/ia32/codegen-ia32.cc:11060: static int NanComparisionResult(Condition cc) {
On 2010/04/12 10:25:36, Mads Ager wrote:
> It seems you should give this a more general name.  You really use this to get
> the negative result for both 'undefined' and 'NaN'.

Renamed to NegativeComparisonResult

http://codereview.chromium.org/1558040/diff/1/2#newcode11075
src/ia32/codegen-ia32.cc:11075: // for Nan and undefined.
On 2010/04/12 07:37:45, Vitaly wrote:
> nit: NaN.

Done.

http://codereview.chromium.org/1558040/diff/1/2#newcode11082
src/ia32/codegen-ia32.cc:11082: // Check for undefined.
On 2010/04/12 07:37:45, Vitaly wrote:
> It might help to have a short summary of undefined comparison rules here:
> undefined == undefined, but not undefined <= undefined, etc.

Done.

http://codereview.chromium.org/1558040/diff/1/2#newcode11095
src/ia32/codegen-ia32.cc:11095: __ Set(eax, Immediate(0));
On 2010/04/12 07:37:45, Vitaly wrote:
> Use Smi::FromInt(EQUAL) instead of 0.

Done.

http://codereview.chromium.org/1558040/diff/1/2#newcode11102
src/ia32/codegen-ia32.cc:11102: Immediate(Factory::heap_number_map()));
On 2010/04/12 07:37:45, Vitaly wrote:
> nit: Indent.

Done.

http://codereview.chromium.org/1558040/diff/1/2#newcode11127
src/ia32/codegen-ia32.cc:11127: __ setcc(above_equal, eax);
On 2010/04/12 07:37:45, Vitaly wrote:
> ASSERT(1 != EQUAL).

Done.

Powered by Google App Engine
This is Rietveld 408576698