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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 return kNoCondition; 2268 return kNoCondition;
2269 } 2269 }
2270 } 2270 }
2271 2271
2272 2272
2273 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2273 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2274 DCHECK(ToRegister(instr->context()).is(cp)); 2274 DCHECK(ToRegister(instr->context()).is(cp));
2275 DCHECK(ToRegister(instr->left()).is(a1)); 2275 DCHECK(ToRegister(instr->left()).is(a1));
2276 DCHECK(ToRegister(instr->right()).is(a0)); 2276 DCHECK(ToRegister(instr->right()).is(a0));
2277 2277
2278 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 2278 if (Token::IsOrderedRelationalCompareOp(instr->op())) {
2279 CallCode(code, RelocInfo::CODE_TARGET, instr); 2279 Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
2280 CallCode(code, RelocInfo::CODE_TARGET, instr);
2280 2281
2281 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, 2282 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0,
2282 Operand(zero_reg)); 2283 Operand(zero_reg));
2284 } else {
2285 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
2286 CallCode(code, RelocInfo::CODE_TARGET, instr);
2287 __ LoadRoot(at, Heap::kTrueValueRootIndex);
2288
2289 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, Operand(at));
2290 }
2283 } 2291 }
2284 2292
2285 2293
2286 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2294 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2287 InstanceType from = instr->from(); 2295 InstanceType from = instr->from();
2288 InstanceType to = instr->to(); 2296 InstanceType to = instr->to();
2289 if (from == FIRST_TYPE) return to; 2297 if (from == FIRST_TYPE) return to;
2290 DCHECK(from == to || to == LAST_TYPE); 2298 DCHECK(from == to || to == LAST_TYPE);
2291 return from; 2299 return from;
2292 } 2300 }
(...skipping 3196 matching lines...) Expand 10 before | Expand all | Expand 10 after
5489 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5497 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5490 Register context = ToRegister(instr->context()); 5498 Register context = ToRegister(instr->context());
5491 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5499 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5492 } 5500 }
5493 5501
5494 5502
5495 #undef __ 5503 #undef __
5496 5504
5497 } // namespace internal 5505 } // namespace internal
5498 } // namespace v8 5506 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698