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

Unified Diff: src/crankshaft/mips/lithium-codegen-mips.cc

Issue 1765823002: [compiler] Introduce code stubs for string relational comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/crankshaft/mips/lithium-codegen-mips.cc
diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc
index dd908dea5ca3c9c15ee965c831148091bc1bfcfc..b32bce842581073cf35cbeb92c8901bda67e6778 100644
--- a/src/crankshaft/mips/lithium-codegen-mips.cc
+++ b/src/crankshaft/mips/lithium-codegen-mips.cc
@@ -2275,19 +2275,10 @@ void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
DCHECK(ToRegister(instr->left()).is(a1));
DCHECK(ToRegister(instr->right()).is(a0));
- if (Token::IsOrderedRelationalCompareOp(instr->op())) {
- Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
- CallCode(code, RelocInfo::CODE_TARGET, instr);
-
- EmitBranch(instr, ComputeCompareCondition(instr->op()), v0,
- Operand(zero_reg));
- } else {
- Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
- CallCode(code, RelocInfo::CODE_TARGET, instr);
- __ LoadRoot(at, Heap::kTrueValueRootIndex);
-
- EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, Operand(at));
- }
+ Handle<Code> code = CodeFactory::StringCompare(isolate(), instr->op()).code();
+ CallCode(code, RelocInfo::CODE_TARGET, instr);
+ __ LoadRoot(at, Heap::kTrueValueRootIndex);
+ EmitBranch(instr, eq, v0, Operand(at));
}

Powered by Google App Engine
This is Rietveld 408576698