Chromium Code Reviews| Index: src/x64/lithium-codegen-x64.cc |
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
| index 38a8c18be39b58ed82e1c2fede1aa80411fd41f9..799fbad06f4db8ea95723e8a2ab6603f66bcbbb5 100644 |
| --- a/src/x64/lithium-codegen-x64.cc |
| +++ b/src/x64/lithium-codegen-x64.cc |
| @@ -1680,6 +1680,33 @@ void LCodeGen::DoIsObjectAndBranch(LIsObjectAndBranch* instr) { |
| } |
| +Condition LCodeGen::EmitIsString(Register input, |
| + Register temp1, |
| + Label* is_not_string, |
| + Label* is_string) { |
|
fschneider
2011/11/08 10:33:20
Parameter is_string is not used. It can be removed
|
| + |
| + __ JumpIfSmi(input, is_not_string); |
| + Condition cond = masm_->IsObjectStringType(input, temp1, temp1); |
| + |
| + return cond; |
| +} |
| + |
| + |
| +void LCodeGen::DoIsStringAndBranch(LIsStringAndBranch* instr) { |
| + Register reg = ToRegister(instr->InputAt(0)); |
| + Register temp = ToRegister(instr->TempAt(0)); |
| + |
| + int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| + int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| + Label* true_label = chunk_->GetAssemblyLabel(true_block); |
| + Label* false_label = chunk_->GetAssemblyLabel(false_block); |
| + |
| + Condition true_cond = EmitIsString(reg, temp, false_label, true_label); |
| + |
| + EmitBranch(true_block, false_block, true_cond); |
| +} |
| + |
| + |
| void LCodeGen::DoIsSmiAndBranch(LIsSmiAndBranch* instr) { |
| int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| int false_block = chunk_->LookupDestination(instr->false_block_id()); |