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

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

Issue 1753173003: [compiler] Introduce initial StrictEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add pseudo-code. Created 4 years, 9 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/runtime/runtime-strings.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
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 3154 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 if (equality) { 3165 if (equality) {
3166 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, 3166 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1,
3167 tmp2); 3167 tmp2);
3168 } else { 3168 } else {
3169 StringHelper::GenerateCompareFlatOneByteStrings( 3169 StringHelper::GenerateCompareFlatOneByteStrings(
3170 masm, left, right, tmp1, tmp2, tmp3, kScratchRegister); 3170 masm, left, right, tmp1, tmp2, tmp3, kScratchRegister);
3171 } 3171 }
3172 3172
3173 // Handle more complex cases in runtime. 3173 // Handle more complex cases in runtime.
3174 __ bind(&runtime); 3174 __ bind(&runtime);
3175 __ PopReturnAddressTo(tmp1);
3176 __ Push(left);
3177 __ Push(right);
3178 __ PushReturnAddressFrom(tmp1);
3179 if (equality) { 3175 if (equality) {
3180 __ TailCallRuntime(Runtime::kStringEquals); 3176 {
3177 FrameScope scope(masm, StackFrame::INTERNAL);
3178 __ Push(left);
3179 __ Push(right);
3180 __ CallRuntime(Runtime::kStringEqual);
3181 }
3182 __ LoadRoot(rdx, Heap::kTrueValueRootIndex);
3183 __ subp(rax, rdx);
3184 __ Ret();
3181 } else { 3185 } else {
3186 __ PopReturnAddressTo(tmp1);
3187 __ Push(left);
3188 __ Push(right);
3189 __ PushReturnAddressFrom(tmp1);
3182 __ TailCallRuntime(Runtime::kStringCompare); 3190 __ TailCallRuntime(Runtime::kStringCompare);
3183 } 3191 }
3184 3192
3185 __ bind(&miss); 3193 __ bind(&miss);
3186 GenerateMiss(masm); 3194 GenerateMiss(masm);
3187 } 3195 }
3188 3196
3189 3197
3190 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { 3198 void CompareICStub::GenerateReceivers(MacroAssembler* masm) {
3191 DCHECK_EQ(CompareICState::RECEIVER, state()); 3199 DCHECK_EQ(CompareICState::RECEIVER, state());
(...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after
5643 NULL); 5651 NULL);
5644 } 5652 }
5645 5653
5646 5654
5647 #undef __ 5655 #undef __
5648 5656
5649 } // namespace internal 5657 } // namespace internal
5650 } // namespace v8 5658 } // namespace v8
5651 5659
5652 #endif // V8_TARGET_ARCH_X64 5660 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-strings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698