Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 5ecdfcfd2f4aec25c94ab22927b53363715b3b59..54917473925c6942ea464b83fac986d9512067b0 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1231,6 +1231,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(); |
} |
@@ -1350,8 +1353,8 @@ 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->is_generator(), info->is_concise_method()); |
Handle<Map> map(Map::cast(context->native_context()->get(map_index))); |
Handle<JSFunction> result = NewFunction(map, info, context, pretenure); |
@@ -1893,12 +1896,13 @@ 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<FixedArray> feedback_vector) { |
+ bool is_arrow, bool is_concise_method, Handle<Code> code, |
+ Handle<ScopeInfo> scope_info, Handle<FixedArray> feedback_vector) { |
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_is_concise_method(is_concise_method); |
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 |