| Index: src/factory.h
|
| diff --git a/src/factory.h b/src/factory.h
|
| index 02d0044c36562e9f03d41857e9840154f914a562..b69e3ef7a0fa226042b49a4b079365188153fa7c 100644
|
| --- a/src/factory.h
|
| +++ b/src/factory.h
|
| @@ -452,25 +452,26 @@ class Factory V8_FINAL {
|
| void BecomeJSFunction(Handle<JSReceiver> object);
|
|
|
| Handle<JSFunction> NewFunction(Handle<String> name,
|
| - MaybeHandle<Code> maybe_code,
|
| - MaybeHandle<Object> maybe_prototype =
|
| - MaybeHandle<Object>());
|
| + Handle<Code> code,
|
| + Handle<Object> prototype);
|
| Handle<JSFunction> NewFunction(Handle<String> name);
|
| + Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name,
|
| + Handle<Code> code);
|
|
|
| Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
|
| Handle<SharedFunctionInfo> function_info,
|
| Handle<Context> context,
|
| PretenureFlag pretenure = TENURED);
|
|
|
| - Handle<JSFunction> NewFunction(Handle<Object> maybe_prototype,
|
| - Handle<String> name,
|
| + Handle<JSFunction> NewFunction(Handle<String> name,
|
| + Handle<Code> code,
|
| + Handle<Object> prototype,
|
| InstanceType type,
|
| - int instance_size,
|
| - Handle<Code> code);
|
| + int instance_size);
|
| Handle<JSFunction> NewFunction(Handle<String> name,
|
| + Handle<Code> code,
|
| InstanceType type,
|
| - int instance_size,
|
| - Handle<Code> code);
|
| + int instance_size);
|
|
|
| // Create a serialized scope info.
|
| Handle<ScopeInfo> NewScopeInfo(int length);
|
| @@ -659,20 +660,6 @@ class Factory V8_FINAL {
|
| // Creates a code object that is not yet fully initialized yet.
|
| inline Handle<Code> NewCodeRaw(int object_size, bool immovable);
|
|
|
| - // Initializes a function with a shared part and prototype.
|
| - // Note: this code was factored out of NewFunction such that other parts of
|
| - // the VM could use it. Specifically, a function that creates instances of
|
| - // type JS_FUNCTION_TYPE benefit from the use of this function.
|
| - inline void InitializeFunction(Handle<JSFunction> function,
|
| - Handle<SharedFunctionInfo> info,
|
| - Handle<Context> context);
|
| -
|
| - // Creates a function initialized with a shared part.
|
| - inline Handle<JSFunction> NewFunction(Handle<Map> map,
|
| - Handle<SharedFunctionInfo> info,
|
| - Handle<Context> context,
|
| - PretenureFlag pretenure = TENURED);
|
| -
|
| // Create a new map cache.
|
| Handle<MapCache> NewMapCache(int at_least_space_for);
|
|
|
| @@ -687,6 +674,23 @@ class Factory V8_FINAL {
|
|
|
| // Update the cache with a new number-string pair.
|
| void SetNumberStringCache(Handle<Object> number, Handle<String> string);
|
| +
|
| + // Initializes a function with a shared part and prototype.
|
| + // Note: this code was factored out of NewFunction such that other parts of
|
| + // the VM could use it. Specifically, a function that creates instances of
|
| + // type JS_FUNCTION_TYPE benefit from the use of this function.
|
| + inline void InitializeFunction(Handle<JSFunction> function,
|
| + Handle<SharedFunctionInfo> info,
|
| + Handle<Context> context);
|
| +
|
| + // Creates a function initialized with a shared part.
|
| + Handle<JSFunction> NewFunction(Handle<Map> map,
|
| + Handle<SharedFunctionInfo> info,
|
| + Handle<Context> context,
|
| + PretenureFlag pretenure = TENURED);
|
| +
|
| + Handle<JSFunction> NewFunction(Handle<Map> map,
|
| + Handle<SharedFunctionInfo> info);
|
| };
|
|
|
| } } // namespace v8::internal
|
|
|