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

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

Issue 1013753016: Add full TurboFan support for accessing SeqString contents. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed return value Created 5 years, 9 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/js-intrinsic-lowering.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 589ae65366579070406cb083feefb773cdce9891..8a04603e5a1f0cf95cad3536775e3e9c4555b075 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -116,6 +116,21 @@ ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type,
return {kUntaggedBase, 0, Type::None(), kMachNone};
}
+
+// static
+ElementAccess AccessBuilder::ForSeqStringChar(String::Encoding encoding) {
+ switch (encoding) {
+ case String::ONE_BYTE_ENCODING:
+ return {kTaggedBase, SeqString::kHeaderSize, Type::Unsigned32(),
+ kMachUint8};
+ case String::TWO_BYTE_ENCODING:
+ return {kTaggedBase, SeqString::kHeaderSize, Type::Unsigned32(),
+ kMachUint16};
+ }
+ UNREACHABLE();
+ return {kUntaggedBase, 0, Type::None(), kMachNone};
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698