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

Side by Side Diff: src/factory.h

Issue 2107673003: Add an API to create a detached global object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 // Reinitialize an JSGlobalProxy based on a constructor. The object 500 // Reinitialize an JSGlobalProxy based on a constructor. The object
501 // must have the same size as objects allocated using the 501 // must have the same size as objects allocated using the
502 // constructor. The object is reinitialized and behaves as an 502 // constructor. The object is reinitialized and behaves as an
503 // object that has been freshly allocated using the constructor. 503 // object that has been freshly allocated using the constructor.
504 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, 504 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global,
505 Handle<JSFunction> constructor); 505 Handle<JSFunction> constructor);
506 506
507 Handle<JSGlobalProxy> NewUninitializedJSGlobalProxy(); 507 Handle<JSGlobalProxy> NewUninitializedJSGlobalProxy();
508 508
509 Handle<JSFunction> NewFunction(Handle<Map> map,
510 Handle<SharedFunctionInfo> info,
511 Handle<Object> context_or_undefined,
512 PretenureFlag pretenure = TENURED);
509 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, 513 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code,
510 Handle<Object> prototype, 514 Handle<Object> prototype,
511 bool is_strict = false); 515 bool is_strict = false);
512 Handle<JSFunction> NewFunction(Handle<String> name); 516 Handle<JSFunction> NewFunction(Handle<String> name);
513 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, 517 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name,
514 Handle<Code> code, 518 Handle<Code> code,
515 bool is_strict = false); 519 bool is_strict = false);
516 520
517 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( 521 Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
518 Handle<Map> initial_map, Handle<SharedFunctionInfo> function_info, 522 Handle<Map> initial_map, Handle<SharedFunctionInfo> function_info,
519 Handle<Context> context, PretenureFlag pretenure = TENURED); 523 Handle<Object> context_or_undefined, PretenureFlag pretenure = TENURED);
520 524
521 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( 525 Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
522 Handle<SharedFunctionInfo> function_info, Handle<Context> context, 526 Handle<SharedFunctionInfo> function_info, Handle<Context> context,
523 PretenureFlag pretenure = TENURED); 527 PretenureFlag pretenure = TENURED);
524 528
525 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, 529 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code,
526 Handle<Object> prototype, InstanceType type, 530 Handle<Object> prototype, InstanceType type,
527 int instance_size, 531 int instance_size,
528 bool is_strict = false); 532 bool is_strict = false);
529 Handle<JSFunction> NewFunction(Handle<String> name, 533 Handle<JSFunction> NewFunction(Handle<String> name,
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 // Creates a code object that is not yet fully initialized yet. 710 // Creates a code object that is not yet fully initialized yet.
707 inline Handle<Code> NewCodeRaw(int object_size, bool immovable); 711 inline Handle<Code> NewCodeRaw(int object_size, bool immovable);
708 712
709 // Attempt to find the number in a small cache. If we finds it, return 713 // Attempt to find the number in a small cache. If we finds it, return
710 // the string representation of the number. Otherwise return undefined. 714 // the string representation of the number. Otherwise return undefined.
711 Handle<Object> GetNumberStringCache(Handle<Object> number); 715 Handle<Object> GetNumberStringCache(Handle<Object> number);
712 716
713 // Update the cache with a new number-string pair. 717 // Update the cache with a new number-string pair.
714 void SetNumberStringCache(Handle<Object> number, Handle<String> string); 718 void SetNumberStringCache(Handle<Object> number, Handle<String> string);
715 719
716 // Creates a function initialized with a shared part.
717 Handle<JSFunction> NewFunction(Handle<Map> map,
718 Handle<SharedFunctionInfo> info,
719 Handle<Context> context,
720 PretenureFlag pretenure = TENURED);
721
722 // Create a JSArray with no elements and no length. 720 // Create a JSArray with no elements and no length.
723 Handle<JSArray> NewJSArray(ElementsKind elements_kind, 721 Handle<JSArray> NewJSArray(ElementsKind elements_kind,
724 PretenureFlag pretenure = NOT_TENURED); 722 PretenureFlag pretenure = NOT_TENURED);
725 }; 723 };
726 724
727 } // namespace internal 725 } // namespace internal
728 } // namespace v8 726 } // namespace v8
729 727
730 #endif // V8_FACTORY_H_ 728 #endif // V8_FACTORY_H_
OLDNEW
« src/bootstrapper.cc ('K') | « src/counters.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698