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

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

Issue 2258073002: [Turbofan]: Use new MachineTypes in access-builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: A bit of refactoring. Created 4 years, 4 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 | « no previous file | src/compiler/arm/instruction-selector-arm.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 80d3c8be9f5c8dd3d867e09d1db00a767f9e0440..26a0150aa43fd713c54462f88eb0e73af1921845 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -230,7 +230,7 @@ FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() {
JSArrayBufferView::kBufferOffset,
MaybeHandle<Name>(),
Type::TaggedPointer(),
- MachineType::AnyTagged(),
+ MachineType::TaggedPointer(),
kPointerWriteBarrier};
return access;
}
@@ -366,7 +366,7 @@ FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() {
DescriptorArray::kEnumCacheOffset,
Handle<Name>(),
Type::TaggedPointer(),
- MachineType::AnyTagged(),
+ MachineType::TaggedPointer(),
kPointerWriteBarrier};
return access;
}
@@ -378,7 +378,7 @@ FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() {
DescriptorArray::kEnumCacheBridgeCacheOffset,
Handle<Name>(),
Type::TaggedPointer(),
- MachineType::AnyTagged(),
+ MachineType::TaggedPointer(),
kPointerWriteBarrier};
return access;
}
@@ -404,9 +404,12 @@ FieldAccess AccessBuilder::ForMapBitField3() {
// 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::TaggedPointer(),
+ kPointerWriteBarrier};
return access;
}
@@ -422,9 +425,12 @@ FieldAccess AccessBuilder::ForMapInstanceType() {
// 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::TaggedPointer(),
+ kPointerWriteBarrier};
return access;
}
@@ -610,9 +616,17 @@ FieldAccess AccessBuilder::ForPropertyCellValue() {
// static
FieldAccess AccessBuilder::ForPropertyCellValue(Type* type) {
+ // Extract representation dimension of {type} into MachineType {r}.
+ MachineType r = MachineType::AnyTagged();
+ WriteBarrierKind w = kFullWriteBarrier;
+ if (type->Is(Type::TaggedSigned())) {
+ r = MachineType::TaggedSigned();
+ w = kNoWriteBarrier;
+ } else if (type->Is(Type::TaggedPointer())) {
+ r = MachineType::TaggedPointer();
+ }
FieldAccess access = {
- kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(),
- type, MachineType::AnyTagged(), kFullWriteBarrier};
+ kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(), type, r, w};
return access;
}
@@ -630,6 +644,7 @@ ElementAccess AccessBuilder::ForFixedArrayElement(ElementsKind kind) {
switch (kind) {
case FAST_SMI_ELEMENTS:
access.type = TypeCache::Get().kSmi;
+ access.machine_type = MachineType::TaggedSigned();
access.write_barrier_kind = kNoWriteBarrier;
break;
case FAST_HOLEY_SMI_ELEMENTS:
« no previous file with comments | « no previous file | src/compiler/arm/instruction-selector-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698