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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.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/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.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/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 return kNoCondition; 2385 return kNoCondition;
2386 } 2386 }
2387 } 2387 }
2388 2388
2389 2389
2390 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2390 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2391 DCHECK(ToRegister(instr->context()).is(cp)); 2391 DCHECK(ToRegister(instr->context()).is(cp));
2392 DCHECK(ToRegister(instr->left()).is(a1)); 2392 DCHECK(ToRegister(instr->left()).is(a1));
2393 DCHECK(ToRegister(instr->right()).is(a0)); 2393 DCHECK(ToRegister(instr->right()).is(a0));
2394 2394
2395 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 2395 if (Token::IsOrderedRelationalCompareOp(instr->op())) {
2396 CallCode(code, RelocInfo::CODE_TARGET, instr); 2396 Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
2397 CallCode(code, RelocInfo::CODE_TARGET, instr);
2397 2398
2398 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, 2399 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0,
2399 Operand(zero_reg)); 2400 Operand(zero_reg));
2401 } else {
2402 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
2403 CallCode(code, RelocInfo::CODE_TARGET, instr);
2404 __ LoadRoot(at, Heap::kTrueValueRootIndex);
2405
2406 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, Operand(at));
2407 }
2400 } 2408 }
2401 2409
2402 2410
2403 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2411 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2404 InstanceType from = instr->from(); 2412 InstanceType from = instr->from();
2405 InstanceType to = instr->to(); 2413 InstanceType to = instr->to();
2406 if (from == FIRST_TYPE) return to; 2414 if (from == FIRST_TYPE) return to;
2407 DCHECK(from == to || to == LAST_TYPE); 2415 DCHECK(from == to || to == LAST_TYPE);
2408 return from; 2416 return from;
2409 } 2417 }
(...skipping 3283 matching lines...) Expand 10 before | Expand all | Expand 10 after
5693 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5701 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5694 Register context = ToRegister(instr->context()); 5702 Register context = ToRegister(instr->context());
5695 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5703 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5696 } 5704 }
5697 5705
5698 5706
5699 #undef __ 5707 #undef __
5700 5708
5701 } // namespace internal 5709 } // namespace internal
5702 } // namespace v8 5710 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698