Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: src/compiler/access-builder.cc

Issue 1943743003: Revert of [turbofan] Restore basic write barrier elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/change-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-builder.cc
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc
index d4187faaaddd512d3f6bf4eb51d16d2515e425cc..d6fc2263baaa7ac950122a7cd7c69e1f2ed35ab8 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -16,39 +16,36 @@
// static
FieldAccess AccessBuilder::ForMap() {
- FieldAccess access = {
- kTaggedBase, HeapObject::kMapOffset, MaybeHandle<Name>(),
- Type::Any(), MachineType::AnyTagged(), kMapWriteBarrier};
+ FieldAccess access = {kTaggedBase, HeapObject::kMapOffset,
+ MaybeHandle<Name>(), Type::Any(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForHeapNumberValue() {
- FieldAccess access = {kTaggedBase,
- HeapNumber::kValueOffset,
- MaybeHandle<Name>(),
- TypeCache::Get().kFloat64,
- MachineType::Float64(),
- kNoWriteBarrier};
+ FieldAccess access = {kTaggedBase, HeapNumber::kValueOffset,
+ MaybeHandle<Name>(), TypeCache::Get().kFloat64,
+ MachineType::Float64()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSObjectProperties() {
- FieldAccess access = {
- kTaggedBase, JSObject::kPropertiesOffset, MaybeHandle<Name>(),
- Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSObject::kPropertiesOffset,
+ MaybeHandle<Name>(), Type::Internal(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSObjectElements() {
- FieldAccess access = {
- kTaggedBase, JSObject::kElementsOffset, MaybeHandle<Name>(),
- Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSObject::kElementsOffset,
+ MaybeHandle<Name>(), Type::Internal(),
+ MachineType::AnyTagged()};
return access;
}
@@ -57,93 +54,70 @@
FieldAccess AccessBuilder::ForJSObjectInObjectProperty(Handle<Map> map,
int index) {
int const offset = map->GetInObjectPropertyOffset(index);
- FieldAccess access = {kTaggedBase,
- offset,
- MaybeHandle<Name>(),
- Type::Tagged(),
- MachineType::AnyTagged(),
- kFullWriteBarrier};
+ FieldAccess access = {kTaggedBase, offset, MaybeHandle<Name>(),
+ Type::Tagged(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() {
- FieldAccess access = {kTaggedBase,
- JSFunction::kPrototypeOrInitialMapOffset,
- MaybeHandle<Name>(),
- Type::Any(),
- MachineType::AnyTagged(),
- kFullWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSFunction::kPrototypeOrInitialMapOffset,
+ MaybeHandle<Name>(), Type::Any(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSFunctionContext() {
- FieldAccess access = {
- kTaggedBase, JSFunction::kContextOffset, MaybeHandle<Name>(),
- Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSFunction::kContextOffset,
+ MaybeHandle<Name>(), Type::Internal(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() {
- FieldAccess access = {kTaggedBase,
- JSFunction::kSharedFunctionInfoOffset,
- Handle<Name>(),
- Type::Any(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSFunction::kSharedFunctionInfoOffset,
+ Handle<Name>(), Type::Any(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSFunctionLiterals() {
- FieldAccess access = {
- kTaggedBase, JSFunction::kLiteralsOffset, Handle<Name>(),
- Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSFunction::kLiteralsOffset,
+ Handle<Name>(), Type::Internal(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSFunctionCodeEntry() {
- FieldAccess access = {kTaggedBase,
- JSFunction::kCodeEntryOffset,
- Handle<Name>(),
- Type::UntaggedPointer(),
- MachineType::Pointer(),
- kNoWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSFunction::kCodeEntryOffset,
+ Handle<Name>(), Type::UntaggedPointer(),
+ MachineType::Pointer()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSFunctionNextFunctionLink() {
- FieldAccess access = {kTaggedBase,
- JSFunction::kNextFunctionLinkOffset,
- Handle<Name>(),
- Type::Any(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSFunction::kNextFunctionLinkOffset,
+ Handle<Name>(), Type::Any(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) {
TypeCache const& type_cache = TypeCache::Get();
- FieldAccess access = {kTaggedBase,
- JSArray::kLengthOffset,
- Handle<Name>(),
+ FieldAccess access = {kTaggedBase, JSArray::kLengthOffset, Handle<Name>(),
type_cache.kJSArrayLengthType,
- MachineType::AnyTagged(),
- kFullWriteBarrier};
+ MachineType::AnyTagged()};
if (IsFastDoubleElementsKind(elements_kind)) {
access.type = type_cache.kFixedDoubleArrayLengthType;
- access.write_barrier_kind = kNoWriteBarrier;
} else if (IsFastElementsKind(elements_kind)) {
access.type = type_cache.kFixedArrayLengthType;
- access.write_barrier_kind = kNoWriteBarrier;
}
return access;
}
@@ -151,228 +125,190 @@
// static
FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() {
- FieldAccess access = {kTaggedBase,
- JSArrayBuffer::kBackingStoreOffset,
- MaybeHandle<Name>(),
- Type::UntaggedPointer(),
- MachineType::Pointer(),
- kNoWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSArrayBuffer::kBackingStoreOffset,
+ MaybeHandle<Name>(), Type::UntaggedPointer(),
+ MachineType::Pointer()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSArrayBufferBitField() {
- FieldAccess access = {kTaggedBase, JSArrayBuffer::kBitFieldOffset,
+ FieldAccess access = {kTaggedBase, JSArrayBuffer::kBitFieldOffset,
MaybeHandle<Name>(), TypeCache::Get().kInt8,
- MachineType::Int8(), kNoWriteBarrier};
+ MachineType::Int8()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() {
- FieldAccess access = {kTaggedBase,
- JSArrayBufferView::kBufferOffset,
- MaybeHandle<Name>(),
- Type::TaggedPointer(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSArrayBufferView::kBufferOffset,
+ MaybeHandle<Name>(), Type::TaggedPointer(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) {
- FieldAccess access = {kTaggedBase,
- JSDate::kValueOffset + index * kPointerSize,
- MaybeHandle<Name>(),
- Type::Number(),
- MachineType::AnyTagged(),
- kFullWriteBarrier};
+ FieldAccess access = {
+ kTaggedBase, JSDate::kValueOffset + index * kPointerSize,
+ MaybeHandle<Name>(), Type::Number(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSIteratorResultDone() {
+ FieldAccess access = {kTaggedBase, JSIteratorResult::kDoneOffset,
+ MaybeHandle<Name>(), Type::Any(),
+ MachineType::AnyTagged()};
+ return access;
+}
+
+
+// static
+FieldAccess AccessBuilder::ForJSIteratorResultValue() {
+ FieldAccess access = {kTaggedBase, JSIteratorResult::kValueOffset,
+ MaybeHandle<Name>(), Type::Any(),
+ MachineType::AnyTagged()};
+ return access;
+}
+
+
+// static
+FieldAccess AccessBuilder::ForJSRegExpFlags() {
+ FieldAccess access = {kTaggedBase, JSRegExp::kFlagsOffset,
+ MaybeHandle<Name>(), Type::Tagged(),
+ MachineType::AnyTagged()};
+ return access;
+}
+
+
+// static
+FieldAccess AccessBuilder::ForJSRegExpSource() {
+ FieldAccess access = {kTaggedBase, JSRegExp::kSourceOffset,
+ MaybeHandle<Name>(), Type::Tagged(),
+ MachineType::AnyTagged()};
+ return access;
+}
+
+
+// static
+FieldAccess AccessBuilder::ForFixedArrayLength() {
FieldAccess access = {
- kTaggedBase, JSIteratorResult::kDoneOffset, MaybeHandle<Name>(),
- Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier};
- return access;
-}
-
-
-// static
-FieldAccess AccessBuilder::ForJSIteratorResultValue() {
+ kTaggedBase, FixedArray::kLengthOffset, MaybeHandle<Name>(),
+ TypeCache::Get().kFixedArrayLengthType, MachineType::AnyTagged()};
+ return access;
+}
+
+
+// static
+FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() {
+ FieldAccess access = {kTaggedBase, DescriptorArray::kEnumCacheOffset,
+ Handle<Name>(), Type::TaggedPointer(),
+ MachineType::AnyTagged()};
+ return access;
+}
+
+
+// static
+FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() {
FieldAccess access = {
- kTaggedBase, JSIteratorResult::kValueOffset, MaybeHandle<Name>(),
- Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier};
- return access;
-}
-
-
-// static
-FieldAccess AccessBuilder::ForJSRegExpFlags() {
- FieldAccess access = {
- kTaggedBase, JSRegExp::kFlagsOffset, MaybeHandle<Name>(),
- Type::Tagged(), MachineType::AnyTagged(), kFullWriteBarrier};
- return access;
-}
-
-
-// static
-FieldAccess AccessBuilder::ForJSRegExpSource() {
- FieldAccess access = {
- kTaggedBase, JSRegExp::kSourceOffset, MaybeHandle<Name>(),
- Type::Tagged(), MachineType::AnyTagged(), kFullWriteBarrier};
- return access;
-}
-
-
-// static
-FieldAccess AccessBuilder::ForFixedArrayLength() {
- FieldAccess access = {kTaggedBase,
- FixedArray::kLengthOffset,
- MaybeHandle<Name>(),
- TypeCache::Get().kFixedArrayLengthType,
- MachineType::AnyTagged(),
- kNoWriteBarrier};
- return access;
-}
-
-
-// static
-FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() {
- FieldAccess access = {kTaggedBase,
- DescriptorArray::kEnumCacheOffset,
- Handle<Name>(),
- Type::TaggedPointer(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
- return access;
-}
-
-
-// static
-FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() {
- FieldAccess access = {kTaggedBase,
- DescriptorArray::kEnumCacheBridgeCacheOffset,
- Handle<Name>(),
- Type::TaggedPointer(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ kTaggedBase, DescriptorArray::kEnumCacheBridgeCacheOffset, Handle<Name>(),
+ Type::TaggedPointer(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForMapBitField() {
- FieldAccess access = {kTaggedBase, Map::kBitFieldOffset,
- Handle<Name>(), TypeCache::Get().kUint8,
- MachineType::Uint8(), kNoWriteBarrier};
+ FieldAccess access = {kTaggedBase, Map::kBitFieldOffset, Handle<Name>(),
+ TypeCache::Get().kUint8, MachineType::Uint8()};
return access;
}
// static
FieldAccess AccessBuilder::ForMapBitField3() {
- FieldAccess access = {kTaggedBase, Map::kBitField3Offset,
- Handle<Name>(), TypeCache::Get().kInt32,
- MachineType::Int32(), kNoWriteBarrier};
+ FieldAccess access = {kTaggedBase, Map::kBitField3Offset, Handle<Name>(),
+ TypeCache::Get().kInt32, MachineType::Int32()};
return access;
}
// static
FieldAccess AccessBuilder::ForMapDescriptors() {
- FieldAccess access = {
- kTaggedBase, Map::kDescriptorsOffset, Handle<Name>(),
- Type::TaggedPointer(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, Map::kDescriptorsOffset, Handle<Name>(),
+ Type::TaggedPointer(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForMapInstanceType() {
- FieldAccess access = {kTaggedBase, Map::kInstanceTypeOffset,
- Handle<Name>(), TypeCache::Get().kUint8,
- MachineType::Uint8(), kNoWriteBarrier};
+ FieldAccess access = {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(),
+ TypeCache::Get().kUint8, MachineType::Uint8()};
return access;
}
// static
FieldAccess AccessBuilder::ForMapPrototype() {
- FieldAccess access = {
- kTaggedBase, Map::kPrototypeOffset, Handle<Name>(),
- Type::TaggedPointer(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, Map::kPrototypeOffset, Handle<Name>(),
+ Type::TaggedPointer(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForStringLength() {
- FieldAccess access = {kTaggedBase,
- String::kLengthOffset,
- Handle<Name>(),
+ FieldAccess access = {kTaggedBase, String::kLengthOffset, Handle<Name>(),
TypeCache::Get().kStringLengthType,
- MachineType::AnyTagged(),
- kNoWriteBarrier};
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSGlobalObjectGlobalProxy() {
- FieldAccess access = {kTaggedBase,
- JSGlobalObject::kGlobalProxyOffset,
- Handle<Name>(),
- Type::Receiver(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSGlobalObject::kGlobalProxyOffset,
+ Handle<Name>(), Type::Receiver(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() {
- FieldAccess access = {kTaggedBase,
- JSGlobalObject::kNativeContextOffset,
- Handle<Name>(),
- Type::Internal(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSGlobalObject::kNativeContextOffset,
+ Handle<Name>(), Type::Internal(),
+ MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForValue() {
- FieldAccess access = {
- kTaggedBase, JSValue::kValueOffset, Handle<Name>(),
- Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSValue::kValueOffset, Handle<Name>(),
+ Type::Any(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForArgumentsLength() {
- FieldAccess access = {
- kTaggedBase, JSArgumentsObject::kLengthOffset, Handle<Name>(),
- Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSArgumentsObject::kLengthOffset,
+ Handle<Name>(), Type::Any(), MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForArgumentsCallee() {
- FieldAccess access = {kTaggedBase,
- JSSloppyArgumentsObject::kCalleeOffset,
- Handle<Name>(),
- Type::Any(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, JSSloppyArgumentsObject::kCalleeOffset,
+ Handle<Name>(), Type::Any(), MachineType::AnyTagged()};
return access;
}
@@ -380,12 +316,8 @@
// static
FieldAccess AccessBuilder::ForFixedArraySlot(size_t index) {
int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index));
- FieldAccess access = {kTaggedBase,
- offset,
- Handle<Name>(),
- Type::Any(),
- MachineType::AnyTagged(),
- kFullWriteBarrier};
+ FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(),
+ MachineType::AnyTagged()};
return access;
}
@@ -395,12 +327,8 @@
int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize;
DCHECK_EQ(offset,
Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag);
- FieldAccess access = {kTaggedBase,
- offset,
- Handle<Name>(),
- Type::Any(),
- MachineType::AnyTagged(),
- kFullWriteBarrier};
+ FieldAccess access = {kTaggedBase, offset, Handle<Name>(), Type::Any(),
+ MachineType::AnyTagged()};
return access;
}
@@ -413,21 +341,16 @@
// static
FieldAccess AccessBuilder::ForPropertyCellValue(Type* type) {
- FieldAccess access = {
- kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(),
- type, MachineType::AnyTagged(), kFullWriteBarrier};
+ FieldAccess access = {kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(),
+ type, MachineType::AnyTagged()};
return access;
}
// static
FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() {
- FieldAccess access = {kTaggedBase,
- SharedFunctionInfo::kFeedbackVectorOffset,
- Handle<Name>(),
- Type::Any(),
- MachineType::AnyTagged(),
- kPointerWriteBarrier};
+ FieldAccess access = {kTaggedBase, SharedFunctionInfo::kFeedbackVectorOffset,
+ Handle<Name>(), Type::Any(), MachineType::AnyTagged()};
return access;
}
@@ -435,7 +358,7 @@
// static
ElementAccess AccessBuilder::ForFixedArrayElement() {
ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(),
- MachineType::AnyTagged(), kFullWriteBarrier};
+ MachineType::AnyTagged()};
return access;
}
@@ -443,8 +366,7 @@
// static
ElementAccess AccessBuilder::ForFixedDoubleArrayElement() {
ElementAccess access = {kTaggedBase, FixedDoubleArray::kHeaderSize,
- TypeCache::Get().kFloat64, MachineType::Float64(),
- kNoWriteBarrier};
+ TypeCache::Get().kFloat64, MachineType::Float64()};
return access;
}
@@ -457,49 +379,56 @@
switch (type) {
case kExternalInt8Array: {
ElementAccess access = {taggedness, header_size, Type::Signed32(),
- MachineType::Int8(), kNoWriteBarrier};
+ MachineType::Int8()};
return access;
}
case kExternalUint8Array:
case kExternalUint8ClampedArray: {
ElementAccess access = {taggedness, header_size, Type::Unsigned32(),
- MachineType::Uint8(), kNoWriteBarrier};
+ MachineType::Uint8()};
return access;
}
case kExternalInt16Array: {
ElementAccess access = {taggedness, header_size, Type::Signed32(),
- MachineType::Int16(), kNoWriteBarrier};
+ MachineType::Int16()};
return access;
}
case kExternalUint16Array: {
ElementAccess access = {taggedness, header_size, Type::Unsigned32(),
- MachineType::Uint16(), kNoWriteBarrier};
+ MachineType::Uint16()};
return access;
}
case kExternalInt32Array: {
ElementAccess access = {taggedness, header_size, Type::Signed32(),
- MachineType::Int32(), kNoWriteBarrier};
+ MachineType::Int32()};
return access;
}
case kExternalUint32Array: {
ElementAccess access = {taggedness, header_size, Type::Unsigned32(),
- MachineType::Uint32(), kNoWriteBarrier};
+ MachineType::Uint32()};
return access;
}
case kExternalFloat32Array: {
ElementAccess access = {taggedness, header_size, Type::Number(),
- MachineType::Float32(), kNoWriteBarrier};
+ MachineType::Float32()};
return access;
}
case kExternalFloat64Array: {
ElementAccess access = {taggedness, header_size, Type::Number(),
- MachineType::Float64(), kNoWriteBarrier};
+ MachineType::Float64()};
return access;
}
}
UNREACHABLE();
- ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(),
- kNoWriteBarrier};
+ ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None()};
+ return access;
+}
+
+
+// static
+FieldAccess AccessBuilder::ForStatsCounter() {
+ FieldAccess access = {kUntaggedBase, 0, MaybeHandle<Name>(),
+ TypeCache::Get().kInt32, MachineType::Int32()};
return access;
}
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/change-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698