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

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

Issue 2609153002: [ic] Use StrictEqual/Equal builtins for CompareIC slow path. (Closed)
Patch Set: Created 3 years, 11 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/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 } else { 666 } else {
667 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, t0, 667 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, t0,
668 t1); 668 t1);
669 } 669 }
670 // Never falls through to here. 670 // Never falls through to here.
671 671
672 __ bind(&slow); 672 __ bind(&slow);
673 if (cc == eq) { 673 if (cc == eq) {
674 { 674 {
675 FrameScope scope(masm, StackFrame::INTERNAL); 675 FrameScope scope(masm, StackFrame::INTERNAL);
676 __ Push(lhs, rhs); 676 __ Push(cp);
677 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); 677 __ Call(strict() ? isolate()->builtins()->StrictEqual()
678 : isolate()->builtins()->Equal(),
679 RelocInfo::CODE_TARGET);
680 __ Pop(cp);
678 } 681 }
679 // Turn true into 0 and false into some non-zero value. 682 // Turn true into 0 and false into some non-zero value.
680 STATIC_ASSERT(EQUAL == 0); 683 STATIC_ASSERT(EQUAL == 0);
681 __ LoadRoot(a0, Heap::kTrueValueRootIndex); 684 __ LoadRoot(a0, Heap::kTrueValueRootIndex);
682 __ Ret(USE_DELAY_SLOT); 685 __ Ret(USE_DELAY_SLOT);
683 __ subu(v0, v0, a0); // In delay slot. 686 __ subu(v0, v0, a0); // In delay slot.
684 } else { 687 } else {
685 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, 688 // Prepare for call to builtin. Push object pointers, a0 (lhs) first,
686 // a1 (rhs) second. 689 // a1 (rhs) second.
687 __ Push(lhs, rhs); 690 __ Push(lhs, rhs);
(...skipping 3674 matching lines...) Expand 10 before | Expand all | Expand 10 after
4362 kStackUnwindSpace, kInvalidStackOffset, 4365 kStackUnwindSpace, kInvalidStackOffset,
4363 return_value_operand, NULL); 4366 return_value_operand, NULL);
4364 } 4367 }
4365 4368
4366 #undef __ 4369 #undef __
4367 4370
4368 } // namespace internal 4371 } // namespace internal
4369 } // namespace v8 4372 } // namespace v8
4370 4373
4371 #endif // V8_TARGET_ARCH_MIPS 4374 #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