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

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

Issue 2736383003: [regexp] Properly flatten string during initialization (Closed)
Patch Set: Better DCHECKs Created 3 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/mjsunit/regress/regress-698790.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index ff3bb051333c0edeee8e4a3d2f1b2e02d434fab0..c4b58cf1a5dfd74c686f6fbc7d05a1fa3d59bad7 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -71,6 +71,20 @@ RUNTIME_FUNCTION(Runtime_ConstructDouble) {
return *isolate->factory()->NewNumber(uint64_to_double(result));
}
+RUNTIME_FUNCTION(Runtime_ConstructConsString) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(2, args.length());
+ CONVERT_ARG_HANDLE_CHECKED(String, left, 0);
+ CONVERT_ARG_HANDLE_CHECKED(String, right, 1);
+
+ CHECK(left->IsOneByteRepresentation());
+ CHECK(right->IsOneByteRepresentation());
+
+ const bool kIsOneByte = true;
+ const int length = left->length() + right->length();
+ return *isolate->factory()->NewConsString(left, right, length, kIsOneByte);
+}
+
RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/regress/regress-698790.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698