OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
7 | 7 |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 PretenureFlag pretenure = NOT_TENURED); | 190 PretenureFlag pretenure = NOT_TENURED); |
191 | 191 |
192 // Creates a single character string where the character has given code. | 192 // Creates a single character string where the character has given code. |
193 // A cache is used for ASCII codes. | 193 // A cache is used for ASCII codes. |
194 Handle<String> LookupSingleCharacterStringFromCode(uint32_t code); | 194 Handle<String> LookupSingleCharacterStringFromCode(uint32_t code); |
195 | 195 |
196 // Create a new cons string object which consists of a pair of strings. | 196 // Create a new cons string object which consists of a pair of strings. |
197 MUST_USE_RESULT MaybeHandle<String> NewConsString(Handle<String> left, | 197 MUST_USE_RESULT MaybeHandle<String> NewConsString(Handle<String> left, |
198 Handle<String> right); | 198 Handle<String> right); |
199 | 199 |
200 // Create a new sequential string containing the concatenation of the inputs. | |
201 Handle<String> NewFlatConcatString(Handle<String> first, | |
202 Handle<String> second); | |
203 | |
204 // Create a new string object which holds a proper substring of a string. | 200 // Create a new string object which holds a proper substring of a string. |
205 Handle<String> NewProperSubString(Handle<String> str, | 201 Handle<String> NewProperSubString(Handle<String> str, |
206 int begin, | 202 int begin, |
207 int end); | 203 int end); |
208 | 204 |
209 // Create a new string object which holds a substring of a string. | 205 // Create a new string object which holds a substring of a string. |
210 Handle<String> NewSubString(Handle<String> str, int begin, int end) { | 206 Handle<String> NewSubString(Handle<String> str, int begin, int end) { |
211 if (begin == 0 && end == str->length()) return str; | 207 if (begin == 0 && end == str->length()) return str; |
212 return NewProperSubString(str, begin, end); | 208 return NewProperSubString(str, begin, end); |
213 } | 209 } |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 PretenureFlag pretenure = TENURED); | 706 PretenureFlag pretenure = TENURED); |
711 | 707 |
712 Handle<JSFunction> NewFunction(Handle<Map> map, | 708 Handle<JSFunction> NewFunction(Handle<Map> map, |
713 Handle<String> name, | 709 Handle<String> name, |
714 MaybeHandle<Code> maybe_code); | 710 MaybeHandle<Code> maybe_code); |
715 }; | 711 }; |
716 | 712 |
717 } } // namespace v8::internal | 713 } } // namespace v8::internal |
718 | 714 |
719 #endif // V8_FACTORY_H_ | 715 #endif // V8_FACTORY_H_ |
OLD | NEW |