| 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 5033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5044 HObjectAccess access = instr->hydrogen()->access(); | 5044 HObjectAccess access = instr->hydrogen()->access(); |
| 5045 int offset = access.offset(); | 5045 int offset = access.offset(); |
| 5046 | 5046 |
| 5047 if (access.IsExternalMemory()) { | 5047 if (access.IsExternalMemory()) { |
| 5048 Register value = ToRegister(instr->value()); | 5048 Register value = ToRegister(instr->value()); |
| 5049 __ Store(value, MemOperand(object, offset), representation); | 5049 __ Store(value, MemOperand(object, offset), representation); |
| 5050 return; | 5050 return; |
| 5051 } | 5051 } |
| 5052 | 5052 |
| 5053 Handle<Map> transition = instr->transition(); | 5053 Handle<Map> transition = instr->transition(); |
| 5054 SmiCheck check_needed = |
| 5055 instr->hydrogen()->value()->IsHeapObject() |
| 5056 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
| 5054 | 5057 |
| 5055 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 5058 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 5056 Register value = ToRegister(instr->value()); | 5059 Register value = ToRegister(instr->value()); |
| 5057 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 5060 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
| 5058 DeoptimizeIfSmi(value, instr->environment()); | 5061 DeoptimizeIfSmi(value, instr->environment()); |
| 5062 |
| 5063 // We know that value is a smi now, so we can omit the check below. |
| 5064 check_needed = OMIT_SMI_CHECK; |
| 5059 } | 5065 } |
| 5060 } else if (representation.IsDouble()) { | 5066 } else if (representation.IsDouble()) { |
| 5061 ASSERT(transition.is_null()); | 5067 ASSERT(transition.is_null()); |
| 5062 ASSERT(access.IsInobject()); | 5068 ASSERT(access.IsInobject()); |
| 5063 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 5069 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
| 5064 FPRegister value = ToDoubleRegister(instr->value()); | 5070 FPRegister value = ToDoubleRegister(instr->value()); |
| 5065 __ Str(value, FieldMemOperand(object, offset)); | 5071 __ Str(value, FieldMemOperand(object, offset)); |
| 5066 return; | 5072 return; |
| 5067 } | 5073 } |
| 5068 | 5074 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 5080 GetLinkRegisterState(), | 5086 GetLinkRegisterState(), |
| 5081 kSaveFPRegs, | 5087 kSaveFPRegs, |
| 5082 OMIT_REMEMBERED_SET, | 5088 OMIT_REMEMBERED_SET, |
| 5083 OMIT_SMI_CHECK); | 5089 OMIT_SMI_CHECK); |
| 5084 } | 5090 } |
| 5085 } | 5091 } |
| 5086 | 5092 |
| 5087 // Do the store. | 5093 // Do the store. |
| 5088 Register value = ToRegister(instr->value()); | 5094 Register value = ToRegister(instr->value()); |
| 5089 Register destination; | 5095 Register destination; |
| 5090 SmiCheck check_needed = | |
| 5091 instr->hydrogen()->value()->IsHeapObject() | |
| 5092 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | |
| 5093 if (access.IsInobject()) { | 5096 if (access.IsInobject()) { |
| 5094 destination = object; | 5097 destination = object; |
| 5095 } else { | 5098 } else { |
| 5096 __ Ldr(temp0, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5099 __ Ldr(temp0, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5097 destination = temp0; | 5100 destination = temp0; |
| 5098 } | 5101 } |
| 5099 | 5102 |
| 5100 if (representation.IsSmi() && | 5103 if (representation.IsSmi() && |
| 5101 instr->hydrogen()->value()->representation().IsInteger32()) { | 5104 instr->hydrogen()->value()->representation().IsInteger32()) { |
| 5102 ASSERT(instr->hydrogen()->store_mode() == STORE_TO_INITIALIZED_ENTRY); | 5105 ASSERT(instr->hydrogen()->store_mode() == STORE_TO_INITIALIZED_ENTRY); |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5694 __ Bind(&out_of_object); | 5697 __ Bind(&out_of_object); |
| 5695 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5698 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5696 // Index is equal to negated out of object property index plus 1. | 5699 // Index is equal to negated out of object property index plus 1. |
| 5697 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5700 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5698 __ Ldr(result, FieldMemOperand(result, | 5701 __ Ldr(result, FieldMemOperand(result, |
| 5699 FixedArray::kHeaderSize - kPointerSize)); | 5702 FixedArray::kHeaderSize - kPointerSize)); |
| 5700 __ Bind(&done); | 5703 __ Bind(&done); |
| 5701 } | 5704 } |
| 5702 | 5705 |
| 5703 } } // namespace v8::internal | 5706 } } // namespace v8::internal |
| OLD | NEW |