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

Side by Side Diff: src/factory.h

Issue 59973004: Revert "Handlify concat string and substring." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // characters of the string are uninitialized. Currently used in regexp code 151 // characters of the string are uninitialized. Currently used in regexp code
152 // only, where they are pretenured. 152 // only, where they are pretenured.
153 Handle<SeqOneByteString> NewRawOneByteString( 153 Handle<SeqOneByteString> NewRawOneByteString(
154 int length, 154 int length,
155 PretenureFlag pretenure = NOT_TENURED); 155 PretenureFlag pretenure = NOT_TENURED);
156 Handle<SeqTwoByteString> NewRawTwoByteString( 156 Handle<SeqTwoByteString> NewRawTwoByteString(
157 int length, 157 int length,
158 PretenureFlag pretenure = NOT_TENURED); 158 PretenureFlag pretenure = NOT_TENURED);
159 159
160 // Create a new cons string object which consists of a pair of strings. 160 // Create a new cons string object which consists of a pair of strings.
161 Handle<String> NewConsString(Handle<String> left, 161 Handle<String> NewConsString(Handle<String> first,
162 Handle<String> right); 162 Handle<String> second);
163
164 Handle<ConsString> NewRawConsString(String::Encoding encoding);
165 163
166 // Create a new sequential string containing the concatenation of the inputs. 164 // Create a new sequential string containing the concatenation of the inputs.
167 Handle<String> NewFlatConcatString(Handle<String> first, 165 Handle<String> NewFlatConcatString(Handle<String> first,
168 Handle<String> second); 166 Handle<String> second);
169 167
168 // Create a new string object which holds a substring of a string.
169 Handle<String> NewSubString(Handle<String> str,
170 int begin,
171 int end);
172
170 // Create a new string object which holds a proper substring of a string. 173 // Create a new string object which holds a proper substring of a string.
171 Handle<String> NewProperSubString(Handle<String> str, 174 Handle<String> NewProperSubString(Handle<String> str,
172 int begin, 175 int begin,
173 int end); 176 int end);
174 177
175 // Create a new string object which holds a substring of a string.
176 Handle<String> NewSubString(Handle<String> str, int begin, int end) {
177 if (begin == 0 && end == str->length()) return str;
178 return NewProperSubString(str, begin, end);
179 }
180
181 Handle<SlicedString> NewRawSlicedString(String::Encoding encoding);
182
183 // Creates a new external String object. There are two String encodings 178 // Creates a new external String object. There are two String encodings
184 // in the system: ASCII and two byte. Unlike other String types, it does 179 // in the system: ASCII and two byte. Unlike other String types, it does
185 // not make sense to have a UTF-8 factory function for external strings, 180 // not make sense to have a UTF-8 factory function for external strings,
186 // because we cannot change the underlying buffer. 181 // because we cannot change the underlying buffer.
187 Handle<String> NewExternalStringFromAscii( 182 Handle<String> NewExternalStringFromAscii(
188 const ExternalAsciiString::Resource* resource); 183 const ExternalAsciiString::Resource* resource);
189 Handle<String> NewExternalStringFromTwoByte( 184 Handle<String> NewExternalStringFromTwoByte(
190 const ExternalTwoByteString::Resource* resource); 185 const ExternalTwoByteString::Resource* resource);
191 186
192 // Create a symbol. 187 // Create a symbol.
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 679 }
685 680
686 private: 681 private:
687 Isolate* isolate_; 682 Isolate* isolate_;
688 }; 683 };
689 684
690 685
691 } } // namespace v8::internal 686 } } // namespace v8::internal
692 687
693 #endif // V8_FACTORY_H_ 688 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698