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

Side by Side 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, 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
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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 return no_condition; 2161 return no_condition;
2162 } 2162 }
2163 } 2163 }
2164 2164
2165 2165
2166 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2166 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2167 DCHECK(ToRegister(instr->context()).is(esi)); 2167 DCHECK(ToRegister(instr->context()).is(esi));
2168 DCHECK(ToRegister(instr->left()).is(edx)); 2168 DCHECK(ToRegister(instr->left()).is(edx));
2169 DCHECK(ToRegister(instr->right()).is(eax)); 2169 DCHECK(ToRegister(instr->right()).is(eax));
2170 2170
2171 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 2171 if (Token::IsOrderedRelationalCompareOp(instr->op())) {
2172 CallCode(code, RelocInfo::CODE_TARGET, instr); 2172 Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
2173 __ test(eax, eax); 2173 CallCode(code, RelocInfo::CODE_TARGET, instr);
2174 __ test(eax, eax);
2175 } else {
2176 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
2177 CallCode(code, RelocInfo::CODE_TARGET, instr);
2178 __ CompareRoot(eax, Heap::kTrueValueRootIndex);
2179 }
2174 2180
2175 EmitBranch(instr, ComputeCompareCondition(instr->op())); 2181 EmitBranch(instr, ComputeCompareCondition(instr->op()));
2176 } 2182 }
2177 2183
2178 2184
2179 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2185 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2180 InstanceType from = instr->from(); 2186 InstanceType from = instr->from();
2181 InstanceType to = instr->to(); 2187 InstanceType to = instr->to();
2182 if (from == FIRST_TYPE) return to; 2188 if (from == FIRST_TYPE) return to;
2183 DCHECK(from == to || to == LAST_TYPE); 2189 DCHECK(from == to || to == LAST_TYPE);
(...skipping 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after
5197 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); 5203 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context);
5198 } 5204 }
5199 5205
5200 5206
5201 #undef __ 5207 #undef __
5202 5208
5203 } // namespace internal 5209 } // namespace internal
5204 } // namespace v8 5210 } // namespace v8
5205 5211
5206 #endif // V8_TARGET_ARCH_IA32 5212 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« 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