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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 LInstruction* result = new(zone()) LSeqStringSetChar(context, string, | 1782 LInstruction* result = new(zone()) LSeqStringSetChar(context, string, |
1783 index, value); | 1783 index, value); |
1784 if (FLAG_debug_code) { | 1784 if (FLAG_debug_code) { |
1785 result = MarkAsCall(result, instr); | 1785 result = MarkAsCall(result, instr); |
1786 } | 1786 } |
1787 return result; | 1787 return result; |
1788 } | 1788 } |
1789 | 1789 |
1790 | 1790 |
1791 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1791 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
1792 LOperand* value = UseRegisterOrConstantAtStart(instr->index()); | 1792 if (!FLAG_debug_code && instr->skip_check()) return NULL; |
1793 LOperand* length = Use(instr->length()); | 1793 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); |
1794 return AssignEnvironment(new(zone()) LBoundsCheck(value, length)); | 1794 LOperand* length = !index->IsConstantOperand() |
| 1795 ? UseOrConstantAtStart(instr->length()) |
| 1796 : UseAtStart(instr->length()); |
| 1797 LInstruction* result = new(zone()) LBoundsCheck(index, length); |
| 1798 if (!FLAG_debug_code || !instr->skip_check()) { |
| 1799 result = AssignEnvironment(result); |
| 1800 } |
| 1801 return result; |
1795 } | 1802 } |
1796 | 1803 |
1797 | 1804 |
1798 LInstruction* LChunkBuilder::DoBoundsCheckBaseIndexInformation( | 1805 LInstruction* LChunkBuilder::DoBoundsCheckBaseIndexInformation( |
1799 HBoundsCheckBaseIndexInformation* instr) { | 1806 HBoundsCheckBaseIndexInformation* instr) { |
1800 UNREACHABLE(); | 1807 UNREACHABLE(); |
1801 return NULL; | 1808 return NULL; |
1802 } | 1809 } |
1803 | 1810 |
1804 | 1811 |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2600 LOperand* index = UseTempRegister(instr->index()); | 2607 LOperand* index = UseTempRegister(instr->index()); |
2601 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2608 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2602 LInstruction* result = DefineSameAsFirst(load); | 2609 LInstruction* result = DefineSameAsFirst(load); |
2603 return AssignPointerMap(result); | 2610 return AssignPointerMap(result); |
2604 } | 2611 } |
2605 | 2612 |
2606 | 2613 |
2607 } } // namespace v8::internal | 2614 } } // namespace v8::internal |
2608 | 2615 |
2609 #endif // V8_TARGET_ARCH_X64 | 2616 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |