Chromium Code Reviews| 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 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1625 Label* false_label = chunk_->GetAssemblyLabel(false_block); | 1625 Label* false_label = chunk_->GetAssemblyLabel(false_block); |
| 1626 | 1626 |
| 1627 __ JumpIfSmi(input, false_label); | 1627 __ JumpIfSmi(input, false_label); |
| 1628 | 1628 |
| 1629 __ CmpObjectType(input, TestType(instr->hydrogen()), kScratchRegister); | 1629 __ CmpObjectType(input, TestType(instr->hydrogen()), kScratchRegister); |
| 1630 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); | 1630 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 | 1633 |
| 1634 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) { | 1634 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) { |
| 1635 Abort("Unimplemented: %s", "DoHasCachedArrayIndex"); | 1635 Register input = ToRegister(instr->InputAt(0)); |
| 1636 Register result = ToRegister(instr->result()); | |
| 1637 | |
| 1638 ASSERT(instr->hydrogen()->value()->representation().IsTagged()); | |
| 1639 __ LoadRoot(result, Heap::kTrueValueRootIndex); | |
| 1640 __ testl(FieldOperand(input, String::kHashFieldOffset), | |
| 1641 Immediate(String::kContainsCachedArrayIndexMask)); | |
|
Lasse Reichstein
2011/03/02 09:59:07
Indentation.
Rico
2011/03/02 10:12:15
Done.
| |
| 1642 NearLabel done; | |
| 1643 __ j(not_zero, &done); | |
| 1644 __ LoadRoot(result, Heap::kFalseValueRootIndex); | |
|
Lasse Reichstein
2011/03/02 09:59:07
Could we do just one computed load from the root a
Rico
2011/03/02 10:12:15
As discussed offline this will not really have any
| |
| 1645 __ bind(&done); | |
| 1636 } | 1646 } |
| 1637 | 1647 |
| 1638 | 1648 |
| 1639 void LCodeGen::DoHasCachedArrayIndexAndBranch( | 1649 void LCodeGen::DoHasCachedArrayIndexAndBranch( |
| 1640 LHasCachedArrayIndexAndBranch* instr) { | 1650 LHasCachedArrayIndexAndBranch* instr) { |
| 1641 Register input = ToRegister(instr->InputAt(0)); | 1651 Register input = ToRegister(instr->InputAt(0)); |
| 1642 | 1652 |
| 1643 int true_block = chunk_->LookupDestination(instr->true_block_id()); | 1653 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| 1644 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 1654 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| 1645 | 1655 |
| (...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3620 RegisterEnvironmentForDeoptimization(environment); | 3630 RegisterEnvironmentForDeoptimization(environment); |
| 3621 ASSERT(osr_pc_offset_ == -1); | 3631 ASSERT(osr_pc_offset_ == -1); |
| 3622 osr_pc_offset_ = masm()->pc_offset(); | 3632 osr_pc_offset_ = masm()->pc_offset(); |
| 3623 } | 3633 } |
| 3624 | 3634 |
| 3625 #undef __ | 3635 #undef __ |
| 3626 | 3636 |
| 3627 } } // namespace v8::internal | 3637 } } // namespace v8::internal |
| 3628 | 3638 |
| 3629 #endif // V8_TARGET_ARCH_X64 | 3639 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |