OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
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 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1673 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 1673 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
1674 Label* true_label = chunk_->GetAssemblyLabel(true_block); | 1674 Label* true_label = chunk_->GetAssemblyLabel(true_block); |
1675 Label* false_label = chunk_->GetAssemblyLabel(false_block); | 1675 Label* false_label = chunk_->GetAssemblyLabel(false_block); |
1676 | 1676 |
1677 Condition true_cond = EmitIsObject(reg, false_label, true_label); | 1677 Condition true_cond = EmitIsObject(reg, false_label, true_label); |
1678 | 1678 |
1679 EmitBranch(true_block, false_block, true_cond); | 1679 EmitBranch(true_block, false_block, true_cond); |
1680 } | 1680 } |
1681 | 1681 |
1682 | 1682 |
1683 Condition LCodeGen::EmitIsString(Register input, | |
1684 Register temp1, | |
1685 Label* is_not_string, | |
1686 Label* is_string) { | |
fschneider
2011/11/08 10:33:20
Parameter is_string is not used. It can be removed
| |
1687 | |
1688 __ JumpIfSmi(input, is_not_string); | |
1689 Condition cond = masm_->IsObjectStringType(input, temp1, temp1); | |
1690 | |
1691 return cond; | |
1692 } | |
1693 | |
1694 | |
1695 void LCodeGen::DoIsStringAndBranch(LIsStringAndBranch* instr) { | |
1696 Register reg = ToRegister(instr->InputAt(0)); | |
1697 Register temp = ToRegister(instr->TempAt(0)); | |
1698 | |
1699 int true_block = chunk_->LookupDestination(instr->true_block_id()); | |
1700 int false_block = chunk_->LookupDestination(instr->false_block_id()); | |
1701 Label* true_label = chunk_->GetAssemblyLabel(true_block); | |
1702 Label* false_label = chunk_->GetAssemblyLabel(false_block); | |
1703 | |
1704 Condition true_cond = EmitIsString(reg, temp, false_label, true_label); | |
1705 | |
1706 EmitBranch(true_block, false_block, true_cond); | |
1707 } | |
1708 | |
1709 | |
1683 void LCodeGen::DoIsSmiAndBranch(LIsSmiAndBranch* instr) { | 1710 void LCodeGen::DoIsSmiAndBranch(LIsSmiAndBranch* instr) { |
1684 int true_block = chunk_->LookupDestination(instr->true_block_id()); | 1711 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
1685 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 1712 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
1686 | 1713 |
1687 Condition is_smi; | 1714 Condition is_smi; |
1688 if (instr->InputAt(0)->IsRegister()) { | 1715 if (instr->InputAt(0)->IsRegister()) { |
1689 Register input = ToRegister(instr->InputAt(0)); | 1716 Register input = ToRegister(instr->InputAt(0)); |
1690 is_smi = masm()->CheckSmi(input); | 1717 is_smi = masm()->CheckSmi(input); |
1691 } else { | 1718 } else { |
1692 Operand input = ToOperand(instr->InputAt(0)); | 1719 Operand input = ToOperand(instr->InputAt(0)); |
(...skipping 2600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4293 RegisterEnvironmentForDeoptimization(environment); | 4320 RegisterEnvironmentForDeoptimization(environment); |
4294 ASSERT(osr_pc_offset_ == -1); | 4321 ASSERT(osr_pc_offset_ == -1); |
4295 osr_pc_offset_ = masm()->pc_offset(); | 4322 osr_pc_offset_ = masm()->pc_offset(); |
4296 } | 4323 } |
4297 | 4324 |
4298 #undef __ | 4325 #undef __ |
4299 | 4326 |
4300 } } // namespace v8::internal | 4327 } } // namespace v8::internal |
4301 | 4328 |
4302 #endif // V8_TARGET_ARCH_X64 | 4329 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |