| 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 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3767 } | 3767 } |
| 3768 } else { | 3768 } else { |
| 3769 Register reg2 = ToRegister(instr->index()); | 3769 Register reg2 = ToRegister(instr->index()); |
| 3770 if (FLAG_debug_code && | 3770 if (FLAG_debug_code && |
| 3771 !instr->hydrogen()->index()->representation().IsTagged()) { | 3771 !instr->hydrogen()->index()->representation().IsTagged()) { |
| 3772 __ AbortIfNotZeroExtended(reg2); | 3772 __ AbortIfNotZeroExtended(reg2); |
| 3773 } | 3773 } |
| 3774 __ cmpq(reg, reg2); | 3774 __ cmpq(reg, reg2); |
| 3775 } | 3775 } |
| 3776 } else { | 3776 } else { |
| 3777 Operand length = ToOperand(instr->length()); |
| 3777 if (instr->index()->IsConstantOperand()) { | 3778 if (instr->index()->IsConstantOperand()) { |
| 3778 __ cmpq(ToOperand(instr->length()), | 3779 int constant_index = |
| 3779 Immediate(ToInteger32(LConstantOperand::cast(instr->index())))); | 3780 ToInteger32(LConstantOperand::cast(instr->index())); |
| 3781 if (instr->hydrogen()->length()->representation().IsTagged()) { |
| 3782 __ Cmp(length, Smi::FromInt(constant_index)); |
| 3783 } else { |
| 3784 __ cmpq(length, Immediate(constant_index)); |
| 3785 } |
| 3780 } else { | 3786 } else { |
| 3781 __ cmpq(ToOperand(instr->length()), ToRegister(instr->index())); | 3787 __ cmpq(length, ToRegister(instr->index())); |
| 3782 } | 3788 } |
| 3783 } | 3789 } |
| 3784 DeoptimizeIf(below_equal, instr->environment()); | 3790 DeoptimizeIf(below_equal, instr->environment()); |
| 3785 } | 3791 } |
| 3786 | 3792 |
| 3787 | 3793 |
| 3788 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { | 3794 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { |
| 3789 Register value = ToRegister(instr->value()); | 3795 Register value = ToRegister(instr->value()); |
| 3790 Register elements = ToRegister(instr->object()); | 3796 Register elements = ToRegister(instr->object()); |
| 3791 LOperand* key = instr->key(); | 3797 LOperand* key = instr->key(); |
| (...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5313 FixedArray::kHeaderSize - kPointerSize)); | 5319 FixedArray::kHeaderSize - kPointerSize)); |
| 5314 __ bind(&done); | 5320 __ bind(&done); |
| 5315 } | 5321 } |
| 5316 | 5322 |
| 5317 | 5323 |
| 5318 #undef __ | 5324 #undef __ |
| 5319 | 5325 |
| 5320 } } // namespace v8::internal | 5326 } } // namespace v8::internal |
| 5321 | 5327 |
| 5322 #endif // V8_TARGET_ARCH_X64 | 5328 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |