| 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 #include "src/messages.h" | 9 #include "src/messages.h" |
| 10 #include "src/type-feedback-vector.h" | 10 #include "src/type-feedback-vector.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 Handle<Context> NewNativeContext(); | 251 Handle<Context> NewNativeContext(); |
| 252 | 252 |
| 253 // Create a script context. | 253 // Create a script context. |
| 254 Handle<Context> NewScriptContext(Handle<JSFunction> function, | 254 Handle<Context> NewScriptContext(Handle<JSFunction> function, |
| 255 Handle<ScopeInfo> scope_info); | 255 Handle<ScopeInfo> scope_info); |
| 256 | 256 |
| 257 // Create an empty script context table. | 257 // Create an empty script context table. |
| 258 Handle<ScriptContextTable> NewScriptContextTable(); | 258 Handle<ScriptContextTable> NewScriptContextTable(); |
| 259 | 259 |
| 260 // Create a module context. | 260 // Create a module context. |
| 261 Handle<Context> NewModuleContext(Handle<ScopeInfo> scope_info); | 261 Handle<Context> NewModuleContext(Handle<JSModule> module, |
| 262 Handle<JSFunction> function, |
| 263 Handle<ScopeInfo> scope_info); |
| 262 | 264 |
| 263 // Create a function context. | 265 // Create a function context. |
| 264 Handle<Context> NewFunctionContext(int length, Handle<JSFunction> function); | 266 Handle<Context> NewFunctionContext(int length, Handle<JSFunction> function); |
| 265 | 267 |
| 266 // Create a catch context. | 268 // Create a catch context. |
| 267 Handle<Context> NewCatchContext(Handle<JSFunction> function, | 269 Handle<Context> NewCatchContext(Handle<JSFunction> function, |
| 268 Handle<Context> previous, | 270 Handle<Context> previous, |
| 269 Handle<String> name, | 271 Handle<String> name, |
| 270 Handle<Object> thrown_object); | 272 Handle<Object> thrown_object); |
| 271 | 273 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 } | 468 } |
| 467 | 469 |
| 468 void NewJSArrayStorage( | 470 void NewJSArrayStorage( |
| 469 Handle<JSArray> array, | 471 Handle<JSArray> array, |
| 470 int length, | 472 int length, |
| 471 int capacity, | 473 int capacity, |
| 472 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); | 474 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); |
| 473 | 475 |
| 474 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function); | 476 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function); |
| 475 | 477 |
| 478 Handle<JSModule> NewJSModule(); |
| 479 |
| 476 Handle<JSArrayBuffer> NewJSArrayBuffer( | 480 Handle<JSArrayBuffer> NewJSArrayBuffer( |
| 477 SharedFlag shared = SharedFlag::kNotShared, | 481 SharedFlag shared = SharedFlag::kNotShared, |
| 478 PretenureFlag pretenure = NOT_TENURED); | 482 PretenureFlag pretenure = NOT_TENURED); |
| 479 | 483 |
| 480 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type, | 484 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type, |
| 481 PretenureFlag pretenure = NOT_TENURED); | 485 PretenureFlag pretenure = NOT_TENURED); |
| 482 | 486 |
| 483 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind, | 487 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind, |
| 484 PretenureFlag pretenure = NOT_TENURED); | 488 PretenureFlag pretenure = NOT_TENURED); |
| 485 | 489 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 Handle<JSFunction> NewFunction(Handle<String> name, | 554 Handle<JSFunction> NewFunction(Handle<String> name, |
| 551 Handle<Code> code, | 555 Handle<Code> code, |
| 552 InstanceType type, | 556 InstanceType type, |
| 553 int instance_size); | 557 int instance_size); |
| 554 Handle<JSFunction> NewFunction(Handle<Map> map, Handle<String> name, | 558 Handle<JSFunction> NewFunction(Handle<Map> map, Handle<String> name, |
| 555 MaybeHandle<Code> maybe_code); | 559 MaybeHandle<Code> maybe_code); |
| 556 | 560 |
| 557 // Create a serialized scope info. | 561 // Create a serialized scope info. |
| 558 Handle<ScopeInfo> NewScopeInfo(int length); | 562 Handle<ScopeInfo> NewScopeInfo(int length); |
| 559 | 563 |
| 564 Handle<ModuleInfoEntry> NewModuleInfoEntry(); |
| 560 Handle<ModuleInfo> NewModuleInfo(); | 565 Handle<ModuleInfo> NewModuleInfo(); |
| 561 | 566 |
| 562 // Create an External object for V8's external API. | 567 // Create an External object for V8's external API. |
| 563 Handle<JSObject> NewExternal(void* value); | 568 Handle<JSObject> NewExternal(void* value); |
| 564 | 569 |
| 565 // The reference to the Code object is stored in self_reference. | 570 // The reference to the Code object is stored in self_reference. |
| 566 // This allows generated code to reference its own Code object | 571 // This allows generated code to reference its own Code object |
| 567 // by containing this handle. | 572 // by containing this handle. |
| 568 Handle<Code> NewCode(const CodeDesc& desc, | 573 Handle<Code> NewCode(const CodeDesc& desc, |
| 569 Code::Flags flags, | 574 Code::Flags flags, |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 FunctionMode function_mode); | 760 FunctionMode function_mode); |
| 756 | 761 |
| 757 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 762 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
| 758 FunctionMode function_mode); | 763 FunctionMode function_mode); |
| 759 }; | 764 }; |
| 760 | 765 |
| 761 } // namespace internal | 766 } // namespace internal |
| 762 } // namespace v8 | 767 } // namespace v8 |
| 763 | 768 |
| 764 #endif // V8_FACTORY_H_ | 769 #endif // V8_FACTORY_H_ |
| OLD | NEW |