| 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 3724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3735 } | 3735 } |
| 3736 } else { | 3736 } else { |
| 3737 Register reg2 = ToRegister(instr->index()); | 3737 Register reg2 = ToRegister(instr->index()); |
| 3738 if (FLAG_debug_code && | 3738 if (FLAG_debug_code && |
| 3739 !instr->hydrogen()->index()->representation().IsTagged()) { | 3739 !instr->hydrogen()->index()->representation().IsTagged()) { |
| 3740 __ AbortIfNotZeroExtended(reg2); | 3740 __ AbortIfNotZeroExtended(reg2); |
| 3741 } | 3741 } |
| 3742 __ cmpq(reg, reg2); | 3742 __ cmpq(reg, reg2); |
| 3743 } | 3743 } |
| 3744 } else { | 3744 } else { |
| 3745 Operand length = ToOperand(instr->length()); |
| 3745 if (instr->index()->IsConstantOperand()) { | 3746 if (instr->index()->IsConstantOperand()) { |
| 3746 __ cmpq(ToOperand(instr->length()), | 3747 int constant_index = |
| 3747 Immediate(ToInteger32(LConstantOperand::cast(instr->index())))); | 3748 ToInteger32(LConstantOperand::cast(instr->index())); |
| 3749 if (instr->hydrogen()->length()->representation().IsTagged()) { |
| 3750 __ Cmp(length, Smi::FromInt(constant_index)); |
| 3751 } else { |
| 3752 __ cmpq(length, Immediate(constant_index)); |
| 3753 } |
| 3748 } else { | 3754 } else { |
| 3749 __ cmpq(ToOperand(instr->length()), ToRegister(instr->index())); | 3755 __ cmpq(length, ToRegister(instr->index())); |
| 3750 } | 3756 } |
| 3751 } | 3757 } |
| 3752 DeoptimizeIf(below_equal, instr->environment()); | 3758 DeoptimizeIf(below_equal, instr->environment()); |
| 3753 } | 3759 } |
| 3754 | 3760 |
| 3755 | 3761 |
| 3756 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { | 3762 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { |
| 3757 Register value = ToRegister(instr->value()); | 3763 Register value = ToRegister(instr->value()); |
| 3758 Register elements = ToRegister(instr->object()); | 3764 Register elements = ToRegister(instr->object()); |
| 3759 LOperand* key = instr->key(); | 3765 LOperand* key = instr->key(); |
| (...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5281 FixedArray::kHeaderSize - kPointerSize)); | 5287 FixedArray::kHeaderSize - kPointerSize)); |
| 5282 __ bind(&done); | 5288 __ bind(&done); |
| 5283 } | 5289 } |
| 5284 | 5290 |
| 5285 | 5291 |
| 5286 #undef __ | 5292 #undef __ |
| 5287 | 5293 |
| 5288 } } // namespace v8::internal | 5294 } } // namespace v8::internal |
| 5289 | 5295 |
| 5290 #endif // V8_TARGET_ARCH_X64 | 5296 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |