Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index fb7f1ba4ad6ec370161703e0e8108b8d4543db7e..8bb603a985db87e6a8c0d78be94d081b74777f67 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -9303,6 +9303,14 @@ uint32_t StringHasher::ComputeUtf8Hash(Vector<const char> chars, |
} |
+MaybeObject* String::SubString(int start, int end, PretenureFlag pretenure) { |
+ Heap* heap = GetHeap(); |
+ if (start == 0 && end == length()) return this; |
+ MaybeObject* result = heap->AllocateSubString(this, start, end, pretenure); |
+ return result; |
+} |
+ |
+ |
void String::PrintOn(FILE* file) { |
int length = this->length(); |
for (int i = 0; i < length; i++) { |