Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index bf249067ed0fc3bf93f92c1f6597c52839be4d3a..36154c6b7aef6771464773dafafd74a56e160b7f 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1385,13 +1385,6 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( |
if (!info->bound() && index < 0) { |
int number_of_literals = info->num_literals(); |
Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); |
- if (number_of_literals > 0) { |
- // Store the native context in the literals array prefix. This |
- // context will be used when creating object, regexp and array |
- // literals in this function. |
- literals->set(JSFunction::kLiteralNativeContextIndex, |
- context->native_context()); |
- } |
result->set_literals(*literals); |
} |
@@ -2031,14 +2024,7 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
shared->set_scope_info(*scope_info); |
shared->set_feedback_vector(*feedback_vector); |
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 |
- // context. |
- if (number_of_literals > 0) { |
- literals_array_size += JSFunction::kLiteralsPrefixSize; |
- } |
- shared->set_num_literals(literals_array_size); |
+ shared->set_num_literals(number_of_literals); |
if (IsGeneratorFunction(kind)) { |
shared->set_instance_class_name(isolate()->heap()->Generator_string()); |
shared->DisableOptimization(kGenerator); |