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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 // Make sure that the lithium instruction has either no fixed register | 874 // Make sure that the lithium instruction has either no fixed register |
875 // constraints in temps or the result OR no uses that are only used at | 875 // constraints in temps or the result OR no uses that are only used at |
876 // start. If this invariant doesn't hold, the register allocator can decide | 876 // start. If this invariant doesn't hold, the register allocator can decide |
877 // to insert a split of a range immediately before the instruction due to an | 877 // to insert a split of a range immediately before the instruction due to an |
878 // already allocated register needing to be used for the instruction's fixed | 878 // already allocated register needing to be used for the instruction's fixed |
879 // register constraint. In this case, The register allocator won't see an | 879 // register constraint. In this case, The register allocator won't see an |
880 // interference between the split child and the use-at-start (it would if | 880 // interference between the split child and the use-at-start (it would if |
881 // the it was just a plain use), so it is free to move the split child into | 881 // the it was just a plain use), so it is free to move the split child into |
882 // the same register that is used for the use-at-start. | 882 // the same register that is used for the use-at-start. |
883 // See https://code.google.com/p/chromium/issues/detail?id=201590 | 883 // See https://code.google.com/p/chromium/issues/detail?id=201590 |
884 if (!(instr->ClobbersRegisters() && instr->ClobbersDoubleRegisters())) { | 884 if (!(instr->ClobbersRegisters() && |
| 885 instr->ClobbersDoubleRegisters(isolate()))) { |
885 int fixed = 0; | 886 int fixed = 0; |
886 int used_at_start = 0; | 887 int used_at_start = 0; |
887 for (UseIterator it(instr); !it.Done(); it.Advance()) { | 888 for (UseIterator it(instr); !it.Done(); it.Advance()) { |
888 LUnallocated* operand = LUnallocated::cast(it.Current()); | 889 LUnallocated* operand = LUnallocated::cast(it.Current()); |
889 if (operand->IsUsedAtStart()) ++used_at_start; | 890 if (operand->IsUsedAtStart()) ++used_at_start; |
890 } | 891 } |
891 if (instr->Output() != NULL) { | 892 if (instr->Output() != NULL) { |
892 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; | 893 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; |
893 } | 894 } |
894 for (TempIterator it(instr); !it.Done(); it.Advance()) { | 895 for (TempIterator it(instr); !it.Done(); it.Advance()) { |
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2533 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2534 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2534 LOperand* object = UseRegister(instr->object()); | 2535 LOperand* object = UseRegister(instr->object()); |
2535 LOperand* index = UseRegister(instr->index()); | 2536 LOperand* index = UseRegister(instr->index()); |
2536 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2537 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2537 LInstruction* result = DefineSameAsFirst(load); | 2538 LInstruction* result = DefineSameAsFirst(load); |
2538 return AssignPointerMap(result); | 2539 return AssignPointerMap(result); |
2539 } | 2540 } |
2540 | 2541 |
2541 | 2542 |
2542 } } // namespace v8::internal | 2543 } } // namespace v8::internal |
OLD | NEW |