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

Unified Diff: src/factory.cc

Issue 1370153002: [heap] Cleanup string factory methods a bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-heap-macro-2
Patch Set: Remove dead test. Created 5 years, 3 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/factory.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index d6dd38d963d6dfeff29c20fe56ff14ca2344ed94..f078c227115fb223769d57a1d344ca880157bdda 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -578,30 +578,10 @@ MaybeHandle<String> Factory::NewConsString(Handle<String> left,
NewRawTwoByteString(length).ToHandleChecked(), left, right);
}
- return (is_one_byte || is_one_byte_data_in_two_byte_string)
- ? NewOneByteConsString(length, left, right)
- : NewTwoByteConsString(length, left, right);
-}
-
-
-MaybeHandle<String> Factory::NewOneByteConsString(int length,
- Handle<String> left,
- Handle<String> right) {
- return NewRawConsString(cons_one_byte_string_map(), length, left, right);
-}
-
-
-MaybeHandle<String> Factory::NewTwoByteConsString(int length,
- Handle<String> left,
- Handle<String> right) {
- return NewRawConsString(cons_string_map(), length, left, right);
-}
-
-
-MaybeHandle<String> Factory::NewRawConsString(Handle<Map> map, int length,
- Handle<String> left,
- Handle<String> right) {
- Handle<ConsString> result = New<ConsString>(map, NEW_SPACE);
+ Handle<ConsString> result =
+ (is_one_byte || is_one_byte_data_in_two_byte_string)
+ ? New<ConsString>(cons_one_byte_string_map(), NEW_SPACE)
+ : New<ConsString>(cons_string_map(), NEW_SPACE);
DisallowHeapAllocation no_gc;
WriteBarrierMode mode = result->GetWriteBarrierMode(no_gc);
« no previous file with comments | « src/factory.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698