OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 // Make sure that the lithium instruction has either no fixed register | 866 // Make sure that the lithium instruction has either no fixed register |
867 // constraints in temps or the result OR no uses that are only used at | 867 // constraints in temps or the result OR no uses that are only used at |
868 // start. If this invariant doesn't hold, the register allocator can decide | 868 // start. If this invariant doesn't hold, the register allocator can decide |
869 // to insert a split of a range immediately before the instruction due to an | 869 // to insert a split of a range immediately before the instruction due to an |
870 // already allocated register needing to be used for the instruction's fixed | 870 // already allocated register needing to be used for the instruction's fixed |
871 // register constraint. In this case, The register allocator won't see an | 871 // register constraint. In this case, The register allocator won't see an |
872 // interference between the split child and the use-at-start (it would if | 872 // interference between the split child and the use-at-start (it would if |
873 // the it was just a plain use), so it is free to move the split child into | 873 // the it was just a plain use), so it is free to move the split child into |
874 // the same register that is used for the use-at-start. | 874 // the same register that is used for the use-at-start. |
875 // See https://code.google.com/p/chromium/issues/detail?id=201590 | 875 // See https://code.google.com/p/chromium/issues/detail?id=201590 |
876 if (!(instr->ClobbersRegisters() && instr->ClobbersDoubleRegisters())) { | 876 if (!(instr->ClobbersRegisters() && |
| 877 instr->ClobbersDoubleRegisters(isolate()))) { |
877 int fixed = 0; | 878 int fixed = 0; |
878 int used_at_start = 0; | 879 int used_at_start = 0; |
879 for (UseIterator it(instr); !it.Done(); it.Advance()) { | 880 for (UseIterator it(instr); !it.Done(); it.Advance()) { |
880 LUnallocated* operand = LUnallocated::cast(it.Current()); | 881 LUnallocated* operand = LUnallocated::cast(it.Current()); |
881 if (operand->IsUsedAtStart()) ++used_at_start; | 882 if (operand->IsUsedAtStart()) ++used_at_start; |
882 } | 883 } |
883 if (instr->Output() != NULL) { | 884 if (instr->Output() != NULL) { |
884 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; | 885 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; |
885 } | 886 } |
886 for (TempIterator it(instr); !it.Done(); it.Advance()) { | 887 for (TempIterator it(instr); !it.Done(); it.Advance()) { |
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 | 2582 |
2582 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2583 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2583 LOperand* object = UseRegister(instr->object()); | 2584 LOperand* object = UseRegister(instr->object()); |
2584 LOperand* index = UseRegister(instr->index()); | 2585 LOperand* index = UseRegister(instr->index()); |
2585 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2586 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2586 LInstruction* result = DefineSameAsFirst(load); | 2587 LInstruction* result = DefineSameAsFirst(load); |
2587 return AssignPointerMap(result); | 2588 return AssignPointerMap(result); |
2588 } | 2589 } |
2589 | 2590 |
2590 } } // namespace v8::internal | 2591 } } // namespace v8::internal |
OLD | NEW |