OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/double.h" | 7 #include "src/double.h" |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/hydrogen-infer-representation.h" | 9 #include "src/hydrogen-infer-representation.h" |
10 #include "src/property-details-inl.h" | 10 #include "src/property-details-inl.h" |
(...skipping 4657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4668 } else { | 4668 } else { |
4669 // Non-negative property indices are in the properties array. | 4669 // Non-negative property indices are in the properties array. |
4670 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; | 4670 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; |
4671 return HObjectAccess(kBackingStore, offset, representation, name, | 4671 return HObjectAccess(kBackingStore, offset, representation, name, |
4672 false, false); | 4672 false, false); |
4673 } | 4673 } |
4674 } | 4674 } |
4675 | 4675 |
4676 | 4676 |
4677 HObjectAccess HObjectAccess::ForCellPayload(Isolate* isolate) { | 4677 HObjectAccess HObjectAccess::ForCellPayload(Isolate* isolate) { |
4678 return HObjectAccess( | 4678 return HObjectAccess(kInobject, Cell::kValueOffset, Representation::Tagged(), |
4679 kInobject, Cell::kValueOffset, Representation::Tagged(), | 4679 isolate->factory()->cell_value_string()); |
4680 Handle<String>(isolate->heap()->cell_value_string())); | |
4681 } | 4680 } |
4682 | 4681 |
4683 | 4682 |
4684 void HObjectAccess::SetGVNFlags(HValue *instr, PropertyAccessType access_type) { | 4683 void HObjectAccess::SetGVNFlags(HValue *instr, PropertyAccessType access_type) { |
4685 // set the appropriate GVN flags for a given load or store instruction | 4684 // set the appropriate GVN flags for a given load or store instruction |
4686 if (access_type == STORE) { | 4685 if (access_type == STORE) { |
4687 // track dominating allocations in order to eliminate write barriers | 4686 // track dominating allocations in order to eliminate write barriers |
4688 instr->SetDependsOnFlag(::v8::internal::kNewSpacePromotion); | 4687 instr->SetDependsOnFlag(::v8::internal::kNewSpacePromotion); |
4689 instr->SetFlag(HValue::kTrackSideEffectDominators); | 4688 instr->SetFlag(HValue::kTrackSideEffectDominators); |
4690 } else { | 4689 } else { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4783 break; | 4782 break; |
4784 case HObjectAccess::kExternalMemory: | 4783 case HObjectAccess::kExternalMemory: |
4785 os << "[external-memory]"; | 4784 os << "[external-memory]"; |
4786 break; | 4785 break; |
4787 } | 4786 } |
4788 | 4787 |
4789 return os << "@" << access.offset(); | 4788 return os << "@" << access.offset(); |
4790 } | 4789 } |
4791 | 4790 |
4792 } } // namespace v8::internal | 4791 } } // namespace v8::internal |
OLD | NEW |