| OLD | NEW |
| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // 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 |
| 180 // 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, |
| 181 // because we cannot change the underlying buffer. | 181 // because we cannot change the underlying buffer. |
| 182 Handle<String> NewExternalStringFromAscii( | 182 Handle<String> NewExternalStringFromAscii( |
| 183 const ExternalAsciiString::Resource* resource); | 183 const ExternalAsciiString::Resource* resource); |
| 184 Handle<String> NewExternalStringFromTwoByte( | 184 Handle<String> NewExternalStringFromTwoByte( |
| 185 const ExternalTwoByteString::Resource* resource); | 185 const ExternalTwoByteString::Resource* resource); |
| 186 | 186 |
| 187 // Create a symbol. | 187 // Create a symbol. |
| 188 Handle<Symbol> NewSymbol(); | 188 Handle<Symbol> NewSymbol(); |
| 189 Handle<Symbol> NewPrivateSymbol(); |
| 189 | 190 |
| 190 // Create a global (but otherwise uninitialized) context. | 191 // Create a global (but otherwise uninitialized) context. |
| 191 Handle<Context> NewNativeContext(); | 192 Handle<Context> NewNativeContext(); |
| 192 | 193 |
| 193 // Create a global context. | 194 // Create a global context. |
| 194 Handle<Context> NewGlobalContext(Handle<JSFunction> function, | 195 Handle<Context> NewGlobalContext(Handle<JSFunction> function, |
| 195 Handle<ScopeInfo> scope_info); | 196 Handle<ScopeInfo> scope_info); |
| 196 | 197 |
| 197 // Create a module context. | 198 // Create a module context. |
| 198 Handle<Context> NewModuleContext(Handle<ScopeInfo> scope_info); | 199 Handle<Context> NewModuleContext(Handle<ScopeInfo> scope_info); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 216 Handle<Context> previous, | 217 Handle<Context> previous, |
| 217 Handle<ScopeInfo> scope_info); | 218 Handle<ScopeInfo> scope_info); |
| 218 | 219 |
| 219 // Return the internalized version of the passed in string. | 220 // Return the internalized version of the passed in string. |
| 220 Handle<String> InternalizedStringFromString(Handle<String> value); | 221 Handle<String> InternalizedStringFromString(Handle<String> value); |
| 221 | 222 |
| 222 // Allocate a new struct. The struct is pretenured (allocated directly in | 223 // Allocate a new struct. The struct is pretenured (allocated directly in |
| 223 // the old generation). | 224 // the old generation). |
| 224 Handle<Struct> NewStruct(InstanceType type); | 225 Handle<Struct> NewStruct(InstanceType type); |
| 225 | 226 |
| 227 Handle<AliasedArgumentsEntry> NewAliasedArgumentsEntry( |
| 228 int aliased_context_slot); |
| 229 |
| 226 Handle<DeclaredAccessorDescriptor> NewDeclaredAccessorDescriptor(); | 230 Handle<DeclaredAccessorDescriptor> NewDeclaredAccessorDescriptor(); |
| 227 | 231 |
| 228 Handle<DeclaredAccessorInfo> NewDeclaredAccessorInfo(); | 232 Handle<DeclaredAccessorInfo> NewDeclaredAccessorInfo(); |
| 229 | 233 |
| 230 Handle<ExecutableAccessorInfo> NewExecutableAccessorInfo(); | 234 Handle<ExecutableAccessorInfo> NewExecutableAccessorInfo(); |
| 231 | 235 |
| 232 Handle<Script> NewScript(Handle<String> source); | 236 Handle<Script> NewScript(Handle<String> source); |
| 233 | 237 |
| 234 // Foreign objects are pretenured when allocated by the bootstrapper. | 238 // Foreign objects are pretenured when allocated by the bootstrapper. |
| 235 Handle<Foreign> NewForeign(Address addr, | 239 Handle<Foreign> NewForeign(Address addr, |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 isolate()); | 588 isolate()); |
| 585 } else { | 589 } else { |
| 586 return NewNumber(static_cast<double>(value), pretenure); | 590 return NewNumber(static_cast<double>(value), pretenure); |
| 587 } | 591 } |
| 588 } | 592 } |
| 589 | 593 |
| 590 | 594 |
| 591 } } // namespace v8::internal | 595 } } // namespace v8::internal |
| 592 | 596 |
| 593 #endif // V8_FACTORY_H_ | 597 #endif // V8_FACTORY_H_ |
| OLD | NEW |