| 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/hydrogen-instructions.h" | 5 #include "src/hydrogen-instructions.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/double.h" | 8 #include "src/double.h" |
| 9 #include "src/elements.h" | 9 #include "src/elements.h" |
| 10 #include "src/factory.h" | 10 #include "src/factory.h" |
| (...skipping 4571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4582 HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset, | 4582 HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset, |
| 4583 Representation representation) { | 4583 Representation representation) { |
| 4584 DCHECK(offset >= 0); | 4584 DCHECK(offset >= 0); |
| 4585 return HObjectAccess(kBackingStore, offset, representation, | 4585 return HObjectAccess(kBackingStore, offset, representation, |
| 4586 Handle<String>::null(), false, false); | 4586 Handle<String>::null(), false, false); |
| 4587 } | 4587 } |
| 4588 | 4588 |
| 4589 | 4589 |
| 4590 HObjectAccess HObjectAccess::ForField(Handle<Map> map, int index, | 4590 HObjectAccess HObjectAccess::ForField(Handle<Map> map, int index, |
| 4591 Representation representation, | 4591 Representation representation, |
| 4592 Handle<String> name) { | 4592 Handle<Name> name) { |
| 4593 if (index < 0) { | 4593 if (index < 0) { |
| 4594 // Negative property indices are in-object properties, indexed | 4594 // Negative property indices are in-object properties, indexed |
| 4595 // from the end of the fixed part of the object. | 4595 // from the end of the fixed part of the object. |
| 4596 int offset = (index * kPointerSize) + map->instance_size(); | 4596 int offset = (index * kPointerSize) + map->instance_size(); |
| 4597 return HObjectAccess(kInobject, offset, representation, name, false, true); | 4597 return HObjectAccess(kInobject, offset, representation, name, false, true); |
| 4598 } else { | 4598 } else { |
| 4599 // Non-negative property indices are in the properties array. | 4599 // Non-negative property indices are in the properties array. |
| 4600 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; | 4600 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; |
| 4601 return HObjectAccess(kBackingStore, offset, representation, name, | 4601 return HObjectAccess(kBackingStore, offset, representation, name, |
| 4602 false, false); | 4602 false, false); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4707 case HObjectAccess::kExternalMemory: | 4707 case HObjectAccess::kExternalMemory: |
| 4708 os << "[external-memory]"; | 4708 os << "[external-memory]"; |
| 4709 break; | 4709 break; |
| 4710 } | 4710 } |
| 4711 | 4711 |
| 4712 return os << "@" << access.offset(); | 4712 return os << "@" << access.offset(); |
| 4713 } | 4713 } |
| 4714 | 4714 |
| 4715 } // namespace internal | 4715 } // namespace internal |
| 4716 } // namespace v8 | 4716 } // namespace v8 |
| OLD | NEW |