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