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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm64/code-stubs-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r2, r3, r4, 617 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r2, r3, r4,
618 r5); 618 r5);
619 } 619 }
620 // Never falls through to here. 620 // Never falls through to here.
621 621
622 __ bind(&slow); 622 __ bind(&slow);
623 623
624 if (cc == eq) { 624 if (cc == eq) {
625 { 625 {
626 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 626 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
627 __ Push(lhs, rhs); 627 __ Push(cp);
628 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); 628 __ Call(strict() ? isolate()->builtins()->StrictEqual()
629 : isolate()->builtins()->Equal(),
630 RelocInfo::CODE_TARGET);
631 __ Pop(cp);
629 } 632 }
630 // Turn true into 0 and false into some non-zero value. 633 // Turn true into 0 and false into some non-zero value.
631 STATIC_ASSERT(EQUAL == 0); 634 STATIC_ASSERT(EQUAL == 0);
632 __ LoadRoot(r1, Heap::kTrueValueRootIndex); 635 __ LoadRoot(r1, Heap::kTrueValueRootIndex);
633 __ sub(r0, r0, r1); 636 __ sub(r0, r0, r1);
634 __ Ret(); 637 __ Ret();
635 } else { 638 } else {
636 __ Push(lhs, rhs); 639 __ Push(lhs, rhs);
637 int ncr; // NaN compare result 640 int ncr; // NaN compare result
638 if (cc == lt || cc == le) { 641 if (cc == lt || cc == le) {
(...skipping 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after
4161 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 4164 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
4162 kStackUnwindSpace, NULL, return_value_operand, NULL); 4165 kStackUnwindSpace, NULL, return_value_operand, NULL);
4163 } 4166 }
4164 4167
4165 #undef __ 4168 #undef __
4166 4169
4167 } // namespace internal 4170 } // namespace internal
4168 } // namespace v8 4171 } // namespace v8
4169 4172
4170 #endif // V8_TARGET_ARCH_ARM 4173 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698