Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index bb5e97a34e1f09c5260c47e64f73eba6badb1324..5ecdfcfd2f4aec25c94ab22927b53363715b3b59 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -186,7 +186,7 @@ Handle<String> Factory::InternalizeOneByteString(Vector<const uint8_t> string) { |
Handle<String> Factory::InternalizeOneByteString( |
Handle<SeqOneByteString> string, int from, int length) { |
- SubStringKey<uint8_t> key(string, from, length); |
+ SeqOneByteSubStringKey key(string, from, length); |
return InternalizeStringWithKey(&key); |
} |
@@ -203,12 +203,6 @@ Handle<String> Factory::InternalizeStringWithKey(StringTableKey* key) { |
} |
-template Handle<String> Factory::InternalizeStringWithKey< |
- SubStringKey<uint8_t> > (SubStringKey<uint8_t>* key); |
-template Handle<String> Factory::InternalizeStringWithKey< |
- SubStringKey<uint16_t> > (SubStringKey<uint16_t>* key); |
- |
- |
MaybeHandle<String> Factory::NewStringFromOneByte(Vector<const uint8_t> string, |
PretenureFlag pretenure) { |
int length = string.length(); |
@@ -313,6 +307,17 @@ MUST_USE_RESULT Handle<String> Factory::NewOneByteInternalizedString( |
} |
+MUST_USE_RESULT Handle<String> Factory::NewOneByteInternalizedSubString( |
+ Handle<SeqOneByteString> string, int offset, int length, |
+ uint32_t hash_field) { |
+ CALL_HEAP_FUNCTION( |
+ isolate(), isolate()->heap()->AllocateOneByteInternalizedString( |
+ Vector<const uint8_t>(string->GetChars() + offset, length), |
+ hash_field), |
+ String); |
+} |
+ |
+ |
MUST_USE_RESULT Handle<String> Factory::NewTwoByteInternalizedString( |
Vector<const uc16> str, |
uint32_t hash_field) { |