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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 1337993005: [runtime] Replace the EQUALS builtin with proper Object::Equals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's nit. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-simd.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index ff8d4be1925914672434f2b873db1924b7b1693b..7000e1ddc2f4df9ab918e3e2c5e24fcb5e42d21c 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -1734,20 +1734,15 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ Push(rax);
// Figure out which native to call and setup the arguments.
- if (cc == equal && strict()) {
+ if (cc == equal) {
__ PushReturnAddressFrom(rcx);
- __ TailCallRuntime(Runtime::kStrictEquals, 2, 1);
+ __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
+ 1);
} else {
- int context_index;
- if (cc == equal) {
- context_index = Context::EQUALS_BUILTIN_INDEX;
- } else {
- context_index = is_strong(strength())
- ? Context::COMPARE_STRONG_BUILTIN_INDEX
- : Context::COMPARE_BUILTIN_INDEX;
- __ Push(Smi::FromInt(NegativeComparisonResult(cc)));
- }
-
+ int context_index = is_strong(strength())
+ ? Context::COMPARE_STRONG_BUILTIN_INDEX
+ : Context::COMPARE_BUILTIN_INDEX;
+ __ Push(Smi::FromInt(NegativeComparisonResult(cc)));
__ PushReturnAddressFrom(rcx);
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
« no previous file with comments | « src/runtime/runtime-simd.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698