| OLD | NEW |
| 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 Loading... |
| 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 if (Token::IsOrderedRelationalCompareOp(instr->op())) { | 2278 Handle<Code> code = CodeFactory::StringCompare(isolate(), instr->op()).code(); |
| 2279 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); | 2279 CallCode(code, RelocInfo::CODE_TARGET, instr); |
| 2280 CallCode(code, RelocInfo::CODE_TARGET, instr); | 2280 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
| 2281 | 2281 EmitBranch(instr, eq, v0, Operand(at)); |
| 2282 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, | |
| 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 } | |
| 2291 } | 2282 } |
| 2292 | 2283 |
| 2293 | 2284 |
| 2294 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2285 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
| 2295 InstanceType from = instr->from(); | 2286 InstanceType from = instr->from(); |
| 2296 InstanceType to = instr->to(); | 2287 InstanceType to = instr->to(); |
| 2297 if (from == FIRST_TYPE) return to; | 2288 if (from == FIRST_TYPE) return to; |
| 2298 DCHECK(from == to || to == LAST_TYPE); | 2289 DCHECK(from == to || to == LAST_TYPE); |
| 2299 return from; | 2290 return from; |
| 2300 } | 2291 } |
| (...skipping 3196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5497 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5488 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
| 5498 Register context = ToRegister(instr->context()); | 5489 Register context = ToRegister(instr->context()); |
| 5499 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5490 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 5500 } | 5491 } |
| 5501 | 5492 |
| 5502 | 5493 |
| 5503 #undef __ | 5494 #undef __ |
| 5504 | 5495 |
| 5505 } // namespace internal | 5496 } // namespace internal |
| 5506 } // namespace v8 | 5497 } // namespace v8 |
| OLD | NEW |