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

Issue 2136024: Refactor the samevalue internal method and add tests for this method.... (Closed)

Created:
10 years, 7 months ago by Rico
Modified:
9 years, 6 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Refactor the samevalue internal method and add tests for this method. Noticing that the only difference between samevalue and strict equality is on numbers we can simplify SameValue. The old version did not return a correct answer if called on two strings since StringEquals (from runtime.cc) returns an answer that is the negated value (if treated as a boolean). Committed: http://code.google.com/p/v8/source/detail?r=4713

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -6 lines) Patch
M src/runtime.js View 1 chunk +2 lines, -6 lines 0 comments Download
A test/mjsunit/samevalue.js View 1 chunk +97 lines, -0 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Rico
10 years, 7 months ago (2010-05-25 08:48:41 UTC) #1
Erik Corry
LGTM! http://codereview.chromium.org/2136024/diff/1/3 File test/mjsunit/samevalue.js (right): http://codereview.chromium.org/2136024/diff/1/3#newcode35 test/mjsunit/samevalue.js:35: assertTrue(natives.SameValue(0, 0)); Shouldn't we have +-0 here too ...
10 years, 7 months ago (2010-05-25 10:29:37 UTC) #2
Rico
10 years, 7 months ago (2010-05-25 10:35:58 UTC) #3
http://codereview.chromium.org/2136024/diff/1/3
File test/mjsunit/samevalue.js (right):

http://codereview.chromium.org/2136024/diff/1/3#newcode35
test/mjsunit/samevalue.js:35: assertTrue(natives.SameValue(0, 0));
On 2010/05/25 10:29:37, Erik Corry wrote:
> Shouldn't we have +-0 here too for completeness?
Done

Powered by Google App Engine
This is Rietveld 408576698