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

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

Issue 2180373005: [turbofan] Add support for String.prototype.charCodeAt/charAt. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/effect-control-linearizer.h » ('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 0eac1097d34a8796b7677336634087d8d4f2ee89..976e051527c1b79a16848c3dc3a4990be170ca9d 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -386,6 +386,78 @@ FieldAccess AccessBuilder::ForStringLength() {
return access;
}
+// static
+FieldAccess AccessBuilder::ForConsStringFirst() {
+ FieldAccess access = {
+ kTaggedBase, ConsString::kFirstOffset, Handle<Name>(),
+ Type::String(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForConsStringSecond() {
+ FieldAccess access = {
+ kTaggedBase, ConsString::kSecondOffset, Handle<Name>(),
+ Type::String(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForSlicedStringOffset() {
+ FieldAccess access = {
+ kTaggedBase, SlicedString::kOffsetOffset, Handle<Name>(),
+ Type::SignedSmall(), MachineType::AnyTagged(), kNoWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForSlicedStringParent() {
+ FieldAccess access = {
+ kTaggedBase, SlicedString::kParentOffset, Handle<Name>(),
+ Type::String(), MachineType::AnyTagged(), kPointerWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForExternalStringResourceData() {
+ FieldAccess access = {kTaggedBase,
+ ExternalString::kResourceDataOffset,
+ Handle<Name>(),
+ Type::UntaggedPointer(),
+ MachineType::Pointer(),
+ kNoWriteBarrier};
+ return access;
+}
+
+// static
+ElementAccess AccessBuilder::ForExternalOneByteStringCharacter() {
+ ElementAccess access = {kUntaggedBase, 0, TypeCache::Get().kUint8,
+ MachineType::Uint8(), kNoWriteBarrier};
+ return access;
+}
+
+// static
+ElementAccess AccessBuilder::ForExternalTwoByteStringCharacter() {
+ ElementAccess access = {kUntaggedBase, 0, TypeCache::Get().kUint16,
+ MachineType::Uint16(), kNoWriteBarrier};
+ return access;
+}
+
+// static
+ElementAccess AccessBuilder::ForSeqOneByteStringCharacter() {
+ ElementAccess access = {kTaggedBase, SeqOneByteString::kHeaderSize,
+ TypeCache::Get().kUint8, MachineType::Uint8(),
+ kNoWriteBarrier};
+ return access;
+}
+
+// static
+ElementAccess AccessBuilder::ForSeqTwoByteStringCharacter() {
+ ElementAccess access = {kTaggedBase, SeqTwoByteString::kHeaderSize,
+ TypeCache::Get().kUint16, MachineType::Uint16(),
+ kNoWriteBarrier};
+ return access;
+}
// static
FieldAccess AccessBuilder::ForJSGlobalObjectGlobalProxy() {
@@ -398,7 +470,6 @@ FieldAccess AccessBuilder::ForJSGlobalObjectGlobalProxy() {
return access;
}
-
// static
FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() {
FieldAccess access = {kTaggedBase,
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/effect-control-linearizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698