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

Side by Side Diff: src/mips/code-stubs-mips.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/ia32/code-stubs-ia32.cc ('k') | src/mips64/code-stubs-mips64.cc » ('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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, t0, 720 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, t0,
721 t1); 721 t1);
722 } 722 }
723 // Never falls through to here. 723 // Never falls through to here.
724 724
725 __ bind(&slow); 725 __ bind(&slow);
726 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, 726 // Prepare for call to builtin. Push object pointers, a0 (lhs) first,
727 // a1 (rhs) second. 727 // a1 (rhs) second.
728 __ Push(lhs, rhs); 728 __ Push(lhs, rhs);
729 // Figure out which native to call and setup the arguments. 729 // Figure out which native to call and setup the arguments.
730 if (cc == eq && strict()) { 730 if (cc == eq) {
731 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); 731 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
732 1);
732 } else { 733 } else {
733 int context_index; 734 int context_index = is_strong(strength())
734 if (cc == eq) { 735 ? Context::COMPARE_STRONG_BUILTIN_INDEX
735 context_index = Context::EQUALS_BUILTIN_INDEX; 736 : Context::COMPARE_BUILTIN_INDEX;
737 int ncr; // NaN compare result.
738 if (cc == lt || cc == le) {
739 ncr = GREATER;
736 } else { 740 } else {
737 context_index = is_strong(strength()) 741 DCHECK(cc == gt || cc == ge); // Remaining cases.
738 ? Context::COMPARE_STRONG_BUILTIN_INDEX 742 ncr = LESS;
739 : Context::COMPARE_BUILTIN_INDEX;
740 int ncr; // NaN compare result.
741 if (cc == lt || cc == le) {
742 ncr = GREATER;
743 } else {
744 DCHECK(cc == gt || cc == ge); // Remaining cases.
745 ncr = LESS;
746 }
747 __ li(a0, Operand(Smi::FromInt(ncr)));
748 __ push(a0);
749 } 743 }
744 __ li(a0, Operand(Smi::FromInt(ncr)));
745 __ push(a0);
750 746
751 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 747 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
752 // tagged as a small integer. 748 // tagged as a small integer.
753 __ InvokeBuiltin(context_index, JUMP_FUNCTION); 749 __ InvokeBuiltin(context_index, JUMP_FUNCTION);
754 } 750 }
755 751
756 __ bind(&miss); 752 __ bind(&miss);
757 GenerateMiss(masm); 753 GenerateMiss(masm);
758 } 754 }
759 755
(...skipping 4995 matching lines...) Expand 10 before | Expand all | Expand 10 after
5755 MemOperand(fp, 6 * kPointerSize), NULL); 5751 MemOperand(fp, 6 * kPointerSize), NULL);
5756 } 5752 }
5757 5753
5758 5754
5759 #undef __ 5755 #undef __
5760 5756
5761 } // namespace internal 5757 } // namespace internal
5762 } // namespace v8 5758 } // namespace v8
5763 5759
5764 #endif // V8_TARGET_ARCH_MIPS 5760 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698