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 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1789 | 1789 |
1790 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1790 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
1791 LOperand* string = UseRegisterAtStart(instr->string()); | 1791 LOperand* string = UseRegisterAtStart(instr->string()); |
1792 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); | 1792 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); |
1793 return DefineAsRegister(new(zone()) LSeqStringGetChar(string, index)); | 1793 return DefineAsRegister(new(zone()) LSeqStringGetChar(string, index)); |
1794 } | 1794 } |
1795 | 1795 |
1796 | 1796 |
1797 LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) { | 1797 LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) { |
1798 LOperand* string = UseRegisterAtStart(instr->string()); | 1798 LOperand* string = UseRegisterAtStart(instr->string()); |
1799 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); | 1799 LOperand* index = FLAG_debug_code |
1800 LOperand* value = UseRegisterOrConstantAtStart(instr->value()); | 1800 ? UseRegisterAtStart(instr->index()) |
1801 return new(zone()) LSeqStringSetChar(string, index, value); | 1801 : UseRegisterOrConstantAtStart(instr->index()); |
| 1802 LOperand* value = FLAG_debug_code |
| 1803 ? UseRegisterAtStart(instr->value()) |
| 1804 : UseRegisterOrConstantAtStart(instr->value()); |
| 1805 LOperand* context = FLAG_debug_code ? UseFixed(instr->context(), rsi) : NULL; |
| 1806 LInstruction* result = new(zone()) LSeqStringSetChar(context, string, |
| 1807 index, value); |
| 1808 if (FLAG_debug_code) { |
| 1809 result = MarkAsCall(result, instr); |
| 1810 } |
| 1811 return result; |
1802 } | 1812 } |
1803 | 1813 |
1804 | 1814 |
1805 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1815 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
1806 LOperand* value = UseRegisterOrConstantAtStart(instr->index()); | 1816 LOperand* value = UseRegisterOrConstantAtStart(instr->index()); |
1807 LOperand* length = Use(instr->length()); | 1817 LOperand* length = Use(instr->length()); |
1808 return AssignEnvironment(new(zone()) LBoundsCheck(value, length)); | 1818 return AssignEnvironment(new(zone()) LBoundsCheck(value, length)); |
1809 } | 1819 } |
1810 | 1820 |
1811 | 1821 |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2626 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2617 LOperand* object = UseRegister(instr->object()); | 2627 LOperand* object = UseRegister(instr->object()); |
2618 LOperand* index = UseTempRegister(instr->index()); | 2628 LOperand* index = UseTempRegister(instr->index()); |
2619 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2629 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2620 } | 2630 } |
2621 | 2631 |
2622 | 2632 |
2623 } } // namespace v8::internal | 2633 } } // namespace v8::internal |
2624 | 2634 |
2625 #endif // V8_TARGET_ARCH_X64 | 2635 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |