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

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.cc

Issue 1761823002: [compiler] Introduce StringEqualStub and StringNotEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. 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/compiler/simplified-lowering.cc ('k') | src/crankshaft/arm64/lithium-codegen-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 #include "src/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 2348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 return kNoCondition; 2359 return kNoCondition;
2360 } 2360 }
2361 } 2361 }
2362 2362
2363 2363
2364 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2364 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2365 DCHECK(ToRegister(instr->context()).is(cp)); 2365 DCHECK(ToRegister(instr->context()).is(cp));
2366 DCHECK(ToRegister(instr->left()).is(r1)); 2366 DCHECK(ToRegister(instr->left()).is(r1));
2367 DCHECK(ToRegister(instr->right()).is(r0)); 2367 DCHECK(ToRegister(instr->right()).is(r0));
2368 2368
2369 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 2369 if (Token::IsOrderedRelationalCompareOp(instr->op())) {
2370 CallCode(code, RelocInfo::CODE_TARGET, instr); 2370 Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
2371 __ cmp(r0, Operand::Zero()); 2371 CallCode(code, RelocInfo::CODE_TARGET, instr);
2372 __ cmp(r0, Operand::Zero());
2373 } else {
2374 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
2375 CallCode(code, RelocInfo::CODE_TARGET, instr);
2376 __ CompareRoot(r0, Heap::kTrueValueRootIndex);
2377 }
2372 2378
2373 EmitBranch(instr, ComputeCompareCondition(instr->op())); 2379 EmitBranch(instr, ComputeCompareCondition(instr->op()));
2374 } 2380 }
2375 2381
2376 2382
2377 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2383 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2378 InstanceType from = instr->from(); 2384 InstanceType from = instr->from();
2379 InstanceType to = instr->to(); 2385 InstanceType to = instr->to();
2380 if (from == FIRST_TYPE) return to; 2386 if (from == FIRST_TYPE) return to;
2381 DCHECK(from == to || to == LAST_TYPE); 2387 DCHECK(from == to || to == LAST_TYPE);
(...skipping 3089 matching lines...) Expand 10 before | Expand all | Expand 10 after
5471 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5477 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5472 Register context = ToRegister(instr->context()); 5478 Register context = ToRegister(instr->context());
5473 __ str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5479 __ str(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5474 } 5480 }
5475 5481
5476 5482
5477 #undef __ 5483 #undef __
5478 5484
5479 } // namespace internal 5485 } // namespace internal
5480 } // namespace v8 5486 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698