OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "lithium-allocator-inl.h" | 7 #include "lithium-allocator-inl.h" |
8 #include "mips/lithium-mips.h" | 8 #include "mips/lithium-mips.h" |
9 #include "mips/lithium-codegen-mips.h" | 9 #include "mips/lithium-codegen-mips.h" |
10 #include "hydrogen-osr.h" | 10 #include "hydrogen-osr.h" |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 // Make sure that the lithium instruction has either no fixed register | 851 // Make sure that the lithium instruction has either no fixed register |
852 // constraints in temps or the result OR no uses that are only used at | 852 // constraints in temps or the result OR no uses that are only used at |
853 // start. If this invariant doesn't hold, the register allocator can decide | 853 // start. If this invariant doesn't hold, the register allocator can decide |
854 // to insert a split of a range immediately before the instruction due to an | 854 // to insert a split of a range immediately before the instruction due to an |
855 // already allocated register needing to be used for the instruction's fixed | 855 // already allocated register needing to be used for the instruction's fixed |
856 // register constraint. In this case, The register allocator won't see an | 856 // register constraint. In this case, The register allocator won't see an |
857 // interference between the split child and the use-at-start (it would if | 857 // interference between the split child and the use-at-start (it would if |
858 // the it was just a plain use), so it is free to move the split child into | 858 // the it was just a plain use), so it is free to move the split child into |
859 // the same register that is used for the use-at-start. | 859 // the same register that is used for the use-at-start. |
860 // See https://code.google.com/p/chromium/issues/detail?id=201590 | 860 // See https://code.google.com/p/chromium/issues/detail?id=201590 |
861 if (!(instr->ClobbersRegisters() && instr->ClobbersDoubleRegisters())) { | 861 if (!(instr->ClobbersRegisters() && |
| 862 instr->ClobbersDoubleRegisters(isolate()))) { |
862 int fixed = 0; | 863 int fixed = 0; |
863 int used_at_start = 0; | 864 int used_at_start = 0; |
864 for (UseIterator it(instr); !it.Done(); it.Advance()) { | 865 for (UseIterator it(instr); !it.Done(); it.Advance()) { |
865 LUnallocated* operand = LUnallocated::cast(it.Current()); | 866 LUnallocated* operand = LUnallocated::cast(it.Current()); |
866 if (operand->IsUsedAtStart()) ++used_at_start; | 867 if (operand->IsUsedAtStart()) ++used_at_start; |
867 } | 868 } |
868 if (instr->Output() != NULL) { | 869 if (instr->Output() != NULL) { |
869 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; | 870 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; |
870 } | 871 } |
871 for (TempIterator it(instr); !it.Done(); it.Advance()) { | 872 for (TempIterator it(instr); !it.Done(); it.Advance()) { |
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2511 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2511 LOperand* object = UseRegister(instr->object()); | 2512 LOperand* object = UseRegister(instr->object()); |
2512 LOperand* index = UseRegister(instr->index()); | 2513 LOperand* index = UseRegister(instr->index()); |
2513 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2514 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2514 LInstruction* result = DefineSameAsFirst(load); | 2515 LInstruction* result = DefineSameAsFirst(load); |
2515 return AssignPointerMap(result); | 2516 return AssignPointerMap(result); |
2516 } | 2517 } |
2517 | 2518 |
2518 | 2519 |
2519 } } // namespace v8::internal | 2520 } } // namespace v8::internal |
OLD | NEW |