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 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 LInstruction* result = new(zone()) LSeqStringSetChar(context, string, | 1858 LInstruction* result = new(zone()) LSeqStringSetChar(context, string, |
1859 index, value); | 1859 index, value); |
1860 if (FLAG_debug_code) { | 1860 if (FLAG_debug_code) { |
1861 result = MarkAsCall(result, instr); | 1861 result = MarkAsCall(result, instr); |
1862 } | 1862 } |
1863 return result; | 1863 return result; |
1864 } | 1864 } |
1865 | 1865 |
1866 | 1866 |
1867 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1867 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
1868 return AssignEnvironment(new(zone()) LBoundsCheck( | 1868 if (!FLAG_debug_code && instr->skip_check()) return NULL; |
1869 UseRegisterOrConstantAtStart(instr->index()), | 1869 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); |
1870 UseAtStart(instr->length()))); | 1870 LOperand* length = !index->IsConstantOperand() |
| 1871 ? UseOrConstantAtStart(instr->length()) |
| 1872 : UseAtStart(instr->length()); |
| 1873 LInstruction* result = new(zone()) LBoundsCheck(index, length); |
| 1874 if (!FLAG_debug_code || !instr->skip_check()) { |
| 1875 result = AssignEnvironment(result); |
| 1876 } |
| 1877 return result; |
1871 } | 1878 } |
1872 | 1879 |
1873 | 1880 |
1874 LInstruction* LChunkBuilder::DoBoundsCheckBaseIndexInformation( | 1881 LInstruction* LChunkBuilder::DoBoundsCheckBaseIndexInformation( |
1875 HBoundsCheckBaseIndexInformation* instr) { | 1882 HBoundsCheckBaseIndexInformation* instr) { |
1876 UNREACHABLE(); | 1883 UNREACHABLE(); |
1877 return NULL; | 1884 return NULL; |
1878 } | 1885 } |
1879 | 1886 |
1880 | 1887 |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2711 LOperand* index = UseTempRegister(instr->index()); | 2718 LOperand* index = UseTempRegister(instr->index()); |
2712 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2719 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2713 LInstruction* result = DefineSameAsFirst(load); | 2720 LInstruction* result = DefineSameAsFirst(load); |
2714 return AssignPointerMap(result); | 2721 return AssignPointerMap(result); |
2715 } | 2722 } |
2716 | 2723 |
2717 | 2724 |
2718 } } // namespace v8::internal | 2725 } } // namespace v8::internal |
2719 | 2726 |
2720 #endif // V8_TARGET_ARCH_IA32 | 2727 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |