[runtime] Replace COMPARE/COMPARE_STRONG with proper Object::Compare.
authorbmeurer <bmeurer@chromium.org>
Fri, 18 Sep 2015 06:35:36 +0000 (23:35 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 18 Sep 2015 06:35:50 +0000 (06:35 +0000)
commit593c655a3c814277283f9fa1520d5ce59d6b019c
tree28ee3913afdf200bc50b3f730e7bfa1ff4342c27
parentdc39f3089e5ee6bccafd9f63b13a0202f3697545
[runtime] Replace COMPARE/COMPARE_STRONG with proper Object::Compare.

This removes the weird COMPARE and COMPARE_STRONG JavaScript builtins
and replaces them with a proper C++ implementation in Object::Compare
and appropriate wrappers Object::LessThan, Object::GreaterThan, and
friends that are intended to be used by a true/false returning CompareIC
in the future, as well as the interpreter.  As a short-term solution we
provide %Compare and %Compare_Strong entry points for the current
CompareIC that return the appropriate integer values expected by
fullcodegen currently.

Now the Abstract Relational Comparison is also using the correct
ToPrimitive implementation, which properly supports @@toPrimitive.

BUG=v8:4307
LOG=n

Review URL: https://codereview.chromium.org/1350113002

Cr-Commit-Position: refs/heads/master@{#30816}
19 files changed:
src/arm/code-stubs-arm.cc
src/arm64/code-stubs-arm64.cc
src/contexts.h
src/full-codegen/full-codegen.cc
src/full-codegen/full-codegen.h
src/hydrogen.cc
src/hydrogen.h
src/ia32/code-stubs-ia32.cc
src/mips/code-stubs-mips.cc
src/mips64/code-stubs-mips64.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/runtime.js
src/runtime/runtime-numbers.cc
src/runtime/runtime-object.cc
src/runtime/runtime-strings.cc
src/runtime/runtime.h
src/x64/code-stubs-x64.cc