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

Unified Diff: src/runtime/runtime-strings.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/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-strings.cc
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc
index a4b2a9afb27050e73695cbad880ed4046b3acf2f..646e7be20f93efdbd216f0f2ff24c5d648fc1fb6 100644
--- a/src/runtime/runtime-strings.cc
+++ b/src/runtime/runtime-strings.cc
@@ -1265,6 +1265,15 @@ RUNTIME_FUNCTION(Runtime_StringCharAt) {
}
+RUNTIME_FUNCTION(Runtime_OneByteSeqStringGetChar) {
+ SealHandleScope shs(isolate);
+ DCHECK(args.length() == 2);
+ CONVERT_ARG_CHECKED(SeqOneByteString, string, 0);
+ CONVERT_INT32_ARG_CHECKED(index, 1);
+ return Smi::FromInt(string->SeqOneByteStringGet(index));
+}
+
+
RUNTIME_FUNCTION(Runtime_OneByteSeqStringSetChar) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 3);
@@ -1276,6 +1285,15 @@ RUNTIME_FUNCTION(Runtime_OneByteSeqStringSetChar) {
}
+RUNTIME_FUNCTION(Runtime_TwoByteSeqStringGetChar) {
+ SealHandleScope shs(isolate);
+ DCHECK(args.length() == 2);
+ CONVERT_ARG_CHECKED(SeqTwoByteString, string, 0);
+ CONVERT_INT32_ARG_CHECKED(index, 1);
+ return Smi::FromInt(string->SeqTwoByteStringGet(index));
+}
+
+
RUNTIME_FUNCTION(Runtime_TwoByteSeqStringSetChar) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 3);
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698