Refactor the samevalue internal method and add tests for this method.
authorricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 25 May 2010 10:35:55 +0000 (10:35 +0000)
committerricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 25 May 2010 10:35:55 +0000 (10:35 +0000)
commit7bbfc8fc53615454979396e3afdeb68fd851ea4f
treebfb4818a0ef838e3f112dbe7ae4526dc05cfd2ee
parent10f1cab4bb3cf43eae1c9095eb21c51b1d8ec452
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).

Review URL: http://codereview.chromium.org/2136024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/runtime.js
test/mjsunit/samevalue.js [new file with mode: 0644]