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

Unified Diff: src/crankshaft/ia32/lithium-codegen-ia32.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, 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
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/ia32/lithium-codegen-ia32.cc
diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
index f292b949daf4f8f00383d2daa052bf5bbda2c73b..2ba7b3fa0ac913d8d8b80c8f84858deddbd22a61 100644
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
@@ -2168,9 +2168,15 @@ void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
DCHECK(ToRegister(instr->left()).is(edx));
DCHECK(ToRegister(instr->right()).is(eax));
- Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
- CallCode(code, RelocInfo::CODE_TARGET, instr);
- __ test(eax, eax);
+ if (Token::IsOrderedRelationalCompareOp(instr->op())) {
+ Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
+ CallCode(code, RelocInfo::CODE_TARGET, instr);
+ __ test(eax, eax);
+ } else {
+ Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
+ CallCode(code, RelocInfo::CODE_TARGET, instr);
+ __ CompareRoot(eax, Heap::kTrueValueRootIndex);
+ }
EmitBranch(instr, ComputeCompareCondition(instr->op()));
}
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698