Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/factory.h

Issue 2302783002: [modules] Basic support of exports (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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<String> name, 270 Handle<String> name,
269 Handle<Object> thrown_object); 271 Handle<Object> thrown_object);
270 272
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 467 }
466 468
467 void NewJSArrayStorage( 469 void NewJSArrayStorage(
468 Handle<JSArray> array, 470 Handle<JSArray> array,
469 int length, 471 int length,
470 int capacity, 472 int capacity,
471 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); 473 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS);
472 474
473 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function); 475 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function);
474 476
477 Handle<JSModule> NewJSModule();
478
475 Handle<JSArrayBuffer> NewJSArrayBuffer( 479 Handle<JSArrayBuffer> NewJSArrayBuffer(
476 SharedFlag shared = SharedFlag::kNotShared, 480 SharedFlag shared = SharedFlag::kNotShared,
477 PretenureFlag pretenure = NOT_TENURED); 481 PretenureFlag pretenure = NOT_TENURED);
478 482
479 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type, 483 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type,
480 PretenureFlag pretenure = NOT_TENURED); 484 PretenureFlag pretenure = NOT_TENURED);
481 485
482 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind, 486 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind,
483 PretenureFlag pretenure = NOT_TENURED); 487 PretenureFlag pretenure = NOT_TENURED);
484 488
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 Handle<JSFunction> NewFunction(Handle<String> name, 553 Handle<JSFunction> NewFunction(Handle<String> name,
550 Handle<Code> code, 554 Handle<Code> code,
551 InstanceType type, 555 InstanceType type,
552 int instance_size); 556 int instance_size);
553 Handle<JSFunction> NewFunction(Handle<Map> map, Handle<String> name, 557 Handle<JSFunction> NewFunction(Handle<Map> map, Handle<String> name,
554 MaybeHandle<Code> maybe_code); 558 MaybeHandle<Code> maybe_code);
555 559
556 // Create a serialized scope info. 560 // Create a serialized scope info.
557 Handle<ScopeInfo> NewScopeInfo(int length); 561 Handle<ScopeInfo> NewScopeInfo(int length);
558 562
563 Handle<ModuleInfoEntry> NewModuleInfoEntry();
559 Handle<ModuleInfo> NewModuleInfo(); 564 Handle<ModuleInfo> NewModuleInfo();
560 565
561 // Create an External object for V8's external API. 566 // Create an External object for V8's external API.
562 Handle<JSObject> NewExternal(void* value); 567 Handle<JSObject> NewExternal(void* value);
563 568
564 // The reference to the Code object is stored in self_reference. 569 // The reference to the Code object is stored in self_reference.
565 // This allows generated code to reference its own Code object 570 // This allows generated code to reference its own Code object
566 // by containing this handle. 571 // by containing this handle.
567 Handle<Code> NewCode(const CodeDesc& desc, 572 Handle<Code> NewCode(const CodeDesc& desc,
568 Code::Flags flags, 573 Code::Flags flags,
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 FunctionMode function_mode); 759 FunctionMode function_mode);
755 760
756 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, 761 void SetStrictFunctionInstanceDescriptor(Handle<Map> map,
757 FunctionMode function_mode); 762 FunctionMode function_mode);
758 }; 763 };
759 764
760 } // namespace internal 765 } // namespace internal
761 } // namespace v8 766 } // namespace v8
762 767
763 #endif // V8_FACTORY_H_ 768 #endif // V8_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698