| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3943 Register write_register = object; | 3943 Register write_register = object; |
| 3944 if (!access.IsInobject()) { | 3944 if (!access.IsInobject()) { |
| 3945 write_register = ToRegister(instr->temp()); | 3945 write_register = ToRegister(instr->temp()); |
| 3946 __ movp(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); | 3946 __ movp(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); |
| 3947 } | 3947 } |
| 3948 | 3948 |
| 3949 if (representation.IsSmi() && | 3949 if (representation.IsSmi() && |
| 3950 hinstr->value()->representation().IsInteger32()) { | 3950 hinstr->value()->representation().IsInteger32()) { |
| 3951 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY); | 3951 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY); |
| 3952 #ifdef DEBUG | 3952 #ifdef DEBUG |
| 3953 __ movq(kScratchRegister, FieldOperand(write_register, offset)); | 3953 Register scratch = kScratchRegister; |
| 3954 __ AssertSmi(kScratchRegister); | 3954 __ Load(scratch, FieldOperand(write_register, offset), representation); |
| 3955 __ AssertSmi(scratch); |
| 3955 #endif | 3956 #endif |
| 3956 // Store int value directly to upper half of the smi. | 3957 // Store int value directly to upper half of the smi. |
| 3957 STATIC_ASSERT(kSmiTag == 0); | 3958 STATIC_ASSERT(kSmiTag == 0); |
| 3958 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); | 3959 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); |
| 3959 offset += kPointerSize / 2; | 3960 offset += kPointerSize / 2; |
| 3960 representation = Representation::Integer32(); | 3961 representation = Representation::Integer32(); |
| 3961 } | 3962 } |
| 3962 | 3963 |
| 3963 Operand operand = FieldOperand(write_register, offset); | 3964 Operand operand = FieldOperand(write_register, offset); |
| 3964 | 3965 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4199 __ movsxlq(key_reg, key_reg); | 4200 __ movsxlq(key_reg, key_reg); |
| 4200 } | 4201 } |
| 4201 } | 4202 } |
| 4202 | 4203 |
| 4203 int offset = FixedArray::kHeaderSize - kHeapObjectTag; | 4204 int offset = FixedArray::kHeaderSize - kHeapObjectTag; |
| 4204 Representation representation = hinstr->value()->representation(); | 4205 Representation representation = hinstr->value()->representation(); |
| 4205 | 4206 |
| 4206 if (representation.IsInteger32()) { | 4207 if (representation.IsInteger32()) { |
| 4207 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY); | 4208 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY); |
| 4208 ASSERT(hinstr->elements_kind() == FAST_SMI_ELEMENTS); | 4209 ASSERT(hinstr->elements_kind() == FAST_SMI_ELEMENTS); |
| 4210 #ifdef DEBUG |
| 4211 Register scratch = kScratchRegister; |
| 4212 __ Load(scratch, |
| 4213 BuildFastArrayOperand(instr->elements(), |
| 4214 key, |
| 4215 FAST_ELEMENTS, |
| 4216 offset, |
| 4217 instr->additional_index()), |
| 4218 Representation::Smi()); |
| 4219 __ AssertSmi(scratch); |
| 4220 #endif |
| 4209 // Store int value directly to upper half of the smi. | 4221 // Store int value directly to upper half of the smi. |
| 4210 STATIC_ASSERT(kSmiTag == 0); | 4222 STATIC_ASSERT(kSmiTag == 0); |
| 4211 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); | 4223 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); |
| 4212 offset += kPointerSize / 2; | 4224 offset += kPointerSize / 2; |
| 4213 } | 4225 } |
| 4214 | 4226 |
| 4215 Operand operand = | 4227 Operand operand = |
| 4216 BuildFastArrayOperand(instr->elements(), | 4228 BuildFastArrayOperand(instr->elements(), |
| 4217 key, | 4229 key, |
| 4218 FAST_ELEMENTS, | 4230 FAST_ELEMENTS, |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5569 FixedArray::kHeaderSize - kPointerSize)); | 5581 FixedArray::kHeaderSize - kPointerSize)); |
| 5570 __ bind(&done); | 5582 __ bind(&done); |
| 5571 } | 5583 } |
| 5572 | 5584 |
| 5573 | 5585 |
| 5574 #undef __ | 5586 #undef __ |
| 5575 | 5587 |
| 5576 } } // namespace v8::internal | 5588 } } // namespace v8::internal |
| 5577 | 5589 |
| 5578 #endif // V8_TARGET_ARCH_X64 | 5590 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |