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

Side by Side Diff: src/mips64/code-stubs-mips64.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/mips/code-stubs-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, a4, 715 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, a4,
716 a5); 716 a5);
717 } 717 }
718 // Never falls through to here. 718 // Never falls through to here.
719 719
720 __ bind(&slow); 720 __ bind(&slow);
721 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, 721 // Prepare for call to builtin. Push object pointers, a0 (lhs) first,
722 // a1 (rhs) second. 722 // a1 (rhs) second.
723 __ Push(lhs, rhs); 723 __ Push(lhs, rhs);
724 // Figure out which native to call and setup the arguments. 724 // Figure out which native to call and setup the arguments.
725 if (cc == eq && strict()) { 725 if (cc == eq) {
726 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); 726 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
727 1);
727 } else { 728 } else {
728 int context_index; 729 int context_index = is_strong(strength())
729 if (cc == eq) { 730 ? Context::COMPARE_STRONG_BUILTIN_INDEX
730 context_index = Context::EQUALS_BUILTIN_INDEX; 731 : Context::COMPARE_BUILTIN_INDEX;
732 int ncr; // NaN compare result.
733 if (cc == lt || cc == le) {
734 ncr = GREATER;
731 } else { 735 } else {
732 context_index = is_strong(strength()) 736 DCHECK(cc == gt || cc == ge); // Remaining cases.
733 ? Context::COMPARE_STRONG_BUILTIN_INDEX 737 ncr = LESS;
734 : Context::COMPARE_BUILTIN_INDEX;
735 int ncr; // NaN compare result.
736 if (cc == lt || cc == le) {
737 ncr = GREATER;
738 } else {
739 DCHECK(cc == gt || cc == ge); // Remaining cases.
740 ncr = LESS;
741 }
742 __ li(a0, Operand(Smi::FromInt(ncr)));
743 __ push(a0);
744 } 738 }
739 __ li(a0, Operand(Smi::FromInt(ncr)));
740 __ push(a0);
745 741
746 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 742 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
747 // tagged as a small integer. 743 // tagged as a small integer.
748 __ InvokeBuiltin(context_index, JUMP_FUNCTION); 744 __ InvokeBuiltin(context_index, JUMP_FUNCTION);
749 } 745 }
750 746
751 __ bind(&miss); 747 __ bind(&miss);
752 GenerateMiss(masm); 748 GenerateMiss(masm);
753 } 749 }
754 750
(...skipping 5026 matching lines...) Expand 10 before | Expand all | Expand 10 after
5781 MemOperand(fp, 6 * kPointerSize), NULL); 5777 MemOperand(fp, 6 * kPointerSize), NULL);
5782 } 5778 }
5783 5779
5784 5780
5785 #undef __ 5781 #undef __
5786 5782
5787 } // namespace internal 5783 } // namespace internal
5788 } // namespace v8 5784 } // namespace v8
5789 5785
5790 #endif // V8_TARGET_ARCH_MIPS64 5786 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698