| Index: src/factory.cc
 | 
| diff --git a/src/factory.cc b/src/factory.cc
 | 
| index 6688cc1246bd40c82a38c2a693510f997ebd6750..f931b7fb620fffe786793ce383d3148b7ff717a4 100644
 | 
| --- a/src/factory.cc
 | 
| +++ b/src/factory.cc
 | 
| @@ -1237,6 +1237,9 @@ void Factory::InitializeFunction(Handle<JSFunction> function,
 | 
|    function->set_prototype_or_initial_map(*the_hole_value());
 | 
|    function->set_literals_or_bindings(*empty_fixed_array());
 | 
|    function->set_next_function_link(*undefined_value());
 | 
| +
 | 
| +  // TODO(arv): This does not look correct. We need to make sure we use
 | 
| +  // a Map that has no prototype property.
 | 
|    if (info->is_arrow()) function->RemovePrototype();
 | 
|  }
 | 
|  
 | 
| @@ -1356,8 +1359,7 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
 | 
|      Handle<SharedFunctionInfo> info,
 | 
|      Handle<Context> context,
 | 
|      PretenureFlag pretenure) {
 | 
| -  int map_index = Context::FunctionMapIndex(info->strict_mode(),
 | 
| -                                            info->is_generator());
 | 
| +  int map_index = Context::FunctionMapIndex(info->strict_mode(), info->kind());
 | 
|    Handle<Map> map(Map::cast(context->native_context()->get(map_index)));
 | 
|    Handle<JSFunction> result = NewFunction(map, info, context, pretenure);
 | 
|  
 | 
| @@ -1904,13 +1906,14 @@ Handle<FixedArray> Factory::NewTypeFeedbackVector(int slot_count) {
 | 
|  
 | 
|  
 | 
|  Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
 | 
| -    Handle<String> name, int number_of_literals, bool is_generator,
 | 
| -    bool is_arrow, Handle<Code> code, Handle<ScopeInfo> scope_info,
 | 
| +    Handle<String> name, int number_of_literals, FunctionKind kind,
 | 
| +    Handle<Code> code, Handle<ScopeInfo> scope_info,
 | 
|      Handle<FixedArray> feedback_vector) {
 | 
| +  DCHECK(IsValidFunctionKind(kind));
 | 
|    Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name, code);
 | 
|    shared->set_scope_info(*scope_info);
 | 
|    shared->set_feedback_vector(*feedback_vector);
 | 
| -  shared->set_is_arrow(is_arrow);
 | 
| +  shared->set_kind(kind);
 | 
|    int literals_array_size = number_of_literals;
 | 
|    // If the function contains object, regexp or array literals,
 | 
|    // allocate extra space for a literals array prefix containing the
 | 
| @@ -1919,7 +1922,7 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
 | 
|      literals_array_size += JSFunction::kLiteralsPrefixSize;
 | 
|    }
 | 
|    shared->set_num_literals(literals_array_size);
 | 
| -  if (is_generator) {
 | 
| +  if (IsGeneratorFunction(kind)) {
 | 
|      shared->set_instance_class_name(isolate()->heap()->Generator_string());
 | 
|      shared->DisableOptimization(kGenerator);
 | 
|    }
 | 
| 
 |