| Index: src/factory.h
|
| diff --git a/src/factory.h b/src/factory.h
|
| index 92086d4b304d1e477937e4712ce7bc69d40ca24d..94e89f58a7aa10e7afbd47bd9128c02d30afe6c6 100644
|
| --- a/src/factory.h
|
| +++ b/src/factory.h
|
| @@ -158,23 +158,28 @@ class Factory {
|
| PretenureFlag pretenure = NOT_TENURED);
|
|
|
| // Create a new cons string object which consists of a pair of strings.
|
| - Handle<String> NewConsString(Handle<String> first,
|
| - Handle<String> second);
|
| + Handle<String> NewConsString(Handle<String> left,
|
| + Handle<String> right);
|
| +
|
| + Handle<ConsString> NewRawConsString(String::Encoding encoding);
|
|
|
| // Create a new sequential string containing the concatenation of the inputs.
|
| Handle<String> NewFlatConcatString(Handle<String> first,
|
| Handle<String> second);
|
|
|
| - // Create a new string object which holds a substring of a string.
|
| - Handle<String> NewSubString(Handle<String> str,
|
| - int begin,
|
| - int end);
|
| -
|
| // Create a new string object which holds a proper substring of a string.
|
| Handle<String> NewProperSubString(Handle<String> str,
|
| int begin,
|
| int end);
|
|
|
| + // Create a new string object which holds a substring of a string.
|
| + Handle<String> NewSubString(Handle<String> str, int begin, int end) {
|
| + if (begin == 0 && end == str->length()) return str;
|
| + return NewProperSubString(str, begin, end);
|
| + }
|
| +
|
| + Handle<SlicedString> NewRawSlicedString(String::Encoding encoding);
|
| +
|
| // Creates a new external String object. There are two String encodings
|
| // in the system: ASCII and two byte. Unlike other String types, it does
|
| // not make sense to have a UTF-8 factory function for external strings,
|
|
|