Index: src/compiler/access-builder.h |
diff --git a/src/compiler/access-builder.h b/src/compiler/access-builder.h |
index a22df9d59f4dc9e77e9ea8be28a7c83104341da6..b3003303ae859f7fd3eec0c2df90bbef8bca8ebb 100644 |
--- a/src/compiler/access-builder.h |
+++ b/src/compiler/access-builder.h |
@@ -16,18 +16,47 @@ namespace compiler { |
// parameters to simplified load/store operators. |
class AccessBuilder : public AllStatic { |
public: |
+ // Provides access to HeapObject::map() field. |
+ static FieldAccess ForMap() { |
+ return {kTaggedBase, HeapObject::kMapOffset, Handle<Name>(), Type::Any(), |
+ kMachAnyTagged}; |
+ } |
+ |
+ // Provides access to JSObject::properties() field. |
+ static FieldAccess ForJSObjectProperties() { |
+ return {kTaggedBase, JSObject::kPropertiesOffset, Handle<Name>(), |
+ Type::Any(), kMachAnyTagged}; |
+ } |
+ |
// Provides access to JSObject::elements() field. |
static FieldAccess ForJSObjectElements() { |
return {kTaggedBase, JSObject::kElementsOffset, Handle<Name>(), |
Type::Internal(), kMachAnyTagged}; |
} |
+ // Provides access to JSArrayBuffer::backing_store() field. |
+ static FieldAccess ForJSArrayBufferBackingStore() { |
+ return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, Handle<Name>(), |
+ Type::UntaggedPtr(), kMachPtr}; |
+ } |
+ |
// Provides access to ExternalArray::external_pointer() field. |
static FieldAccess ForExternalArrayPointer() { |
return {kTaggedBase, ExternalArray::kExternalPointerOffset, Handle<Name>(), |
Type::UntaggedPtr(), kMachPtr}; |
} |
+ // Provides access to FixedArray elements. |
+ static ElementAccess ForFixedArrayElement() { |
+ return {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), kMachAnyTagged}; |
+ } |
+ |
+ // TODO(mstarzinger): Raw access only for testing, drop me. |
+ static ElementAccess ForBackingStoreElement(MachineType rep) { |
+ return {kUntaggedBase, kNonHeapObjectHeaderSize - kHeapObjectTag, |
+ Type::Any(), rep}; |
+ } |
+ |
// Provides access to Fixed{type}TypedArray and External{type}Array elements. |
static ElementAccess ForTypedArrayElement(ExternalArrayType type, |
bool is_external) { |