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

Unified Diff: src/runtime/runtime-internal.cc

Issue 2021143003: [builtins] Migrate String.fromCharCode to TurboFan code stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/mjsunit/regress/regress-string-from-char-code-tonumber.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 1bfa6894858cafe5eae22d5c6c2514ff9be29b89..1978e42ff5a4c7e95dc08fa2a52d548fb6c8a207 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -325,6 +325,25 @@ RUNTIME_FUNCTION(Runtime_AllocateInTargetSpace) {
return *isolate->factory()->NewFillerObject(size, double_align, space);
}
+RUNTIME_FUNCTION(Runtime_AllocateSeqOneByteString) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(1, args.length());
+ CONVERT_SMI_ARG_CHECKED(length, 0);
+ Handle<SeqOneByteString> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result, isolate->factory()->NewRawOneByteString(length));
+ return *result;
+}
+
+RUNTIME_FUNCTION(Runtime_AllocateSeqTwoByteString) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(1, args.length());
+ CONVERT_SMI_ARG_CHECKED(length, 0);
+ Handle<SeqTwoByteString> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result, isolate->factory()->NewRawTwoByteString(length));
+ return *result;
+}
// Collect the raw data for a stack trace. Returns an array of 4
// element segments each containing a receiver, function, code and
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/regress/regress-string-from-char-code-tonumber.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698