Index: src/factory.h |
diff --git a/src/factory.h b/src/factory.h |
index 02d0044c36562e9f03d41857e9840154f914a562..45d540160282ab3ba5eac4e98aaf5e113dfc69ba 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); |
@@ -597,7 +598,8 @@ class Factory V8_FINAL { |
Handle<Code> code, |
Handle<ScopeInfo> scope_info, |
Handle<FixedArray> feedback_vector); |
- Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name); |
+ Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, |
+ MaybeHandle<Code> code); |
// Allocate a new type feedback vector |
Handle<FixedArray> NewTypeFeedbackVector(int slot_count); |
@@ -659,20 +661,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 +675,24 @@ 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<String> name, |
+ MaybeHandle<Code> maybe_code); |
}; |
} } // namespace v8::internal |