| 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 "isolate.h" | 8 #include "isolate.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (begin == 0 && end == str->length()) return str; | 159 if (begin == 0 && end == str->length()) return str; |
| 160 return NewProperSubString(str, begin, end); | 160 return NewProperSubString(str, begin, end); |
| 161 } | 161 } |
| 162 | 162 |
| 163 Handle<SlicedString> NewRawSlicedString(String::Encoding encoding); | 163 Handle<SlicedString> NewRawSlicedString(String::Encoding encoding); |
| 164 | 164 |
| 165 // Creates a new external String object. There are two String encodings | 165 // Creates a new external String object. There are two String encodings |
| 166 // in the system: ASCII and two byte. Unlike other String types, it does | 166 // in the system: ASCII and two byte. Unlike other String types, it does |
| 167 // not make sense to have a UTF-8 factory function for external strings, | 167 // not make sense to have a UTF-8 factory function for external strings, |
| 168 // because we cannot change the underlying buffer. | 168 // because we cannot change the underlying buffer. |
| 169 Handle<String> NewExternalStringFromAscii( | 169 MaybeHandle<String> NewExternalStringFromAscii( |
| 170 const ExternalAsciiString::Resource* resource); | 170 const ExternalAsciiString::Resource* resource); |
| 171 Handle<String> NewExternalStringFromTwoByte( | 171 MaybeHandle<String> NewExternalStringFromTwoByte( |
| 172 const ExternalTwoByteString::Resource* resource); | 172 const ExternalTwoByteString::Resource* resource); |
| 173 | 173 |
| 174 // Create a symbol. | 174 // Create a symbol. |
| 175 Handle<Symbol> NewSymbol(); | 175 Handle<Symbol> NewSymbol(); |
| 176 Handle<Symbol> NewPrivateSymbol(); | 176 Handle<Symbol> NewPrivateSymbol(); |
| 177 | 177 |
| 178 // Create a global (but otherwise uninitialized) context. | 178 // Create a global (but otherwise uninitialized) context. |
| 179 Handle<Context> NewNativeContext(); | 179 Handle<Context> NewNativeContext(); |
| 180 | 180 |
| 181 // Create a global context. | 181 // Create a global context. |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 | 589 |
| 590 // Update the map cache in the native context with (keys, map) | 590 // Update the map cache in the native context with (keys, map) |
| 591 Handle<MapCache> AddToMapCache(Handle<Context> context, | 591 Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 592 Handle<FixedArray> keys, | 592 Handle<FixedArray> keys, |
| 593 Handle<Map> map); | 593 Handle<Map> map); |
| 594 }; | 594 }; |
| 595 | 595 |
| 596 } } // namespace v8::internal | 596 } } // namespace v8::internal |
| 597 | 597 |
| 598 #endif // V8_FACTORY_H_ | 598 #endif // V8_FACTORY_H_ |
| OLD | NEW |