Commit deed122b authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Structure AccessBuilder interface a bit.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1178103002

Cr-Commit-Position: refs/heads/master@{#28940}
parent 87cd8918
......@@ -37,6 +37,13 @@ FieldAccess AccessBuilder::ForJSFunctionContext() {
}
// static
FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() {
return {kTaggedBase, JSFunction::kSharedFunctionInfoOffset, Handle<Name>(),
Type::Any(), kMachAnyTagged};
}
// static
FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() {
return {kTaggedBase, JSArrayBuffer::kBackingStoreOffset, MaybeHandle<Name>(),
......@@ -129,15 +136,16 @@ FieldAccess AccessBuilder::ForContextSlot(size_t index) {
// static
FieldAccess AccessBuilder::ForStatsCounter() {
return {kUntaggedBase, 0, MaybeHandle<Name>(), Type::Signed32(), kMachInt32};
FieldAccess AccessBuilder::ForPropertyCellValue() {
return {kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(), Type::Any(),
kMachAnyTagged};
}
// static
FieldAccess AccessBuilder::ForPropertyCellValue() {
return {kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(), Type::Any(),
kMachAnyTagged};
FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() {
return {kTaggedBase, SharedFunctionInfo::kFeedbackVectorOffset,
Handle<Name>(), Type::Any(), kMachAnyTagged};
}
......@@ -192,16 +200,8 @@ ElementAccess AccessBuilder::ForSeqStringChar(String::Encoding encoding) {
// static
FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() {
return {kTaggedBase, JSFunction::kSharedFunctionInfoOffset, Handle<Name>(),
Type::Any(), kMachAnyTagged};
}
// static
FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() {
return {kTaggedBase, SharedFunctionInfo::kFeedbackVectorOffset,
Handle<Name>(), Type::Any(), kMachAnyTagged};
FieldAccess AccessBuilder::ForStatsCounter() {
return {kUntaggedBase, 0, MaybeHandle<Name>(), Type::Signed32(), kMachInt32};
}
......
......@@ -16,6 +16,9 @@ namespace compiler {
// parameters to simplified load/store operators.
class AccessBuilder final : public AllStatic {
public:
// ===========================================================================
// Access to heap object fields and elements (based on tagged pointer).
// Provides access to HeapObject::map() field.
static FieldAccess ForMap();
......@@ -28,6 +31,9 @@ class AccessBuilder final : public AllStatic {
// Provides access to JSFunction::context() field.
static FieldAccess ForJSFunctionContext();
// Provides access to JSFunction::shared() field.
static FieldAccess ForJSFunctionSharedFunctionInfo();
// Provides access to JSArrayBuffer::backing_store() field.
static FieldAccess ForJSArrayBufferBackingStore();
......@@ -64,12 +70,12 @@ class AccessBuilder final : public AllStatic {
// Provides access Context slots.
static FieldAccess ForContextSlot(size_t index);
// Provides access to the backing store of a StatsCounter.
static FieldAccess ForStatsCounter();
// Provides access to PropertyCell::value() field.
static FieldAccess ForPropertyCellValue();
// Provides access to SharedFunctionInfo::feedback_vector() field.
static FieldAccess ForSharedFunctionInfoTypeFeedbackVector();
// Provides access to FixedArray elements.
static ElementAccess ForFixedArrayElement();
......@@ -77,14 +83,17 @@ class AccessBuilder final : public AllStatic {
static ElementAccess ForTypedArrayElement(ExternalArrayType type,
bool is_external);
// Provides access to the charaters of sequential strings.
// Provides access to the characters of sequential strings.
static ElementAccess ForSeqStringChar(String::Encoding encoding);
// Provides access to the SharedFunctionInfo in a JSFunction.
static FieldAccess ForJSFunctionSharedFunctionInfo();
// ===========================================================================
// Access to global per-isolate variables (based on external reference).
// Provides access to the TypeFeedbackVector in SharedFunctionInfo.
static FieldAccess ForSharedFunctionInfoTypeFeedbackVector();
// Provides access to the backing store of a StatsCounter.
static FieldAccess ForStatsCounter();
// ===========================================================================
// Access to activation records on the stack (based on frame pointer).
// Provides access to the next frame pointer in a stack frame.
static FieldAccess ForFrameCallerFramePtr();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment