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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 1350113002: [runtime] Replace COMPARE/COMPARE_STRONG with proper Object::Compare. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) { 730 if (cc == eq) {
731 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, 731 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
732 1); 732 1);
733 } else { 733 } else {
734 int context_index = is_strong(strength())
735 ? Context::COMPARE_STRONG_BUILTIN_INDEX
736 : Context::COMPARE_BUILTIN_INDEX;
737 int ncr; // NaN compare result. 734 int ncr; // NaN compare result.
738 if (cc == lt || cc == le) { 735 if (cc == lt || cc == le) {
739 ncr = GREATER; 736 ncr = GREATER;
740 } else { 737 } else {
741 DCHECK(cc == gt || cc == ge); // Remaining cases. 738 DCHECK(cc == gt || cc == ge); // Remaining cases.
742 ncr = LESS; 739 ncr = LESS;
743 } 740 }
744 __ li(a0, Operand(Smi::FromInt(ncr))); 741 __ li(a0, Operand(Smi::FromInt(ncr)));
745 __ push(a0); 742 __ push(a0);
746 743
747 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 744 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
748 // tagged as a small integer. 745 // tagged as a small integer.
749 __ InvokeBuiltin(context_index, JUMP_FUNCTION); 746 __ TailCallRuntime(
747 is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
748 1);
750 } 749 }
751 750
752 __ bind(&miss); 751 __ bind(&miss);
753 GenerateMiss(masm); 752 GenerateMiss(masm);
754 } 753 }
755 754
756 755
757 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { 756 void StoreRegistersStateStub::Generate(MacroAssembler* masm) {
758 __ mov(t9, ra); 757 __ mov(t9, ra);
759 __ pop(ra); 758 __ pop(ra);
(...skipping 4978 matching lines...) Expand 10 before | Expand all | Expand 10 after
5738 MemOperand(fp, 6 * kPointerSize), NULL); 5737 MemOperand(fp, 6 * kPointerSize), NULL);
5739 } 5738 }
5740 5739
5741 5740
5742 #undef __ 5741 #undef __
5743 5742
5744 } // namespace internal 5743 } // namespace internal
5745 } // namespace v8 5744 } // namespace v8
5746 5745
5747 #endif // V8_TARGET_ARCH_MIPS 5746 #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') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698