| 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 3625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3636 } | 3636 } |
| 3637 } else { | 3637 } else { |
| 3638 Register reg2 = ToRegister(instr->index()); | 3638 Register reg2 = ToRegister(instr->index()); |
| 3639 if (FLAG_debug_code && | 3639 if (FLAG_debug_code && |
| 3640 !instr->hydrogen()->index()->representation().IsTagged()) { | 3640 !instr->hydrogen()->index()->representation().IsTagged()) { |
| 3641 __ AbortIfNotZeroExtended(reg2); | 3641 __ AbortIfNotZeroExtended(reg2); |
| 3642 } | 3642 } |
| 3643 __ cmpq(reg, reg2); | 3643 __ cmpq(reg, reg2); |
| 3644 } | 3644 } |
| 3645 } else { | 3645 } else { |
| 3646 Operand length = ToOperand(instr->length()); | |
| 3647 if (instr->index()->IsConstantOperand()) { | 3646 if (instr->index()->IsConstantOperand()) { |
| 3648 int constant_index = | 3647 __ cmpq(ToOperand(instr->length()), |
| 3649 ToInteger32(LConstantOperand::cast(instr->index())); | 3648 Immediate(ToInteger32(LConstantOperand::cast(instr->index())))); |
| 3650 if (instr->hydrogen()->length()->representation().IsTagged()) { | |
| 3651 __ Cmp(length, Smi::FromInt(constant_index)); | |
| 3652 } else { | |
| 3653 __ cmpq(length, Immediate(constant_index)); | |
| 3654 } | |
| 3655 } else { | 3649 } else { |
| 3656 __ cmpq(length, ToRegister(instr->index())); | 3650 __ cmpq(ToOperand(instr->length()), ToRegister(instr->index())); |
| 3657 } | 3651 } |
| 3658 } | 3652 } |
| 3659 DeoptimizeIf(below_equal, instr->environment()); | 3653 DeoptimizeIf(below_equal, instr->environment()); |
| 3660 } | 3654 } |
| 3661 | 3655 |
| 3662 | 3656 |
| 3663 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { | 3657 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { |
| 3664 Register value = ToRegister(instr->value()); | 3658 Register value = ToRegister(instr->value()); |
| 3665 Register elements = ToRegister(instr->object()); | 3659 Register elements = ToRegister(instr->object()); |
| 3666 LOperand* key = instr->key(); | 3660 LOperand* key = instr->key(); |
| (...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5106 FixedArray::kHeaderSize - kPointerSize)); | 5100 FixedArray::kHeaderSize - kPointerSize)); |
| 5107 __ bind(&done); | 5101 __ bind(&done); |
| 5108 } | 5102 } |
| 5109 | 5103 |
| 5110 | 5104 |
| 5111 #undef __ | 5105 #undef __ |
| 5112 | 5106 |
| 5113 } } // namespace v8::internal | 5107 } } // namespace v8::internal |
| 5114 | 5108 |
| 5115 #endif // V8_TARGET_ARCH_X64 | 5109 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |