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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-simd.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 __ ret(0); 1727 __ ret(0);
1728 } 1728 }
1729 __ bind(&runtime_call); 1729 __ bind(&runtime_call);
1730 1730
1731 // Push arguments below the return address to prepare jump to builtin. 1731 // Push arguments below the return address to prepare jump to builtin.
1732 __ PopReturnAddressTo(rcx); 1732 __ PopReturnAddressTo(rcx);
1733 __ Push(rdx); 1733 __ Push(rdx);
1734 __ Push(rax); 1734 __ Push(rax);
1735 1735
1736 // Figure out which native to call and setup the arguments. 1736 // Figure out which native to call and setup the arguments.
1737 if (cc == equal && strict()) { 1737 if (cc == equal) {
1738 __ PushReturnAddressFrom(rcx); 1738 __ PushReturnAddressFrom(rcx);
1739 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); 1739 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1740 1);
1740 } else { 1741 } else {
1741 int context_index; 1742 int context_index = is_strong(strength())
1742 if (cc == equal) { 1743 ? Context::COMPARE_STRONG_BUILTIN_INDEX
1743 context_index = Context::EQUALS_BUILTIN_INDEX; 1744 : Context::COMPARE_BUILTIN_INDEX;
1744 } else { 1745 __ Push(Smi::FromInt(NegativeComparisonResult(cc)));
1745 context_index = is_strong(strength())
1746 ? Context::COMPARE_STRONG_BUILTIN_INDEX
1747 : Context::COMPARE_BUILTIN_INDEX;
1748 __ Push(Smi::FromInt(NegativeComparisonResult(cc)));
1749 }
1750
1751 __ PushReturnAddressFrom(rcx); 1746 __ PushReturnAddressFrom(rcx);
1752 1747
1753 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 1748 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
1754 // tagged as a small integer. 1749 // tagged as a small integer.
1755 __ InvokeBuiltin(context_index, JUMP_FUNCTION); 1750 __ InvokeBuiltin(context_index, JUMP_FUNCTION);
1756 } 1751 }
1757 1752
1758 __ bind(&miss); 1753 __ bind(&miss);
1759 GenerateMiss(masm); 1754 GenerateMiss(masm);
1760 } 1755 }
(...skipping 3822 matching lines...) Expand 10 before | Expand all | Expand 10 after
5583 kStackSpace, nullptr, return_value_operand, NULL); 5578 kStackSpace, nullptr, return_value_operand, NULL);
5584 } 5579 }
5585 5580
5586 5581
5587 #undef __ 5582 #undef __
5588 5583
5589 } // namespace internal 5584 } // namespace internal
5590 } // namespace v8 5585 } // namespace v8
5591 5586
5592 #endif // V8_TARGET_ARCH_X64 5587 #endif // V8_TARGET_ARCH_X64
OLDNEW
« 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